Not able to compile I2S to use I2S_ADC #1798
-
First of all, great work Phil. It's simply amazing what you did. I'm trying to build with an ESP32 and a MAX4466 a setup that streams the voice to a web server (or using a web socket). When using I2S, it is complaining about a "class audio_tools::I2SConfigESP32V1' has no member named 'input_type'" I'm using stream-max4466-websocket from the repo, and it seems that some libraries were moved away:
Here is the error I'm getting.
Any idea on how to fix this (and use the right libraries)? Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 10 comments 35 replies
-
You want to use the AnalogAudioStream class for analog audio input! |
Beta Was this translation helpful? Give feedback.
-
https://github.com/pschatzmann/arduino-audio-tools/wiki/It's-not-working |
Beta Was this translation helpful? Give feedback.
-
This is definitly an analog micrphone: so don't use I2SStream! |
Beta Was this translation helpful? Give feedback.
-
Still plentiy of errors in your sketch:
And look at the error messages in your log |
Beta Was this translation helpful? Give feedback.
-
Look at the error log: you must be missing some error messages! |
Beta Was this translation helpful? Give feedback.
-
If you were recording a sine wave this would be not good: if not this is inconclusive. I was just using your corrected sketch and was getting the following log: [I] AnalogConfigESP32V1.h : 139 - I2S_MODE_ADC_BUILT_IN I think this gives the information what your problem is ! |
Beta Was this translation helpful? Give feedback.
-
I'n now trying to use the web socket and use readBytes, however, I don't receive any audio. Do I need to format the flow before sending it to the web socket? Here is my sketch:
|
Beta Was this translation helpful? Give feedback.
-
Try to measure the max data rate that your websockets supports. |
Beta Was this translation helpful? Give feedback.
-
I am confused: you should measure how fast you receive the data from the websocket and not how fast you receive the data from AnalogAudioStream (which is already known!) |
Beta Was this translation helpful? Give feedback.
-
16 is correct: this defines the data type that is used to represent the data. 12 bits will be represented by int16_t numbers |
Beta Was this translation helpful? Give feedback.
You want to use the AnalogAudioStream class for analog audio input!