如何用DELPHI命今选择TTS中播音的人 ?

解决方案 »

  1.   

    这个我最熟悉了你可以在代码中设置朗读引擎这是我以前的代码片断获取引擎:
    procedure TFrmRead.GetEngine;
    var
      Sots1:ISpeechObjectTokens;
      Sot1:ISpeechObjectToken;
      i:integer;
    begin
      SpVoice1.EventInterests := SVEAllEvents;
      Sots1:=SpVoice1.GetVoices('','');  ComboEngine.Clear;
      for i := 0 to Sots1.Count-1 do
        begin
           Sot1:=Sots1.Item(i);
           ComboEngine.Items.Add(Sot1.GetDescription(0));
        end;
        begin
            if ComboEngine.Items.Count > 0 then
              begin
                if ComboEngine.Items.IndexOf('Microsoft Simplified Chinese')=-1 then
                    ComboEngine.ItemIndex := 0
                else
                    ComboEngine.ItemIndex := ComboEngine.Items.IndexOf('Microsoft Simplified Chinese');
              end;
        end;
    end;
    设置引擎:
    procedure TFrmRead.SelectEngine;
    var  //设置可用引擎
        Sots1:ISpeechObjectTokens;
        Sot1:ISpeechObjectToken;
    begin
      if ComboEngine.Itemindex=-1 then Exit;
      Sots1:=SpVoice1.GetVoices('','');
      Sot1:=Sots1.Item(ComboEngine.Itemindex);  SpVoice1.Voice:=Sot1;
     StatusBar1.Panels[0].Text:='朗读引擎:'+ComboEngine.Items.Strings[ComboEngine.Itemindex];
    end;另外:微软语音5.1是支持多语种的,看你装什么包了
      

  2.   

    使用语音朗读开发包,里面有DELPHI的例子,调用很方便
    http://www.smartysoft.cn/smartreadsdk/那里还有中文女声,中文男声,英文语音库选择