Skip to content

Commit ab9d5bd

Browse files
committed
chore(speech to text): Apply manual changes for recognize content type header
1 parent f7be21f commit ab9d5bd

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

watson_developer_cloud/speech_to_text_v1.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def list_models(self, **kwargs):
162162

163163
def recognize(self,
164164
audio,
165-
content_type,
165+
content_type=None,
166166
model=None,
167167
language_customization_id=None,
168168
acoustic_customization_id=None,
@@ -351,8 +351,6 @@ def recognize(self,
351351

352352
if audio is None:
353353
raise ValueError('audio must be provided')
354-
if content_type is None:
355-
raise ValueError('content_type must be provided')
356354

357355
headers = {'Content-Type': content_type}
358356
if 'headers' in kwargs:
@@ -459,7 +457,7 @@ def check_jobs(self, **kwargs):
459457

460458
def create_job(self,
461459
audio,
462-
content_type,
460+
content_type=None,
463461
model=None,
464462
callback_url=None,
465463
events=None,
@@ -698,8 +696,6 @@ def create_job(self,
698696

699697
if audio is None:
700698
raise ValueError('audio must be provided')
701-
if content_type is None:
702-
raise ValueError('content_type must be provided')
703699

704700
headers = {'Content-Type': content_type}
705701
if 'headers' in kwargs:

0 commit comments

Comments
 (0)