文本框中的CurrentVisemeId [英] CurrentVisemeId in Textbox
本文介绍了文本框中的CurrentVisemeId的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
需要帮助,请
我对编程很陌生.
谁能告诉我我要去哪里错了.
无法使该代码正常工作.
我已经尝试了所有可以在网上找到的东西.
我已经在这里待了三个多星期了.
我不想放弃它,必须有一种方法.
谢谢
Need some Help, Please
I am very new to programming.
Could anyone tell me where i am going wrong.
Can''t get this code to work.
I ve tried every thing that I could find online.
I have been at this for over 3 weeks now.
I don''t want to giveup on it, there has got to be a way.
Thanks
using System;
using System.Collections.Generic;
using System.Componentmodel;
using System.Data;
using System.Drawing;
using System.Ling;
using System.Text;
using System.Window.forms;
using SpeechLib;
using System.Speech.Synthesis;
namespace Visemeintextbox
{
public partial class Form1 : Form
{
public SpeechLib.SpVoice vox;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(System.object sender,System.EventArgs e)
{
vox=new SpVoice();
this.Text1.Text="This is text is a textbox";
}
private void Command1_Click(System.object sender,System.EventArgs e)
{
vox.Speak(this.Text1.Text,SpeechVoiceSpeakFlags.SVSFlagsAsync);
}
private void vox_Viseme(long StreamNumber,object StreamPosition,long Duration,
SpeechLib.SpeechVisemeType NextVisemeId,
SpeechLib.SpeechVisemeFeature Feature,
SpeechLib.SpeechVisemeType CurrentVisemeId)
{
this.Text2.Text=this.Text2.Text+CurrentVisemeId+" ";
}
}
}
推荐答案
尝试一下...
try this...
private void Command1_Click(object sender, EventArgs e)
{
SpVoice vox = new SpVoice();
vox.Speak(this.Text1.Text,SpeechVoiceSpeakFlags.SVSFlagsAsync);
vox.Viseme += new _ISpeechVoiceEvents_VisemeEventHandler(vox_Viseme);
}
void vox_Viseme(int StreamNumber, object StreamPosition, int Duration, SpeechVisemeType NextVisemeId, SpeechVisemeFeature Feature, SpeechVisemeType CurrentVisemeId)
{
this.Text2.Text = this.Text2.Text + CurrentVisemeId + " ";
}
这篇关于文本框中的CurrentVisemeId的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文