-
-
Save parzibyte/83d50258f8b7f1520017aaf1e6859801 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Convertir texto a voz (TTS) con | |
Python usando gTTS | |
Ejemplo 2: Escribir hola mundo en un archivo abierto con open, | |
en idioma español | |
@author parzibyte | |
""" | |
from gtts import gTTS | |
tts = gTTS('Hola mundo. Estamos convirtiendo texto a voz con Python.', lang='es-us') | |
with open("2_hola_mundo.mp3", "wb") as archivo: | |
tts.write_to_fp(archivo) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment