GCP speech-to-text model adaptation V2

I'm currently working on configuring the speech-to-text conversion using the chirp model in version 2. I've encountered an error and need some assistance with the adaptation part of the code.

config = cloud_speech.RecognitionConfig(

auto_decoding_config={}, # Explicitly disable auto-decoding
model="chirp",
language_codes=["en-US"],
adaptation = cloud_speech.SpeechAdaptation(
phrase_sets=[
cloud_speech.SpeechAdaptation.AdaptationPhraseSet(
inline_phrase_set=cloud_speech.PhraseSet(
phrases=[cloud_speech.PhraseSet.Phrase(
value="home",
boost=10.0
)]
)
)
]
),

error.png

I've attached a snippet of the error I'm encountering. Any help would be greatly appreciated.

1 REPLY 1

I think adaptation isn't working for Speech API v2 at all. I am using the "long" model. It doesn't throw the same exception you're seeing but the phrase sets are ignored. The same code works in v1. This is unfortunate.