ISpPhoneConverter::PhoneToId (SAPI 5.4)

Speech API 5.4
Microsoft Speech API 5.4

ISpPhoneConverter::PhoneToId

ISpPhoneConverter::PhoneToId converts a character phoneme string to an ID code string.

The English and Chinese phoneme character sets require that each phoneme be separated/delimited from the next phoneme by a space. The Japanese phoneme character set requires the phoneme characters to be continuous, with no delimiters. See the individual English, Chinese, and Japanese topics for more details about their character sets.


HRESULT PhoneToId(
   LPCWSTR      *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

ValueDescription
S_OKFunction completed successfully.
E_INVALIDARGOne or more parameters are invalid, or phoneme not found.
SPERR_UNINITIALIZEDInterface not initialized.
E_FAILpId is invalid or bad.
E_FAILED(hr)Appropriate error message.
Show: