Skip to content

Commit a2ca265

Browse files
committed
cleaning up speech-to-text model parameter
1 parent cc679f2 commit a2ca265

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

watson_developer_cloud/speech_to_text_v1.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,11 @@ def recognize(self, audio, content_type, continuous=False, model=None, inactivit
3939
'keywords': keywords,
4040
'keywordsThreshold': keywords_threshold,
4141
'maxAlternatives': max_alternatives,
42+
'model': model,
4243
'wordAlternativesThreshold': word_alternatives_threshold,
4344
'wordConfidence': word_confidence,
4445
'timestamps': timestamps,
4546
'interimResults': interim_results}
46-
if model:
47-
params['model'] = model
4847

4948
return self.request(method='POST', url='/v1/recognize', headers=headers, data=audio, params=params,
5049
stream=True, accept_json=True)

0 commit comments

Comments
 (0)