Skip to content

Commit 09bc50d

Browse files
Add voice selection by name (GoogleCloudPlatform#2687)
* Add voice selection by name * Add future to requirements.txt Fixes python2 test failures referencing html. Co-authored-by: Leah E. Cole <[email protected]>
1 parent 709e850 commit 09bc50d

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
future==0.18.2
12
google-cloud-texttospeech==0.5.0

texttospeech/cloud-client/synthesize_text.py

+2
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ def synthesize_text(text):
3636
# Names of voices can be retrieved with client.list_voices().
3737
voice = texttospeech.types.VoiceSelectionParams(
3838
language_code='en-US',
39+
name='en-US-Standard-C',
3940
ssml_gender=texttospeech.enums.SsmlVoiceGender.FEMALE)
4041

4142
audio_config = texttospeech.types.AudioConfig(
@@ -68,6 +69,7 @@ def synthesize_ssml(ssml):
6869
# Names of voices can be retrieved with client.list_voices().
6970
voice = texttospeech.types.VoiceSelectionParams(
7071
language_code='en-US',
72+
name='en-US-Standard-C',
7173
ssml_gender=texttospeech.enums.SsmlVoiceGender.FEMALE)
7274

7375
audio_config = texttospeech.types.AudioConfig(

0 commit comments

Comments
 (0)