using System.Collections.Generic; using System.ServiceModel; using System.Threading; using AssistantSeika; namespace sampleSpeak { class Program { static void Main(string[] args) { string BaseAddr = "net.pipe://localhost/EchoSeika/CentralGate/ApiEntry"; ChannelFactory Channel = new ChannelFactory(new NetNamedPipeBinding(), new EndpointAddress(BaseAddr)); IScAPIs api = Channel.CreateChannel(); while (Channel.State != CommunicationState.Opened) { Thread.Sleep(100); } Dictionary effetcs = new Dictionary() { { "volume", 1.0m }, { "speed", 0.9m }, { "pitch" , 1.3m }, { "intonation", 1.0m } }; Dictionary emotions = new Dictionary() { {"喜び", 0.60m } }; string s = "あー嬉しいなー"; string[] t = new string[] { "あー嬉しいなー", "ホント嬉しいなー" }; api.Talk( 2000, s, "", effetcs, emotions ); // api.Talk( 2000, s, @"F:\AssistantSeika\sandbox\2000.wav", effetcs, emotions ); api.Talk2( 2000, t, "", effetcs, emotions ); // api.Talk2( 2000, t, @"F:\AssistantSeika\sandbox\2000.wav", effetcs, emotions ); Channel.Close(); } } }