Skip to content

ESP32 I2S Wifi Michropohne #55

@galzoltan42

Description

@galzoltan42

My respect! You have this great project: https://0110.be/posts/ESP32_I2S_WiFi_Microphone , and I would like to ask if it is possible to do continuous reading of a UDP microphone in python? The code below does not work:
(The phenomenon: a strong humming sound, the hum is stronger during speech)

`def udp_pcm_to_audio(data):

wav_io = io.BytesIO()
with wave.open(wav_io, 'wb') as wav_file:
    wav_file.setnchannels(1) 
    wav_file.setsampwidth(2) 
    wav_file.setframerate(44100) 
    wav_file.writeframes(data)
wav_io.seek(0)
return wav_io`

This works perfectly, so all ESP32, microphone, UDP settings are good:
nc -l -u 3000 | ffmpeg -y -f f32le -ar 16000 -ac 1 -i pipe: microphone.wav

Thank you very much for your help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions