The pronunciation can also contain pitch accents. The start
of a pitch phrase is specified with `^` and the down-pitch
position is specified with `!`, for example:
::
phrase:端 pronunciation:^はし
phrase:箸 pronunciation:^は!し
phrase:橋 pronunciation:^はし!
We currently only support the Tokyo dialect, which allows at
most one down-pitch per phrase (i.e. at most one `!`
between `^`).
PHONETIC_ENCODING_PINYIN (4):
Used to specify pronunciations for Mandarin
words. See https://en.wikipedia.org/wiki/Pinyin.
For example: 朝阳, the pronunciation is "chao2
yang2". The number represents the tone, and
there is a space between syllables. Neutral
tones are represented by 5, for example 孩子 "hai2
zi5".
Enums
Name
Description
PHONETIC_ENCODING_UNSPECIFIED
Not specified.
PHONETIC_ENCODING_IPA
IPA, such as apple -> ˈæpəl. https://en.wikipedia.org/wiki/International_Phonetic_Alphabet
PHONETIC_ENCODING_X_SAMPA
X-SAMPA, such as apple -> "{p@l". https://en.wikipedia.org/wiki/X-SAMPA
PHONETIC_ENCODING_JAPANESE_YOMIGANA
For reading-to-pron conversion to work well, the `pronunciation` field should only contain Kanji, Hiragana, and Katakana.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-09 UTC."],[],[],null,["# Class PhoneticEncoding (2.27.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.27.0 (latest)](/python/docs/reference/texttospeech/latest/google.cloud.texttospeech_v1.types.CustomPronunciationParams.PhoneticEncoding)\n- [2.26.0](/python/docs/reference/texttospeech/2.26.0/google.cloud.texttospeech_v1.types.CustomPronunciationParams.PhoneticEncoding)\n- [2.25.0](/python/docs/reference/texttospeech/2.25.0/google.cloud.texttospeech_v1.types.CustomPronunciationParams.PhoneticEncoding)\n- [2.24.0](/python/docs/reference/texttospeech/2.24.0/google.cloud.texttospeech_v1.types.CustomPronunciationParams.PhoneticEncoding)\n- [2.23.0](/python/docs/reference/texttospeech/2.23.0/google.cloud.texttospeech_v1.types.CustomPronunciationParams.PhoneticEncoding)\n- [2.22.0](/python/docs/reference/texttospeech/2.22.0/google.cloud.texttospeech_v1.types.CustomPronunciationParams.PhoneticEncoding)\n- [2.21.1](/python/docs/reference/texttospeech/2.21.1/google.cloud.texttospeech_v1.types.CustomPronunciationParams.PhoneticEncoding)\n- [2.20.0](/python/docs/reference/texttospeech/2.20.0/google.cloud.texttospeech_v1.types.CustomPronunciationParams.PhoneticEncoding)\n- [2.19.0](/python/docs/reference/texttospeech/2.19.0/google.cloud.texttospeech_v1.types.CustomPronunciationParams.PhoneticEncoding)\n- [2.18.0](/python/docs/reference/texttospeech/2.18.0/google.cloud.texttospeech_v1.types.CustomPronunciationParams.PhoneticEncoding)\n- [2.17.2](/python/docs/reference/texttospeech/2.17.2/google.cloud.texttospeech_v1.types.CustomPronunciationParams.PhoneticEncoding)\n- [2.16.5](/python/docs/reference/texttospeech/2.16.5/google.cloud.texttospeech_v1.types.CustomPronunciationParams.PhoneticEncoding)\n- [2.15.1](/python/docs/reference/texttospeech/2.15.1/google.cloud.texttospeech_v1.types.CustomPronunciationParams.PhoneticEncoding)\n- [2.14.2](/python/docs/reference/texttospeech/2.14.2/google.cloud.texttospeech_v1.types.CustomPronunciationParams.PhoneticEncoding)\n- [2.13.0](/python/docs/reference/texttospeech/2.13.0/google.cloud.texttospeech_v1.types.CustomPronunciationParams.PhoneticEncoding)\n- [2.12.3](/python/docs/reference/texttospeech/2.12.3/google.cloud.texttospeech_v1.types.CustomPronunciationParams.PhoneticEncoding)\n- [2.11.1](/python/docs/reference/texttospeech/2.11.1/google.cloud.texttospeech_v1.types.CustomPronunciationParams.PhoneticEncoding)\n- [2.10.2](/python/docs/reference/texttospeech/2.10.2/google.cloud.texttospeech_v1.types.CustomPronunciationParams.PhoneticEncoding)\n- [2.9.1](/python/docs/reference/texttospeech/2.9.1/google.cloud.texttospeech_v1.types.CustomPronunciationParams.PhoneticEncoding)\n- [2.8.0](/python/docs/reference/texttospeech/2.8.0/google.cloud.texttospeech_v1.types.CustomPronunciationParams.PhoneticEncoding)\n- [2.7.1](/python/docs/reference/texttospeech/2.7.1/google.cloud.texttospeech_v1.types.CustomPronunciationParams.PhoneticEncoding)\n- [2.6.0](/python/docs/reference/texttospeech/2.6.0/google.cloud.texttospeech_v1.types.CustomPronunciationParams.PhoneticEncoding)\n- [2.5.3](/python/docs/reference/texttospeech/2.5.3/google.cloud.texttospeech_v1.types.CustomPronunciationParams.PhoneticEncoding)\n- [2.4.0](/python/docs/reference/texttospeech/2.4.0/google.cloud.texttospeech_v1.types.CustomPronunciationParams.PhoneticEncoding)\n- [2.3.0](/python/docs/reference/texttospeech/2.3.0/google.cloud.texttospeech_v1.types.CustomPronunciationParams.PhoneticEncoding)\n- [2.2.0](/python/docs/reference/texttospeech/2.2.0/google.cloud.texttospeech_v1.types.CustomPronunciationParams.PhoneticEncoding)\n- [2.1.0](/python/docs/reference/texttospeech/2.1.0/google.cloud.texttospeech_v1.types.CustomPronunciationParams.PhoneticEncoding)\n- [2.0.0](/python/docs/reference/texttospeech/2.0.0/google.cloud.texttospeech_v1.types.CustomPronunciationParams.PhoneticEncoding)\n- [1.0.3](/python/docs/reference/texttospeech/1.0.3/google.cloud.texttospeech_v1.types.CustomPronunciationParams.PhoneticEncoding)\n- [0.5.0](/python/docs/reference/texttospeech/0.5.0/google.cloud.texttospeech_v1.types.CustomPronunciationParams.PhoneticEncoding) \n\n PhoneticEncoding(value)\n\nThe phonetic encoding of the phrase. \n\n The pronunciation can also contain pitch accents. The start\n of a pitch phrase is specified with `^` and the down-pitch\n position is specified with `!`, for example:\n\n ::\n\n phrase:端 pronunciation:^はし\n phrase:箸 pronunciation:^は!し\n phrase:橋 pronunciation:^はし!\n\n We currently only support the Tokyo dialect, which allows at\n most one down-pitch per phrase (i.e. at most one `!`\n between `^`).\n PHONETIC_ENCODING_PINYIN (4):\n Used to specify pronunciations for Mandarin\n words. See https://en.wikipedia.org/wiki/Pinyin.\n\n For example: 朝阳, the pronunciation is \"chao2\n yang2\". The number represents the tone, and\n there is a space between syllables. Neutral\n tones are represented by 5, for example 孩子 \"hai2\n zi5\"."]]