Search code examples
pythonvideotext-to-speech

Turning text into narrated video in python


I have a lot of text, and I would like to convert it into audio, using some text-to-speech library, and then I would like to turn that audio into a video file, it doesn't matter if the screen is just black, or maybe if the text was the visual?

Anyway, I don't really know where to get started. There is a lot of it, and I need it done a lot of times, and I'm pretty familiar with python but I don't know how I should go about this. Are there standard libraries for turning text into speech for python? Or audio in mp4?


Solution

  • There's no pure text-to-speech engine written in python, but there are plenty of wrappers for other engines. Here's what some quick googling brought up:

    If you're on windows, PySpeech interfaces with the windows text-to-speech engine. It's no longer supported, but may work for you.

    There's also an interface for dragon naturally speaking, called Dragonfly. This library also works on the built in Windows system, and is still actively supported.

    Finally, if you're on linux, there's pyFestival, which offers bindings for the open source Festival engine.