Reference documentation and code samples for the Cloud Speech-to-Text V2 API class Google::Cloud::Speech::V2::SpeechAdaptation.
Provides "hints" to the speech recognizer to favor specific words and phrases
in the results. PhraseSets can be specified as an inline resource, or a
reference to an existing PhraseSet resource.
value (::Array<::Google::Cloud::Speech::V2::CustomClass>) — A list of inline CustomClasses. Existing CustomClass resources can be
referenced directly in a PhraseSet.
[[["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-04 UTC."],[],[],null,["# Cloud Speech-to-Text V2 API - Class Google::Cloud::Speech::V2::SpeechAdaptation (v1.2.1)\n\nVersion latestkeyboard_arrow_down\n\n- [1.2.1 (latest)](/ruby/docs/reference/google-cloud-speech-v2/latest/Google-Cloud-Speech-V2-SpeechAdaptation)\n- [1.2.0](/ruby/docs/reference/google-cloud-speech-v2/1.2.0/Google-Cloud-Speech-V2-SpeechAdaptation)\n- [1.1.0](/ruby/docs/reference/google-cloud-speech-v2/1.1.0/Google-Cloud-Speech-V2-SpeechAdaptation)\n- [1.0.1](/ruby/docs/reference/google-cloud-speech-v2/1.0.1/Google-Cloud-Speech-V2-SpeechAdaptation)\n- [0.16.0](/ruby/docs/reference/google-cloud-speech-v2/0.16.0/Google-Cloud-Speech-V2-SpeechAdaptation)\n- [0.15.0](/ruby/docs/reference/google-cloud-speech-v2/0.15.0/Google-Cloud-Speech-V2-SpeechAdaptation)\n- [0.14.0](/ruby/docs/reference/google-cloud-speech-v2/0.14.0/Google-Cloud-Speech-V2-SpeechAdaptation)\n- [0.13.1](/ruby/docs/reference/google-cloud-speech-v2/0.13.1/Google-Cloud-Speech-V2-SpeechAdaptation)\n- [0.12.0](/ruby/docs/reference/google-cloud-speech-v2/0.12.0/Google-Cloud-Speech-V2-SpeechAdaptation)\n- [0.11.0](/ruby/docs/reference/google-cloud-speech-v2/0.11.0/Google-Cloud-Speech-V2-SpeechAdaptation)\n- [0.10.0](/ruby/docs/reference/google-cloud-speech-v2/0.10.0/Google-Cloud-Speech-V2-SpeechAdaptation)\n- [0.9.2](/ruby/docs/reference/google-cloud-speech-v2/0.9.2/Google-Cloud-Speech-V2-SpeechAdaptation)\n- [0.8.0](/ruby/docs/reference/google-cloud-speech-v2/0.8.0/Google-Cloud-Speech-V2-SpeechAdaptation)\n- [0.7.0](/ruby/docs/reference/google-cloud-speech-v2/0.7.0/Google-Cloud-Speech-V2-SpeechAdaptation)\n- [0.6.0](/ruby/docs/reference/google-cloud-speech-v2/0.6.0/Google-Cloud-Speech-V2-SpeechAdaptation)\n- [0.5.1](/ruby/docs/reference/google-cloud-speech-v2/0.5.1/Google-Cloud-Speech-V2-SpeechAdaptation)\n- [0.4.0](/ruby/docs/reference/google-cloud-speech-v2/0.4.0/Google-Cloud-Speech-V2-SpeechAdaptation)\n- [0.3.0](/ruby/docs/reference/google-cloud-speech-v2/0.3.0/Google-Cloud-Speech-V2-SpeechAdaptation)\n- [0.2.0](/ruby/docs/reference/google-cloud-speech-v2/0.2.0/Google-Cloud-Speech-V2-SpeechAdaptation)\n- [0.1.0](/ruby/docs/reference/google-cloud-speech-v2/0.1.0/Google-Cloud-Speech-V2-SpeechAdaptation) \nReference documentation and code samples for the Cloud Speech-to-Text V2 API class Google::Cloud::Speech::V2::SpeechAdaptation.\n\nProvides \"hints\" to the speech recognizer to favor specific words and phrases\nin the results. PhraseSets can be specified as an inline resource, or a\nreference to an existing PhraseSet resource. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #custom_classes\n\n def custom_classes() -\u003e ::Array\u003c::Google::Cloud::Speech::V2::CustomClass\u003e\n\n**Returns**\n\n- (::Array\\\u003c[::Google::Cloud::Speech::V2::CustomClass](./Google-Cloud-Speech-V2-CustomClass)\\\u003e) --- A list of inline CustomClasses. Existing CustomClass resources can be referenced directly in a PhraseSet.\n\n### #custom_classes=\n\n def custom_classes=(value) -\u003e ::Array\u003c::Google::Cloud::Speech::V2::CustomClass\u003e\n\n**Parameter**\n\n- **value** (::Array\\\u003c[::Google::Cloud::Speech::V2::CustomClass](./Google-Cloud-Speech-V2-CustomClass)\\\u003e) --- A list of inline CustomClasses. Existing CustomClass resources can be referenced directly in a PhraseSet. \n**Returns**\n\n- (::Array\\\u003c[::Google::Cloud::Speech::V2::CustomClass](./Google-Cloud-Speech-V2-CustomClass)\\\u003e) --- A list of inline CustomClasses. Existing CustomClass resources can be referenced directly in a PhraseSet.\n\n### #phrase_sets\n\n def phrase_sets() -\u003e ::Array\u003c::Google::Cloud::Speech::V2::SpeechAdaptation::AdaptationPhraseSet\u003e\n\n**Returns**\n\n- (::Array\\\u003c[::Google::Cloud::Speech::V2::SpeechAdaptation::AdaptationPhraseSet](./Google-Cloud-Speech-V2-SpeechAdaptation-AdaptationPhraseSet)\\\u003e) --- A list of inline or referenced PhraseSets.\n\n### #phrase_sets=\n\n def phrase_sets=(value) -\u003e ::Array\u003c::Google::Cloud::Speech::V2::SpeechAdaptation::AdaptationPhraseSet\u003e\n\n**Parameter**\n\n- **value** (::Array\\\u003c[::Google::Cloud::Speech::V2::SpeechAdaptation::AdaptationPhraseSet](./Google-Cloud-Speech-V2-SpeechAdaptation-AdaptationPhraseSet)\\\u003e) --- A list of inline or referenced PhraseSets. \n**Returns**\n\n- (::Array\\\u003c[::Google::Cloud::Speech::V2::SpeechAdaptation::AdaptationPhraseSet](./Google-Cloud-Speech-V2-SpeechAdaptation-AdaptationPhraseSet)\\\u003e) --- A list of inline or referenced PhraseSets."]]