Microsoft Speech SDK
SAPI 5.1
ISpPhoneConverter::PhoneToId
ISpPhoneConverter::PhoneToId converts a character phoneme string to an ID code string.
The English and Chinese phoneme sets require the phonemes to be space separated. The Japanese phoneme set requires the phoneme character form to be continuous. See the individual entries for more details about the character sets.
HRESULT PhoneToId(
const WCHAR *pszPhone,
SPPHONEID *pId
);
Parameters
- pszPhone
- [in] Address of a null-terminated string that contains the phoneme string information.
- pId
- [out] Address of the SPPHONEID array that receives the phoneme identifiers. On return the array will be a null--terminated list of SPPHONEIDs.
Return values
Value | Description |
---|---|
S_OK | Function completed successfully. |
E_INVALIDARG | One or more parameters are invalid, or phoneme not found. |
SPERR_UNINITIALIZED | Interface not initialized. |
E_FAIL | pId is invalid or bad. |
E_FAILED(hr) | Appropriate error message. |