Skip to content

Speech Recognition to Text Tool

Speech Recognition to Text Tool Open Source Address

This is an offline local speech recognition to text tool, based on the openai-whipser open source model, which can recognize and convert human voices in video/audio into text. It can output in JSON format, SRT subtitle format with timestamps, and plain text format. It can be used to replace OpenAI's speech recognition interface or Baidu speech recognition, etc., after self-deployment, and the accuracy is basically equivalent to the official OpenAI API interface.

After deploying or downloading, double-click start.exe to automatically call the local browser to open the local webpage.

Drag and drop or click to select the audio and video files to be recognized, then select the speaking language, output text format, and the model to be used (built-in base model). Click to start recognition. After the recognition is completed, it will be output in the selected format on the current webpage.

The whole process does not require internet connection and runs completely locally, and can be deployed in the intranet.

The openai-whisper open source model has base/small/medium/large/large-v3. The built-in base model, base->large-v3, has better and better recognition results, but it also requires more computer resources. You can download it yourself and put it in the models directory as needed.

All Model Download Addresses

Pre-compiled Win Version Usage / Linux and Mac Source Code Deployment

  1. Click here to open the Releases page to download the pre-compiled file

  2. After downloading, unzip it to a certain location, such as E:/stt

  3. Double-click start.exe and wait for the browser window to open automatically.

  4. Click the upload area on the page, find the audio or video file you want to recognize in the pop-up window, or directly drag the audio and video file to the upload area, then select the language, text output format, and the model to be used, click "Start Recognition Now", wait a moment, and the recognition result will be displayed in the selected format in the text box at the bottom.

  5. If the machine has an NVIDIA GPU and the CUDA environment is configured correctly, CUDA acceleration will be used automatically.

Source Code Deployment (Linux/Mac/Window)

  1. Requires python 3.9->3.11

  2. Create an empty directory, such as E:/stt. Open the cmd window in this directory. The method is to enter cmd in the address bar and then press Enter.

    Use git to pull the source code to the current directory git clone [email protected]:jianchang512/stt.git .

  3. Create a virtual environment python -m venv venv

  4. Activate the environment. The command under win is %cd%/venv/scripts/activate, and the command under linux and Mac is source ./venv/bin/activate

  5. Install dependencies: pip install -r requirements.txt. If there is a version conflict error, please execute pip install -r requirements.txt --no-deps

  6. In win, unzip ffmpeg.7z and place the ffmpeg.exe and ffprobe.exe in the project directory. For Linux and Mac, go to ffmpeg official website to download the corresponding version of ffmpeg, unzip the ffmpeg and ffprobe binary programs and put them in the root directory of the project.

  7. Download the model compressed package, download the model as needed, and put the xx.pt file in the compressed package into the models folder in the project root directory after downloading.

  8. Execute python start.py and wait for the local browser window to open automatically.