s60sc / ESP32_VoiceChanger

ESP32 application to change a voice to be eg stormtrooper or dalek sounding, either in real time for cosplay or as a recording. Recordings can be downloaded to the browser as a WAV file for playback on a media player
GNU Affero General Public License v3.0
55 stars 7 forks source link

Unable to get any audio output #3

Closed garethm79 closed 8 months ago

garethm79 commented 1 year ago

Hi, wondering if I could have some pointers to getting this working? I'm using a devkit board with an INMP441 and a MAX98357A. Firstly, I have tested tested my hardware using separate scripts, one to view the mic waveform in the serial plotter, and another to play audio in the speaker, both work ok. However I can't just get the voice changer script to work. I have entered the pins correctly, tried switching the "I2S Peripheral Channel" settings, and changed the various other controls but can't get anything out of the speaker.

An example extract from the log showing that there's no errors really:

[00:09:44.805 setupMic] Setup I2S microphone
[00:09:44.817 setupAmp] Setup I2S amplifier
[00:09:44.818 startupMic] Start microphone on port 1
[00:09:44.818 startupAmp] Start amplifier on port 0
[00:09:44.830 actionTask] Passthru started
[00:10:03.103 actionTask] Passthru stopped

Any help appreciated!

s60sc commented 1 year ago

Try adding debug statements to monitor data values on plotter through the workflow

garethm79 commented 1 year ago

Thanks, I haven't had a lot of time to investigate but added some debug statement which shows data is being read and written out at least (log below). I re-flashed it with the test script I used (PlayAACFromPROGMEM) to double-check that nothing had changed, and that played the audio ok.

I'll continue my investigations!

[23:37:37.105 setupMic] Setup I2S microphone
[23:37:37.117 setupAmp] Setup I2S amplifier
[23:37:37.118 startupMic] Start microphone on port 1
[23:37:37.119 startupAmp] Start amplifier on port 0
[23:37:37.130 actionTask] Passthru started
[23:37:37.374 ampOutput] ampOutput
[23:37:37.375 ampOutput] ampOutput bytesRead 2048 bytesWritten 2048
[23:37:37.501 ampOutput] ampOutput
[23:37:37.503 ampOutput] ampOutput bytesRead 2048 bytesWritten 2048
[23:37:37.629 ampOutput] ampOutput
[23:37:37.631 ampOutput] ampOutput bytesRead 2048 bytesWritten 2048