Hướng dẫn audio từ text-to-speech demo của google
1 year ago 66

  1. Go to  https://cloud.google.com/text-to-speech or https://www.gstatic.com/cloud-site-ux/text_to_speech/text_to_speech.min.html
  2. Open the Developer Tools (by F12)
  3. Go to the "Network" tab.
  4. Enter the text you want to get audio of.
  5. Click the "SPEAK IT" button.
  6. Click the “I’m not a robot” checkbox
  7. Watch the "Network" tab populate with a couple of entries.
  8. Right-click the entry that starts with proxy?url=https://texttospeech
  9. In the preview to right, click "copy" in the line for “audiocontent”
  10. Save this as a text file (base64.txt). Remove the quotes (") from beginning and end This contains the base64 encoded audio
  11. In Ubuntu, decode base64 to wav file with the following command:
  12. cat base64.txt | base64 --decode > audio.mp3