且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在语音中使用Tcplistner?

更新时间:2023-02-05 23:11:48

我同意Dave和SAKryukov的评论,

您需要查看代码,您将获得解决方案.

I am agree with Comments by Dave and SAKryukov,

You need to see your code and you will get solution.

speech.Speak(msg.Text, SpeechVoiceSpeakFlags.SVSFlagsAsync);



上面的代码本身表明您正在将msg.Text传递给Speak()方法,而您需要修改msg.Text字符串并传递更新的字符串.可能您会使用一些类级别的字符串变量来执行此操作,并将所有插入的字符串或更好地维护的所有字符串存储在Array中,这有助于您创建聊天记录",并且在讲话时,您可以从当前更新的Chat中删除现有的聊天.

这只是对您的问题的一种补救措施,我并不是说这是您真正需要以连击方式设计方法的***方法.

问候
Rushikesh Joshi



Above code itself says that you are passing msg.Text to Speak() method, instead you need to modify msg.Text string and pass the updated one. Probably you would do it using some class level string variable and store all string inserted or better maintain in an Array which help you to create Chat History and at time of speak you can remove existing chat from current updated Chat.

This is just a remedy for your issue, I am not saying this is best approach you really need to design your approach in batter way.

Regards
Rushikesh Joshi