Google Text-to-Speech support for The V Programming Language
Install gtts using:
v install rc4000.gtts
import rc4000.gtts // i wish it was just gtts to import
fn main(){
gtts.save_to_file("Hello world", "en", "hello.mp3")!
// ↑ text ↑ language ↑ path
}
For the language you need to use the ISO-639 code,
here is a small list:
see the full list at: https://cloud.google.com/translate/docs/languages
Lenguaje | ISO-639 code |
---|---|
English | en |
Spanish | es |
Portuguese | pt |
German | de |
French | fr |