Text to speech using raspberry pi pico

Can someone suggest me which library should I use for text to speech conversion in raspberry pi pico. I’ll be using LM386 module. And thonny IDE for programming pi pico.

Hi Sakshi,

I haven’t been able to find anyone doing direct TTS on MicroPython, let alone the Pico. The closest I’ve found is someone using code to pull voice clips from the google cloud through WiFi on an ESP32:

There exists a product from SparkFun that, while retired by us, can do standalone English text to speech:

You might want to consider a Pi Zero or similar device that can run full-strength Python so you can take advantage of the many TTS libraries that exist there:

Good luck with your project and I’m keen to see what you come up with!
-James

3 Likes

Hey James, thanks for your reply. I have been looking for micropython TTS library and I didn’t find anything. So I posted here. I wanted to make sure I’m not missing out on anything. About sparkfun product you mentioned I’ll consider it and will see if I could use something like that for my project.

1 Like

Hi Sakshi,

I would say a single board computer is a bit more suited for something like this, a TTS program will have to pull on quite a lot of memory and processing power to generate it in real-time.

As James suggested the Pi Zero also has a couple of types of onboard audio output (HDMI and I2S), or one of the larger boards (3A+ has a 3.5mm audio out) that you could use. PS: you could set the Pico up to send the text over UART for the Zero to playback.

Kinda interesting side note..

In the same vein, doing anything ‘instantaneously’ related to audio and video can be quite complex just in term of the algorithms. I’ve been taking a look into some real-time FFT stuff on the Pico and have only come across a few examples.

2 Likes

Thanks Liam. This was insightful note🙂

2 Likes

Hi Sakshi,

A Pi or other microprocessor instead of a Pico may be a good idea here so you have an OS to work in, although with the correct API, you may be able to follow this tutorial from Hackaday to get it setup, although the performance will be a bit of an issue as the Pi is not designed for voice recognition so this uses an interface to pass the audio to an external service which then performs the speech-to-text conversion and passes back the outcome to your Pi.

2 Likes