lkpers.blogg.se

Windows 10 voices sapi
Windows 10 voices sapi












windows 10 voices sapi windows 10 voices sapi windows 10 voices sapi

If (SUCCEEDED(hr = pSpTok->OpenKey(L"Attributes", &cpSpAttributesKey)))ĬpSpAttributesKey->GetStringValue(L"Name", &dstrName) ĬpSpAttributesKey->GetStringValue(L"Gender", &dstrGender) While (cpSpEnumTokens->Next(1, &pSpTok, NULL) = S_OK) NOTE: IEnumSpObjectTokens::Next will *overwrite* the pointer must manually release Loops many times, but none of these have what I need While ( SUCCEEDED( hr = pSpTok->EnumValues( index, &key ) ) ) While ( SUCCEEDED( hr = pSpTok->EnumKeys( index, &key ) ) ) PSpTok->GetStringValue( L"language", &pLanguage ) PSpTok->GetStringValue( L"gender", &pGender ) pName, pGender and pLanguage are all null PSpTok->GetStringValue( L"name", &pName ) This succeeds, pID is "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\Voices\Tokens\TTS_MS_EN-US_DAVID_11.0" do something with the token here for example, set the voice While ( SUCCEEDED( hr = cpSpEnumTokens->Next( 1, &pSpTok, NULL ) ) ) If ( SUCCEEDED( hr = cpSpCategory->EnumTokens( NULL, NULL, &cpSpEnumTokens ) ) ) If ( SUCCEEDED( hr = SpGetCategoryFromId( SPCAT_VOICES, &cpSpCategory ) ) ) Hr = cpVoice.CoCreateInstance( CLSID_SpVoice ) ISpObjectToken* cpToken( NULL ) //Will set voice characteristics














Windows 10 voices sapi