Creating multiple audio file form a single Txt file
I'm trying to create multiple mp3 files based on one existing txt file. the txt file is separated by paragraphs. i have figured out to use gTTS to convert the text to audio but i'm having trouble with splitting the txt file. single txt file: [Hello Jay Hello Tom] I want to have two different audio file. one that says "Hello Jay" and another that says "Hello Tom" I'm really new to python and i only managed to convert the txt file into audio at this point. from gtts import gTTS with open("1_3.txt", encoding = "utf-8") as file: file = file.read() speak = gTTS(file, lang= "en") speak.save("1_3.mp3
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.