【问题标题】:How to record & save skype call communication by c#如何通过 C# 记录和保存 Skype 通话通信
【发布时间】:2014-03-19 02:33:34
【问题描述】:

我正在尝试使用 c# 记录和保存 Skype 通话通信,但它只能工作到一半。 当我从 Skype 拨打手机号码并连接时,他们所说的内容不会被记录,但我所说的内容正在被记录和保存。

我只是不明白为什么没有记录和保存对方的声音。这是我的代码:

public void Skype_CallStatus(Call call, TCallStatus status)
{
    int result = 0;
     Configuration config = 
         ConfigurationManager.OpenExeConfiguration
           (System.Windows.Forms.Application.ExecutablePath);
    if (status == TCallStatus.clsInProgress)
    {
        mciSendString("open new Type waveaudio Alias recsound", "", 0, 0);
        mciSendString("record recsound", "", 0, 0);

    }
    else if (status == TCallStatus.clsFinished)
    {
        DateTime currdate = DateTime.Now;
        string datetime = string.Format("{0:yyyyMMddhhmmss}.wav", DateTime.Now);

        string wavfilename = "";
        if (config.AppSettings.Settings["VoiceRecordsPath"].Value != null)
        {
            //wavfilename = config.AppSettings.Settings["VoiceRecordsPath"]
            //.Value.Replace(",","") + "_" + CSRBusiness.User.Country + "_" 
            //+ datetime + @".wav";
            wavfilename = CSRBusiness.User.Country + "_" + datetime;
        }
        Directory.SetCurrentDirectory( config.AppSettings.Settings
            ["VoiceRecordsPath"].Value.Replace(",", ""));

        //result = mciSendString("save recsound " + wavfilename, "", 0, 0);
        result = mciSendString("save recsound d://test.wav", "", 0, 0);
        mciSendString("close recsound ", "", 0, 0);
        MessageBox.Show(result.ToString());
    }
   // MessageBox.Show(result.ToString());
}

实际上,声音是从这个区域录制和保存的:

else if (status == TCallStatus.clsFinished)
{

}

所以我需要帮助来确定如何记录和保存通话的两端。在我的代码中哪里可以做到这一点?

【问题讨论】:

标签: c# skype4com


【解决方案1】:

mciSendString 对 Skype 一无所知。它所做的只是记录您计算机的麦克风拾取的内容(不包括 Skype 中的其他用户)。

我希望您必须从 Skype 本身为其他人获取音频流才能录制它。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-01-24
    • 1970-01-01
    • 2019-07-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多