An interactive Python tool to record bilingual speech samples using PyAudio and ipywidgets in a Jupyter Notebook. Ideal for collecting aligned audio datasets (e.g., English ↔ Tulu) for speech recognition, language translation, or linguistic research.
- ✅ Record audio for two separate languages (English and Tulu)
- 🧠 Interactive UI using
ipywidgetsfor Start/Stop per language - 💾 Automatically stores WAV files with a unique random ID
- 📝 Input label field and CSV logging (
data.csv) - ❌ Cancel button to discard unwanted recordings
- 📂 Organizes files into separate folders (
ENGLISH/,TULU/)
- Python 3.7+
pyaudioipywidgets- Jupyter Notebook or JupyterLab
pip install pyaudio ipywidgetsFor Linux, if PyAudio fails to install:
sudo apt-get install portaudio19-dev
pip install pyaudio-
Launch your Jupyter Notebook:
jupyter notebook
-
Open the notebook containing the code.
-
Click Start Recording ENGLISH and Start Recording TULU as needed.
-
Click Stop when done.
-
Enter the associated label/text in the input box.
-
Press NEXT to save the label in
data.csv. -
If you want to discard the current recording pair, press Cancel.
Files will be saved as:
ENGLISH/<randomID>.wav
TULU/<randomID>.wav
And your CSV (data.csv) will contain:
<randomID>,<user_input_text>
bilingual-audio-recorder/
├── ENGLISH/ # Saved English audio files
├── TULU/ # Saved Tulu audio files
├── data.csv # Text labels for each recording pair
├── notebook.ipynb # Main notebook (contains all UI and logic)
└── README.md
Contributions are welcome! If you'd like to:
- Add support for more languages
- Include audio visualizations
- Improve file organization Feel free to open an issue or submit a pull request.
MIT License