C# Speech - 创建循环并要求文本到语音合成器计数
C# Speech - Creating a loop and ask the text-to-speech synthesiser to count
我正在使用 C# 编写语音识别程序。我希望我的语音识别能够计算数字。
这是我到目前为止尝试过的方法,
if (e.Result.Text == "count numbers")
{
for (int count = 1; count <= 10; count++)
{
speechSynthesizer.Speak(); // what should I put here?
tbOutput.Text += count;
}
谢谢
使用count.ToString():
for (int count = 1; count <= 10; count++)
{
speechSynthesizer.Speak(count.ToString());
tbOutput.Text += count;
}
我正在使用 C# 编写语音识别程序。我希望我的语音识别能够计算数字。 这是我到目前为止尝试过的方法,
if (e.Result.Text == "count numbers")
{
for (int count = 1; count <= 10; count++)
{
speechSynthesizer.Speak(); // what should I put here?
tbOutput.Text += count;
}
谢谢
使用count.ToString():
for (int count = 1; count <= 10; count++)
{
speechSynthesizer.Speak(count.ToString());
tbOutput.Text += count;
}