This toolkit provides a command-line interface for transcribing long audio and video files using the Qwen-ASR API. It overcomes the API's 3-minute duration limit by splitting audio into chunks based on voice activity detection (VAD) and processing them in parallel. The toolkit includes reusable components for audio loading, VAD-based segmentation, and API interaction with retry logic and text post-processing. The main workflow involves loading media, applying VAD to detect speech segments, splitting audio into chunks respecting a target duration, transcribing chunks in parallel via the API, and combining results with optional SRT subtitle generation.
This repository is an offline speech-to-text application that uses the faster-whisper model to transcribe audio and video files into text, JSON, or SRT formats. It provides a web interface built with LayUI and a REST API (including an OpenAI-compatible endpoint) for easy integration. The application supports CPU and CUDA acceleration, caches loaded models for efficiency, and handles media conversion via FFmpeg. The architecture consists of a Flask web server served by gevent, with a background thread processing transcription tasks from a queue. Configuration is managed via an INI file, and utilities for FFmpeg execution, update checking, and browser launching are encapsulated in a helper module. The model caching mechanism avoids reloading large models for multiple requests, improving performance in a server setting.