Author Topic: GTTS MP3 quality  (Read 1999 times)

0 Members and 1 Guest are viewing this topic.

Brian

  • $upporter
  • Jr. Member
  • *****
  • Posts: 27
  • Karma: 3
    • View Profile
GTTS MP3 quality
« on: December 27, 2020, 01:16:37 PM »
I've noticed that the bit rate is only 32 kbps. Is there a way to up the bitrate to perhaps 128?

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: GTTS MP3 quality
« Reply #1 on: December 27, 2020, 06:02:37 PM »
No.  This is the quality of the file produced by the Google api.  There is no option to download a higher bitrate mp3 file.

I think what matters is how it sounds.  It always sounds very good to me.  Bear in mind that this is a computer generated voice, not chamber music.  32 Kbps for 24 Hz in mono should be more than good enough quality for a human voice and a computer generated one probably needs even less because the audio is very clean and simple.  If anyone were to decide that it did not sound good enough for them, I would expect that to be due to the voice synthesis, and not the quality of the mp3 encoding.

Since these voices have to be downloaded from the cloud, I assume that Google made a balanced choice that would yield the best sound without wasting bandwidth.
« Last Edit: December 27, 2020, 07:21:08 PM by jitterjames »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: GTTS MP3 quality
« Reply #2 on: December 27, 2020, 06:16:09 PM »
https://cloud.google.com/text-to-speech/docs/reference/rest/v1/text/synthesize#audioconfig

It looks like there is an option to download speech as .wav or .ogg files as well.

I'm not sure the uncompressed audio would sound noticeably better but it will use a lot more bandwidth and of course will increase the size of your cache files by quite a bit.

I don't know how difficult it would be to be able to play .ogg files in VC.  Again, although .ogg claims to be a more efficient encoder than mp3 I'm not sure the difference would be noticable enough to justify the time spent to make it work!

Could be a project for a rainy day but I've already got a lot of those lined up. ;)