{"action":"closed","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/issues/1808","repository_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/issues/1808/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/issues/1808/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/issues/1808/events","html_url":"https://github.com/GoogleCloudPlatform/python-docs-samples/issues/1808","id":376063264,"node_id":"MDU6SXNzdWUzNzYwNjMyNjQ=","number":1808,"title":"ssml output same as neutral wavenet","user":{"login":"ishandutta2007","id":2527354,"node_id":"MDQ6VXNlcjI1MjczNTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/2527354?v=4","gravatar_id":"","url":"https://api.github.com/users/ishandutta2007","html_url":"https://github.com/ishandutta2007","followers_url":"https://api.github.com/users/ishandutta2007/followers","following_url":"https://api.github.com/users/ishandutta2007/following{/other_user}","gists_url":"https://api.github.com/users/ishandutta2007/gists{/gist_id}","starred_url":"https://api.github.com/users/ishandutta2007/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ishandutta2007/subscriptions","organizations_url":"https://api.github.com/users/ishandutta2007/orgs","repos_url":"https://api.github.com/users/ishandutta2007/repos","events_url":"https://api.github.com/users/ishandutta2007/events{/privacy}","received_events_url":"https://api.github.com/users/ishandutta2007/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-31T16:55:12Z","updated_at":"2018-10-31T17:42:26Z","closed_at":"2018-10-31T17:42:26Z","author_association":"NONE","body":"## In which file did you encounter the issue?\r\n\r\nhttps://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/texttospeech/cloud-client/synthesize_text.py\r\nssml output is coming same as same as neutral wavenet\r\n\r\n### Did you change the file? If so, how?\r\n\r\nNo I am just using python client API, but it is not working as expected\r\n\r\n## Describe the issue\r\n\r\nThese are two methods, one for ssml input and one for normal text, output file generated in both case sounds idential, why is it so?\r\n\r\n\r\n```\r\n\r\ndef synthesize_ssml(ssml, filename, speaker = texttospeech.enums.SsmlVoiceGender.MALE):\r\n    from google.cloud import texttospeech\r\n    client = texttospeech.TextToSpeechClient()\r\n    input_text = texttospeech.types.SynthesisInput(ssml=ssml)\r\n    voice = texttospeech.types.VoiceSelectionParams(language_code='en-US',ssml_gender=speaker)\r\n    audio_config = texttospeech.types.AudioConfig(audio_encoding=texttospeech.enums.AudioEncoding.MP3)\r\n    response = client.synthesize_speech(input_text, voice, audio_config)\r\n    with open(filename + '.mp3', 'wb') as out:\r\n        out.write(response.audio_content)\r\n        print('Audio content written to file '+ filename)\r\n\r\ndef gen_wavenet(text_contents, speaker = texttospeech.enums.SsmlVoiceGender.MALE):\r\n    client = texttospeech.TextToSpeechClient()\r\n    synthesis_input = texttospeech.types.SynthesisInput(text=text_contents)\r\n    voice = texttospeech.types.VoiceSelectionParams(language_code='en-US', ssml_gender=speaker)\r\n    audio_config = texttospeech.types.AudioConfig(audio_encoding=texttospeech.enums.AudioEncoding.MP3)\r\n    response = client.synthesize_speech(synthesis_input, voice, audio_config)\r\n    with open('output_normal.mp3', 'wb') as out:\r\n        out.write(response.audio_content)\r\n        print('Audio content written to file \"output.mp3\"')\r\n\r\n```\r\n\r\nThen I called in so many ways , all sound same\r\n\r\n```\r\n\r\n\r\n        synthesize_ssml(\"<prosody rate='fast' pitch='+2%'>\" + contents + \"</prosody>\", row[1].strip() + 'fast_plus2_Percentage_pitch')\r\n        synthesize_ssml(\"<prosody rate='fast' pitch='-2%'>\" + contents + \"</prosody>\", row[1].strip() + 'fast_minus2_Percentage_pitch')\r\n        synthesize_ssml(\"<prosody rate='fast' pitch='+10%'>\" + contents + \"</prosody>\", row[1].strip() + 'fast_plus10_Percentage_pitch')\r\n        synthesize_ssml(\"<prosody rate='fast' pitch='-10%'>\" + contents + \"</prosody>\", row[1].strip() + 'fast_minus10_Percentage_pitch')\r\n\r\n        synthesize_ssml(\"<emphasis level='strong'>\" + contents + \"</emphasis>\", row[1].strip() + 'strong_emphasis')\r\n        synthesize_ssml(\"<emphasis level='moderate'>\" + contents + \"</emphasis>\", row[1].strip() + 'moderate_emphasis')\r\n        synthesize_ssml(\"<emphasis level='reduced'>\" + contents + \"</emphasis>\", row[1].strip() + 'reduced_emphasis')\r\n\r\n```"}}
{"actor":{"display_login":"nnegrey"}}