sapi

Using win32client SAPI.SpVoice with multi-threading leads to pywintypes.com_error

青春壹個敷衍的年華 提交于 2019-12-13 04:11:23
问题 I am trying to use a thread with wincl 's built-in voice system. However I am running into this error: pywintypes.com_error: (-2147221008, 'CoInitialize has not been called.', None, None) which I can't seem to decipher. Here is my code: import win32com.client as wincl import time, threading def ten_second_timer(): t =threading.Timer(10, ten_second_timer) speak = wincl.Dispatch("SAPI.SpVoice") speak.Speak("10 seconds have passed") t.start() t =threading.Thread(target = ten_second_timer) t

No output in using wav file input with Microsoft SAPI 5.4 Api

此生再无相见时 提交于 2019-12-13 01:34:43
问题 I am working on a project where i need to use speech recognition to convert a wav file input speech ( conversation ) to text. After trying CMUSPhinx for a while, with terrible results, i am considering using Microsoft SAPI (Speech API) 5.4 I am coding as a Visual basic windows application from visual studio. Here is my code snippet : Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ' Dim SAPI ' SAPI = CreateObject("sapi.spvoice") '

MS SAPI 5.1 issue with C++

删除回忆录丶 提交于 2019-12-12 03:23:23
问题 I am using MS Speech API 5.1 with mingw compiler. I don't have VS hence but I was able to compile the code with c::b. The code snippet is below: #include <sapi.h> int main(int argc, char* argv[]) { ISpVoice * pVoice = NULL; if (FAILED(::CoInitialize(NULL))) return FALSE; HRESULT hr = CoCreateInstance(CLSID_SpVoice, NULL, CLSCTX_ALL, IID_ISpVoice, (void **)&pVoice); if( SUCCEEDED( hr ) ) { hr = pVoice->Speak(L"Hello world", 0, NULL); pVoice->Release(); pVoice = NULL; } ::CoUninitialize();

Difference between sapi.dll and mssps.dll

陌路散爱 提交于 2019-12-11 18:31:54
问题 I installed Microsoft Speech Platform SDK 10.2, and I notice that sapi.dll and mssps.dll have similar APIs. What's the difference between them? Which one should I use? Thanks. 回答1: Microsoft Speech Platform SDK 10.2 is the server version of SAPI. The server engines support lower quality audio, but don't support dictation. Also, the server versions of SAPI (I believe) have license restrictions that the desktop versions do not. The desktop engines are typically bundled with Windows, so if you

Is asynchronous text-to-speech voicing with SAPI 5.4 possible?

别说谁变了你拦得住时间么 提交于 2019-12-11 17:53:34
问题 I have a form and I want to allow the user to receive asynchronous (possibly overlapping) text-to-speech output based on the context of a text box whenever a button is pressed. I'm trying to do this via SAPI 5.4 (Interop.SpeechLib.dll). I recognize that System.Speech or other more "modern" functionality would work much better, but this is my current constraint. Here is a simplified version of my function: private void VoiceText(string myText) { SpVoice voice = new SpVoice(); // Create new

How to get speech recognition to detect SAPI emphasis markers?

天大地大妈咪最大 提交于 2019-12-11 14:59:52
问题 It is possible to extract the default phonemes for a given word via SAPI by: Voice word with text-to-speech and store output in a .wav Use the .wav as input for speech recognition Upon recognition of the word extract the phonemes from the recognized phrase elements However I have not been able to capture (if available) emphasis markers ("1" and "2" per the American English Phoneme Table). Is there a way to do this? EDIT: Here is what I've attempted so far (not pretty, but functional). Sadly

Does Microsoft SAPI support speech recognition on offline mode just like system.speech api?

旧城冷巷雨未停 提交于 2019-12-11 12:02:37
问题 I have read official documentation of Microsoft SAPI but I couldn't find about whether the api can be used on offline mode or not. in there, they said that Microsoft SAPI is server based speech recognition api. So It seems like it doesn't support but I have to make sure. Can I use Microsoft SAPI on offline just like system.speech ? 回答1: That link does not say what you think it says. Both Microsoft.Speech.Recognition (server engine) and System.Speech.Recognition (desktop engine) run entirely

Microsoft Sam, SAPI alternatives

╄→гoц情女王★ 提交于 2019-12-11 11:18:45
问题 We have a application that we were planing to use Microsoft speech API for. Now we tested it on Windows XP using Microsoft Sam voice and frankly it sound terrible ... It's almost impossible to hear what the voice is trying to say. Are there other, better voice. Are there any updates or newer versions out there that are better. Are there other product, open source projects etc that can work as an alternative? Just to clarify - It needs to have some sort of API so I actually can program against

store a variable that holds user input data in sapi5 speak function

谁说胖子不能爱 提交于 2019-12-11 08:34:35
问题 I am developing an application that uses the Microsoft SAPI5 speech engine. However, I have hit a wall. I've been trying to use the data from the variable that stores the input from the user so the TTS engine can repeat it. But the sapi5 speech function does not allow strings, wstrings or other types except from LPCWSTR which from my research is a pointer to a wide character string, so shouldn't it accept wstrings? Here's some example code from msdn : #include <stdafx.h> #include <sapi.h> int

C# SAPI - Recognizing phrases without pre-defined condition statements

∥☆過路亽.° 提交于 2019-12-11 08:00:42
问题 Scenario : I have 2 commands. 1) Search Google for "any word here" 2) Open application "any word here" Problem : Since the word after "Search Google for" can be anything, how am I suppose to know what am I going to write for my IF statements? With pre-defined sentences, I can do it easily like void Engine_SpeechRecognized (object sender, SpeechRecognizedEventsArgs e) { if (e.Result.Text == "Search Google Stackoverflow") { Search("Stackoverflow"); } } But since now it's not pre-defined, what