Calling by skype using C#

回眸只為那壹抹淺笑 提交于 2019-12-04 03:43:28

问题


I want to develop an assistant software for blind people like Jarvis. It is a C# form application. I need to connect my C# project with Skype API so as to call to some username by using Skype. When I command by using Call John, it responds by calling to John by Skype.

Can someone show me some snippets of code that'll help towards this?


回答1:


To start the Skype call, Process.Start("callto:john");. You can concatenate "callto:" with the name of the contact.

Look at MSDN Documentation on Speech Recognition in C# for writing the code that triggers the call event described above. As seen in the example below copied from documentation, you can listen on a a few words-- in your case, "call".

Choices colors = new Choices();
colors.Add(new string[] {"red", "green", "blue"});

GrammarBuilder gb = new GrammarBuilder();
gb.Append(colors);

// Create the Grammar instance.
Grammar g = new Grammar(gb);

UPDATE I'd suggest using Skype4comLib. Here's an example!

Skype skype;
skype = new SKYPE4COMLib.Skype();
string SkypeID = "john";
Call call = skype.PlaceCall(SkypeID);


来源:https://stackoverflow.com/questions/27474912/calling-by-skype-using-c-sharp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!