Reference documentation and code samples for the Cloud Text-to-Speech V1 API module Google::Cloud::TextToSpeech::V1::CustomPronunciationParams::PhoneticEncoding.
value: 3 For reading-to-pron conversion to work well, the pronunciation field
should only contain Kanji, Hiragana, and Katakana.
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:
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".
[[["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-08-28 UTC."],[],[],null,["# Cloud Text-to-Speech V1 API - Module Google::Cloud::TextToSpeech::V1::CustomPronunciationParams::PhoneticEncoding (v1.9.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.9.0 (latest)](/ruby/docs/reference/google-cloud-text_to_speech-v1/latest/Google-Cloud-TextToSpeech-V1-CustomPronunciationParams-PhoneticEncoding)\n- [1.8.1](/ruby/docs/reference/google-cloud-text_to_speech-v1/1.8.1/Google-Cloud-TextToSpeech-V1-CustomPronunciationParams-PhoneticEncoding)\n- [1.7.0](/ruby/docs/reference/google-cloud-text_to_speech-v1/1.7.0/Google-Cloud-TextToSpeech-V1-CustomPronunciationParams-PhoneticEncoding)\n- [1.6.0](/ruby/docs/reference/google-cloud-text_to_speech-v1/1.6.0/Google-Cloud-TextToSpeech-V1-CustomPronunciationParams-PhoneticEncoding)\n- [1.5.0](/ruby/docs/reference/google-cloud-text_to_speech-v1/1.5.0/Google-Cloud-TextToSpeech-V1-CustomPronunciationParams-PhoneticEncoding)\n- [1.4.0](/ruby/docs/reference/google-cloud-text_to_speech-v1/1.4.0/Google-Cloud-TextToSpeech-V1-CustomPronunciationParams-PhoneticEncoding)\n- [1.3.0](/ruby/docs/reference/google-cloud-text_to_speech-v1/1.3.0/Google-Cloud-TextToSpeech-V1-CustomPronunciationParams-PhoneticEncoding)\n- [1.2.0](/ruby/docs/reference/google-cloud-text_to_speech-v1/1.2.0/Google-Cloud-TextToSpeech-V1-CustomPronunciationParams-PhoneticEncoding)\n- [1.1.1](/ruby/docs/reference/google-cloud-text_to_speech-v1/1.1.1/Google-Cloud-TextToSpeech-V1-CustomPronunciationParams-PhoneticEncoding)\n- [1.0.0](/ruby/docs/reference/google-cloud-text_to_speech-v1/1.0.0/Google-Cloud-TextToSpeech-V1-CustomPronunciationParams-PhoneticEncoding)\n- [0.13.0](/ruby/docs/reference/google-cloud-text_to_speech-v1/0.13.0/Google-Cloud-TextToSpeech-V1-CustomPronunciationParams-PhoneticEncoding)\n- [0.12.2](/ruby/docs/reference/google-cloud-text_to_speech-v1/0.12.2/Google-Cloud-TextToSpeech-V1-CustomPronunciationParams-PhoneticEncoding)\n- [0.11.1](/ruby/docs/reference/google-cloud-text_to_speech-v1/0.11.1/Google-Cloud-TextToSpeech-V1-CustomPronunciationParams-PhoneticEncoding)\n- [0.10.1](/ruby/docs/reference/google-cloud-text_to_speech-v1/0.10.1/Google-Cloud-TextToSpeech-V1-CustomPronunciationParams-PhoneticEncoding)\n- [0.9.1](/ruby/docs/reference/google-cloud-text_to_speech-v1/0.9.1/Google-Cloud-TextToSpeech-V1-CustomPronunciationParams-PhoneticEncoding)\n- [0.8.0](/ruby/docs/reference/google-cloud-text_to_speech-v1/0.8.0/Google-Cloud-TextToSpeech-V1-CustomPronunciationParams-PhoneticEncoding)\n- [0.7.0](/ruby/docs/reference/google-cloud-text_to_speech-v1/0.7.0/Google-Cloud-TextToSpeech-V1-CustomPronunciationParams-PhoneticEncoding)\n- [0.6.0](/ruby/docs/reference/google-cloud-text_to_speech-v1/0.6.0/Google-Cloud-TextToSpeech-V1-CustomPronunciationParams-PhoneticEncoding)\n- [0.5.2](/ruby/docs/reference/google-cloud-text_to_speech-v1/0.5.2/Google-Cloud-TextToSpeech-V1-CustomPronunciationParams-PhoneticEncoding) \nReference documentation and code samples for the Cloud Text-to-Speech V1 API module Google::Cloud::TextToSpeech::V1::CustomPronunciationParams::PhoneticEncoding.\n\nThe phonetic encoding of the phrase.\n\nConstants\n---------\n\n### PHONETIC_ENCODING_UNSPECIFIED\n\n**value:** 0 \nNot specified.\n\n### PHONETIC_ENCODING_IPA\n\n**value:** 1 \nIPA, such as apple -\\\u003e ˈæpəl.\n\u003chttps://en.wikipedia.org/wiki/International_Phonetic_Alphabet\u003e\n\n### PHONETIC_ENCODING_X_SAMPA\n\n**value:** 2 \nX-SAMPA, such as apple -\\\u003e \\"{p@l\\".\n\u003chttps://en.wikipedia.org/wiki/X-SAMPA\u003e\n\n### PHONETIC_ENCODING_JAPANESE_YOMIGANA\n\n**value:** 3 \nFor reading-to-pron conversion to work well, the `pronunciation` field\nshould only contain Kanji, Hiragana, and Katakana.\n\n\nThe pronunciation can also contain pitch accents.\nThe start of a pitch phrase is specified with `^` and the down-pitch\nposition is specified with `!`, for example: \n\n phrase:端 pronunciation:^はし\n phrase:箸 pronunciation:^は!し\n phrase:橋 pronunciation:^はし!\n\n\u003cbr /\u003e\n\nWe currently only support the Tokyo dialect, which allows at most one\ndown-pitch per phrase (i.e. at most one `!` between `^`).\n\n### PHONETIC_ENCODING_PINYIN\n\n**value:** 4 \nUsed to specify pronunciations for Mandarin words. See\n\u003chttps://en.wikipedia.org/wiki/Pinyin\u003e.\n\n\n\u003cbr /\u003e\n\nFor example: 朝阳, the pronunciation is \"chao2 yang2\". The number\nrepresents the tone, and there is a space between syllables. Neutral\ntones are represented by 5, for example 孩子 \"hai2 zi5\"."]]