[英]How to record & save skype call communication by c#
我正在嘗試使用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)
{
}
所以我需要幫助找出如何記錄和保存通話的兩端。 我的代碼在哪里可以做到這一點?
mciSendString
對Skype一無所知。 它所做的只是記錄計算機的麥克風拾取的內容(不包括Skype中的其他用戶)。
我希望您必須從Skype本身獲取音頻流給其他人才能錄制它。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.