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. Can be hosted on a ESP32 or ESP32-S3.
Download github files into the Arduino IDE sketch folder, removing -main
from the application folder name.
Compile using arduino core v3.0.3 or later with PSRAM enabled and the following Partition scheme:
Minimal SPIFFS (...)
8M with spiffs (...)
On first installation, the application will start in wifi AP mode - connect to SSID: VoiceChanger_..., to allow router and password details to be entered via the web page on 192.168.4.1
. The configuration data file (except passwords) is automatically created, and the application web pages automatically downloaded from GitHub to the SD card /data folder when an internet connection is available.
Subsequent updates to the application, or to the /data folder files, can be made using the OTA Upload tab. The /data folder can also be reloaded from GitHub using the Reload /data button on the Edit Config tab, or by using a WebDAV client.
A microphone and amplifier with speaker needs to be connected to the ESP32, and / or a browser microphone and speaker can be used. Optionally LEDs and MY9221 based LED bars can be connected that will flash according to the sound level. A potentiometer can also be connected to control amplifier volume and LED brightness. To enable recording the ESP32 needs to host PSRAM.
The types of microphone and amplifier that can be connected are combinations of I2S (mic & amp) and PDM (mic) At least one device must be I2S as the ESP32 only supports PDM on one I2S peripheral. Cheap I2S devices that have been successfully tested with this app are:
Other devices tested are:
If using I2S microphone and I2S amplifier the same pin numbers should be assigned for:
The application can be controlled by hardware buttons connected to pins defined via the app web page.
For realtime voice changing, the microphone must be acoustically shielded from the speaker to prevent feedback squeal.
Voice changing is achieved by applying software filters:
Biquad filters can also be cascaded to accentuate a particular effect. For more detail on biquad filters see eg. https://arachnoid.com/BiQuadDesigner/index.html
Control buttons:
VoiceChanger.wav
As the recorded data is not filtered it can be replayed with different filter configurations to find the best filter combination and settings.
Other settings:
Example configuration for radio style voice:
Example configuration for dalek style voice:
Show Log: Opens web socket to view log messages dynamically.
OTA Update: Update application bin file or files in /data folder using OTA.
Edit Config:
Reboot & Save: Save configuration changes and restart the ESP to apply.
Clear NVS: Clear current passwords.
Reload /data: Reload data files from github.
Wifi: WiFi and webserver settings.
Pins: Define pins used by microphone, amplifier, buttons.
If a PC or phone has a built in microphone this can accessed from the browser and streamed to the ESP32 in place of the local microphone. Press the Microphone icon which will blink when active and display a signal level bar. Due to Windows and browser security constraints this requires some steps to enable it to be used, see notes in file audio.cpp
.
If a PC or phone has a built in speaker this can accessed from the browser to play audio from the ESP32 in place of the local speaker. Press the Speaker icon which will blink when active. The amplifier volume slider does not apply to the browser speaker, use the device volume control.
Browser functions only tested on Chrome.