ISpPhoneConverter::PhoneToId (Microsoft Speech Platform)

Microsoft Speech Platform SDK 11

Microsoft Speech Platform

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

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.