'input':{
'text':' Hello thankyou for calling to our National Weather Service'
},
'voice':{
'languageCode':'en-us',
'name':'en-US-Wavenet-A',
'ssmlGender':'MALE'
},
'audioConfig':{
'audioEncoding':'MP3'
}
}" "https://texttospeech.googleapis.com/v1beta1/text:synthesize?key=AIzaSyAtbcd23FAaJTKgpgaJxs" > synthesize-text.txt
sed 's|audioContent| |' < synthesize-text.txt > tmp-output.txt && tr -d '\n ":{}' < tmp-output.txt > tmp-output-2.txt && base64 tmp-output-2.txt --decode > synthesize-text-audio.mp3 && rm tmp-output*.txt
https://cloud.google.com/text-to-speech/docs/create-audio
https://cloud.google.com/text-to-speech/docs/voices
https://cloud.google.com/text-to-speech/docs/quickstart-protocol
No hay comentarios:
Publicar un comentario