Skip to content

Commit 84ee57a

Browse files
committed
accept is optional
1 parent cc90b0b commit 84ee57a

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

test/unit/test_text_to_speech_v1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def test_success():
9999
assert responses.calls[1].request.url == voice_url
100100
assert responses.calls[1].response.text == json.dumps(voice_response)
101101

102-
text_to_speech.synthesize('hello', 'audio/basic')
102+
text_to_speech.synthesize('hello')
103103
assert responses.calls[2].request.url == synthesize_url
104104
assert responses.calls[2].response.text == synthesize_response_body
105105

watson_developer_cloud/text_to_speech_v1.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def voices(self):
106106

107107
def synthesize(self,
108108
text,
109-
accept,
109+
accept=None,
110110
voice=None,
111111
customization_id=None):
112112
"""
@@ -121,8 +121,6 @@ def synthesize(self,
121121
"""
122122
if text is None:
123123
raise ValueError('text must be provided')
124-
if accept is None:
125-
raise ValueError('accept must be provided')
126124
headers = {'Accept': accept}
127125
params = {
128126
'voice': voice,

0 commit comments

Comments
 (0)