I am using the Talkie library to do speech synthesis with ESP32 and the PAM8403 amplifier.
That is working OK but I want to switch to using I2S and the MAX98357A I2S amplifier instead
The Talkie library outputs the audio byte stream using dacWrite()
I am unclear how I should convert this dacWrite() call to output the audio byte stream to via I2S?
Thanks
The audio stream is just a set of amplitude values, sent at regular intervals.
So, send the amplitude values to a routine in the I2S library that is equivalent to dacWrite().
Thanks
Unfortunately most of the libraries are for use with streams or MP3
However I have found a solution
Please post the solution, in case others have this problem.
The Espressif library does support playing from a data array.
The solution was to use an MP3 stream generated by Google Text to Speech cloud service instead of locally synthesized speech.
This stream can be played with the ESP32 I2S Audio library
This solution is not ideal but does the job in this particular use case.
Thanks
system
Closed
6
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.