This repository contains a simple Flask web application that provides an endpoint for transcribing audio files using a pre-trained model.
The application allows users to upload audio files in various formats, including WAV, MP3, M4A, and FLAC. Once an audio file is uploaded, the application uses the hezarai/whisper-small-fa model to transcribe the audio content and returns the transcripts in JSON format.
Installation
- Clone this repository to your local machine.
- Ensure you have Python installed (version 3.6 or later).
- Install the required Python packages:
pip install Flask hezar librosa
- Run the Flask application:
python main.py
-
The application will start a web server accessible at http://127.0.0.1:5000.
-
Example Request:
curl -X POST http://127.0.0.1:5000/transcribe -F "file=@path_to_audio_file.wav"
- Example Response:
{
"transcripts": [
{
"chunks": null,
"text": "و این تنها محدود به محیط کار نیست"
}
]
}
Contact me @:
e-mail:
Telegram id: