Skip to content

Commit 546c1ba

Browse files
Pascaltseaver
authored andcommitted
Correct API spelling: 'speechContext' -> 'speechContexts'. (#3570)
1 parent bead634 commit 546c1ba

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/google-cloud-python-speech/google/cloud/speech/_http.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ def _build_request_data(sample, language_code, max_alternatives=None,
224224
if profanity_filter is not None:
225225
config['profanityFilter'] = profanity_filter
226226
if speech_contexts:
227-
config['speechContext'] = {'phrases': speech_contexts}
227+
config['speechContexts'] = {'phrases': speech_contexts}
228228

229229
data = {
230230
'audio': audio,

packages/google-cloud-python-speech/tests/unit/test_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def test_sync_recognize_content_with_optional_params_no_gax(self):
135135
'encoding': 'FLAC',
136136
'maxAlternatives': 2,
137137
'sampleRateHertz': 16000,
138-
'speechContext': {
138+
'speechContexts': {
139139
'phrases': [
140140
'hi',
141141
]

0 commit comments

Comments
 (0)