ποΈ Welcome to the Speech to Text Application! π This tool converts your spoken words into text in real time. With a sleek, modern interface powered by customtkinter
, you can easily integrate this solution into your streaming setup or any project that needs speech-to-text capabilities. π
- Real-time Speech Recognition: Convert your speech to text on the fly using Google Speech Recognition.
- User-friendly GUI: Enjoy a modern and intuitive interface built with
customtkinter
. - Configurable Settings: Easily adjust ambient noise calibration, timeout durations, and more via
config.py
. - Live Transcription: See the transcribed text update live on-screen and save it to a file (
transcription.txt
) for further use. - OBS Integration: Seamlessly use the saved transcription file for live captioning in OBS.
--> Click the link to read Instructions π.
- Install Python
- use the
python3119.bat
to install python 3119. just double click on the batch file and if a blue window pops up, click more and next, - follow the directions on the terminal in the
cmd.exe
- script will do it all for you.
- after open up
cmd.exe
a new one and typepython --version
output
will be Python 3.11.9
-
Set Up a Virtual Environment (optional but recommended):
python -m venv venv source venv/bin/activate # On Windows use: venv\Scripts\activate
-
Install the Required Packages:
pip install -r requirements.txt
-
Configure the Application:
- Open the
config.py
file to adjust settings like ambient noise duration, timeout, and phrase time limits.
- Open the
-
Run the Application:
python main.py
-
How to Use:
- Click the "Start Listening" button to begin capturing your speech.
- Speak clearly into your microphoneβthe transcribed text will appear in the text area.
- The transcription is also saved in
transcription.txt
for use with OBS or any other application. - Click "Close" to exit the application.
To integrate the transcription with OBS for live captioning, follow these steps:
- Open OBS.
- Add a Text Source:
- Click the "+" button in the Sources panel.
- Select "Text (GDI+)" on Windows or "Text (FreeType 2)" on other systems.
- Name your text source (e.g., "Live Captions").
- Enable File Reading:
- Check the "Read from file" option.
- Click "Browse" and select the
transcription.txt
file from your project directory.
- Customize Appearance:
- Adjust the font, color, size, and alignment to match your stream's style.
- Position Your Captions:
- Drag and drop the text source to your desired location on the OBS canvas.
- Start Your Stream:
- As the application writes new transcriptions to the file, OBS will automatically update the captions in real time!
The config.py
file includes the following settings:
- APPEARANCE_MODE: Set to
"dark"
or"light"
for the GUI. - THEME_COLOR: Choose your desired theme color (e.g.,
"blue"
). - FONT: Define the font type and size (e.g.,
('Helvetica', 10)
). - AMBIENT_NOISE_ADJUSTMENT_DURATION: Duration in seconds for ambient noise calibration.
- TIMEOUT_DURATION: Maximum time (in seconds) to wait for speech to start.
- PHRASE_TIME_LIMIT: Maximum duration (in seconds) to capture a single phrase.
- Speech Not Detected: Ensure your microphone is working correctly and consider increasing the ambient noise adjustment duration in
config.py
. - Incorrect Transcription: Speak clearly and check your internet connection since the application relies on Google's online speech recognition service.
- Join the Discord https://discord.fnbubbles420.org/invite
- Ping
Bubbles
Contributions are welcome! Please open issues or submit pull requests if you'd like to help improve this project.
Enjoy converting your voice to text with this awesome application! If you have any questions or feedback, feel free to reach out. Happy coding! π