Skip to content

Commit 80ca9d0

Browse files
Merge pull request #72 from mnr/mnr-tts-changes
[text to speech] update examples
2 parents 81c9fd5 + f8e8ce7 commit 80ca9d0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

examples/text_to_speech_v1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
print(json.dumps(text_to_speech.voices(), indent=2))
1212

1313
with open(join(dirname(__file__), '../resources/output.wav'), 'wb') as audio_file:
14-
audio_file.write(text_to_speech.synthesize('Hello world!'))
14+
audio_file.write(text_to_speech.synthesize('Hello world!', accept='audio/wav', voice="en-US_AllisonVoice"))
1515

1616
print(json.dumps(text_to_speech.pronunciation('Watson', pronunciation_format='spr'), indent=2))
1717

watson_developer_cloud/text_to_speech_v1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def __init__(self, url=default_url, username=None, password=None, use_vcap_servi
3434

3535
def synthesize(self, text, voice=None, accept=None, customization_id=None):
3636
"""
37-
Returns the get HTTP response by doing a GET to /synthesize with text, voice, accept
37+
Returns the get HTTP response by doing a POST to /synthesize with text, voice, accept
3838
"""
3939
params = {'voice': voice, 'accept': accept, 'customization_id': customization_id}
4040
data = {'text': text}

0 commit comments

Comments
 (0)