This project allows users to convert speech into text and save the result in a .txt
file. The user can choose between Thai and English for the speech recognition process. The project uses the speech_recognition
library and Google's Speech Recognition API to convert the speech to text and saves it in a file for further use.
- Users can select a language for speech recognition, either Thai or English.
- Users speak into the microphone to record their speech.
- The program processes the audio and converts it into text.
- The transcribed text is displayed on the console for immediate feedback.
- The transcribed text is saved to a
.txt
file named according to the selected language. - After each transcription, users can choose to continue recording or exit the program.
-
The user speaks into the microphone, and the application converts the speech to text and displays the result.
-
The text is saved to a file named
output_thai.txt
oroutput_english.txt
depending on the language selected. -
After each transcription, the user can choose to continue ('y') or stop ('n').
-
For example, speaking "ได้ยินฉันไหมฉันเป็นคนไทย" will save:
Text (Thai): ได้ยินฉันไหมฉันเป็นคนไทย
-
If the user stops, the session ends and the text is saved in the file.
-
Clone or download the repository.
-
Install the required dependencies:
pip install -r requirements.txt
-
Run the code:
python speech_to_text_py
This project is licensed under the MIT License - see the LICENSE file for details.
For feedback or inquiries, feel free to reach out via [email protected].