openAI TTS sketch #1839
Replies: 3 comments 8 replies
-
Cool, I suggest to replace AudioBoardStream i2s(NoBoard); with I2SStream i2s; The AudioBoardStream is mainly intended for codecs that need to be configured via I2C. |
Beta Was this translation helpful? Give feedback.
-
Thank you for this -- it is just what I need. Unfortunately, it does something bad to my ESP32. The code builds, and seems to run as far as playing a brief snatch of sound, but then stops playing, claims Audio playback is complete, and crashes the ESP32 with a "corrupt heap" error. Any thoughts as to what is going wrong? |
Beta Was this translation helpful? Give feedback.
-
(should say that one of the options it will return is a PCM stream, so in principle there need be very little decoding before passing to the I2S.) |
Beta Was this translation helpful? Give feedback.
-
Howdy,
I cobbled together a openAI TextToSpeech retrieval sketch / function.
I haven't tested this sketch into detail, as its just put together from a larger project I am working on.
I thought I share it so it might help somebody further down the line.
NOTE: you need to register with openAI to obtain an API key - this will not be a free service from openAI !
Beta Was this translation helpful? Give feedback.
All reactions