使用C#通过Skype调用 [英] Calling by skype using C#
问题描述
我想为贾维斯.这是一个C#表单应用程序.我需要将C#项目与Skype API连接起来,以便使用Skype调用某些用户名.当我使用 Call John
命令时,它会通过Skype呼叫John进行响应.
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?
推荐答案
要启动Skype调用,请执行 Process.Start("callto:john");
.您可以将"callto:"与联系人的名称连接起来.
To start the Skype call, Process.Start("callto:john");
. You can concatenate "callto:" with the name of the contact.
查看有关C#中语音识别的MSDN文档用于编写触发上述呼叫事件的代码.如下面从文档中复制的示例所示,您可以听几句话-就您而言,是呼叫".
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);
更新我建议使用 Skype4comLib
.这是一个例子!
UPDATE
I'd suggest using Skype4comLib
. Here's an example!
Skype skype;
skype = new SKYPE4COMLib.Skype();
string SkypeID = "john";
Call call = skype.PlaceCall(SkypeID);
这篇关于使用C#通过Skype调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!