Voice to Text Project
The V2T project is designed to convert voice recordings into text transcriptions and translate them between English and German. The project includes various scripts for recording audio, transcribing it using the Whisper model, detecting the language, and translating the text.
To use the code in this project, you need to install the following dependencies:
- Python 3.8 or higher
- Whisper
- Langdetect
- Googletrans
- Sounddevice
- Scipy
- Keyboard
- Numpy
You can install the required libraries using pip:
pip install whisper langdetect googletrans==4.0.0-rc1 sounddevice scipy keyboard numpyThe project is organized into the following folders:
This folder contains the raw audio data and text files used for training and testing the machine learning models.
This folder is used to store the live transcriptions and translations generated during a session. Each session will have its own subfolder containing the audio recordings, transcriptions, and translations.
This folder contains scripts and data for batch testing the transcription and translation efficiency. It includes sample audio files and the corresponding translated text files.
This folder contains the final versions of the scripts used for recording, transcribing, and translating audio. The main script in this folder is Push_to_translate.py.
This folder is used for testing the machine learning code. It contains test scripts and sample data for verifying the functionality of the project.
To record and transcribe audio, run the Push_to_translate.py script in the Final_code folder. The script will prompt you to enter a session name and then wait for you to press the spacebar to start recording. Press 's' to stop recording. The script will transcribe the audio and save the transcription and translation in the corresponding session folder.
To perform batch transcription and translation, run the Batch_Transcribe&Translate_efficiency_test.py script in the Batch_Testing_Ai folder. The script will process all the sample audio files in the input folder, transcribe them, and save the translated text in the output folder.
Here is an example of how to use the Push_to_translate.py script:
python [Push_to_translate.py](http://_vscodecontentref_/0)Follow the prompts to start and stop recording. The transcriptions and translations will be saved in the Live_Translations folder under the specified session name.
MIT License
Copyright (c) 2025 TPesch & JPerumal
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.