sapi

How to use the function GetStorageFileName for adding training files to registry?

好久不见. 提交于 2019-12-20 03:30:21
问题 I am using sapi 5.4 and I am able to retain the audio for training but for adding it to registry entries as given in this Acoustic training using SAPI 5.3 Speech API I am not able to understand the arguments to be used for ISpObjectToken::GetStorageFileName can somebody help me out with it? 回答1: ISpObjectToken::GetStorageFileName isn't the best documented API in the world. Luckily, I have some worked examples to help improve the documentation. clsidCaller Set this if you need the file name

How to pass arguments to a BackGroundWorker

爷,独闯天下 提交于 2019-12-20 02:31:05
问题 Imports SpeechLib Public Class Form1 Public vox = CreateObject("sapi.spvoice") Private Sub cmdSpeak_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSpeak.Click Dim text2 As String = "Hello , This is a Text. Hello , This is a Text." BackgroundWorker1.RunWorkerAsync() End Sub Private Sub cmdPause_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdPause.Click vox.pause() End Sub Private Sub Form1_Load(ByVal sender As Object, ByVal e As

Combine free-form dictation and semantic in a srgs grammar

让人想犯罪 __ 提交于 2019-12-19 11:53:08
问题 I'm trying to combine both the result of a semantic and a dictation request in the semantic value of a SRGS document. For example, I would say "Search potato" and the output would be something like out="Search Potato" where Potato is a random word spoken by the user. I tought about using the garbage special rule, but it doesn't seem to work. So far that's what I have : <rule id="rule1" scope="public"> <one-of> <item xml:lang="en-us">Search</item> <item>Cherche</item> </one-of> <tag>out

Microsoft.Speech.Synthesis does not work for Text To Speech BUT System.Speech.Synthesis works.Why?

核能气质少年 提交于 2019-12-19 09:40:39
问题 I just try to run simple microsoft example for Text To Speech using using Microsoft.Speech.dll; using System; using Microsoft.Speech.Synthesis; namespace TTS { class Program { public static void Main(string[] args) { Console.WriteLine("Testing TTS!"); // Initialize a new instance of the SpeechSynthesizer. using (SpeechSynthesizer synth = new SpeechSynthesizer()) { // Output information about all of the installed voices. Console.WriteLine("Installed voices -"); foreach (InstalledVoice voice in

How to create a custom sapi voice for tts

我只是一个虾纸丫 提交于 2019-12-19 08:28:49
问题 I am working on a project which I need to create a custom voice engine for my application. I have seen something like the TTS Builder, but is there someone who understands how applications such as the TTS Builder itself is developed? What is the thing behind SAPI engines? How do they work? How can one construct his/her own? Can I develop my own algorithm? I would prefer to do this in C# if possible 回答1: From what I see, it looks like TTS Builder takes existing voices and allows you to tweak

How to save text-to-speech as a wav with Microsoft SAPI?

旧城冷巷雨未停 提交于 2019-12-18 11:37:00
问题 I need to turn a text into speech and then save it as wav file. 回答1: The following C# code uses the System.Speech namespace in the .Net framework. It is necessary to reference the namespace before using it, because it is not automatically referenced by Visual Studio. SpeechSynthesizer ss = new SpeechSynthesizer(); ss.Volume = 100; ss.SelectVoiceByHints(VoiceGender.Female, VoiceAge.Adult); ss.SetOutputToWaveFile(@"C:\MyAudioFile.wav"); ss.Speak("Hello World"); I hope this is relevant and

SAPI5 voices / using 32bit voices

橙三吉。 提交于 2019-12-14 03:59:51
问题 After spending a whole lot of time on searching the web I think it's time to ask. I'm trying to implement some text to speech with SAPI5 in C++. The only available 64bit voice is Anna. With Anna everything is fine, but I also need a german voice. So I found Hedda(Microsoft) and Steffi(Realspeak). I already feel like implementing some dating service. Neither Hedda nor Steffi are added to the registry. So both of them are not detected by SAPI while it checks "HKLM\SOFTWARE\Microsoft\Speech

problem in recognition of numbers in system.speech?

老子叫甜甜 提交于 2019-12-13 15:43:13
问题 speech and i added grmmar which only detects numbers like this SpeechRecognitionEngine RecognitionEngine = new SpeechRecognitionEngine(new CultureInfo("en-US", true)); // Created Grammar For only Numbers 1 to 10 var NumberChoice = new Choices(); for (var i = 0; i <= 10; i++) { NumberChoice.Add(i.ToString()); } var NumGrammarBuilder = new GrammarBuilder(NumberChoice); var NumGrammar = new Grammar(NumGrammarBuilder); RecognitionEngine.LoadGrammar(NumGrammar); RecognitionEngine

Do I have to call Release() method on CComPtr objects?

女生的网名这么多〃 提交于 2019-12-13 15:15:40
问题 I'm working with SAPI5 API for processing text to speech. If I simplify my code looks like this (I removed error checking to simplify it as much as possible): int main() { CoInitialize(NULL); CComPtr<ISpVoice> spVoice; spVoice.CoCreateInstance(CLSID_SpVoice); ... CoUninitialize(); return 0; } For some weird reason my code crashes if I don't call spVoice.Release(). So the code above crashes, but this code works nicely: int main() { CoInitialize(NULL); CComPtr<ISpVoice> spVoice; spVoice

Running Windows Speech SDK application in PHP

徘徊边缘 提交于 2019-12-13 04:47:12
问题 This question is related to my previous (unanswered) question: Running console program in PHP The program I wrote in that question ( progName.exe ) is actually a Windows Speech SDK application, which generates a .WAV file from a text file and computes some parameters from the text file. I simplified the Speech SDK program to this: #include "stdafx.h" using namespace std; int _tmain(int argc, _TCHAR* argv[]) { HRESULT hr = S_OK; CComPtr <ISpVoice> cpVoice; CComPtr <ISpStream> cpWavStream;