A command-line tool for transcribing audio files in a folder to a metadata.csv file, using OpenAI's Whisper.
Project description
Trainscribe
Trainscribe is a command-line tool that transcribes audio files in a specified folder using OpenAI's Whisper and generates a metadata.csv file. The produced metadata file is intended to use in training/finetune of text to speech (TTS) models, and may use one of the following formats:
file_id|transcribed_text, orfile_id|transcribed_text|speaker, if a speaker label is provided.
This is similar to LJ Speech format, but lacks an additional field with normalized transcribed text for pronuciation. Particularly, file_id|transcribed_text may be used in projects like piper-train, and file_id|transcribed_text|speaker in xtts-finetune.
Requirements
- Python >=3.10, <3.14
uvffmpeg(install withsudo apt install ffmpeg)
Usage
Run the tool with:
uvx trainscribe --folder /path/to/audio/folder [options]
Transcribe a folder of audio files to metadata.csv using Whisper.
options:
-h, --help show this help message and exit
--folder, -f FOLDER Folder with audio files
--lang, -l LANG Language code for transcription (e.g. 'en')
--model, -m MODEL Whisper model name (tiny, base, small, medium, large, turbo)
--speaker, -s SPEAKER
Speaker label to add to metadata lines
--device, -d DEVICE Device for whisper model (cuda/cpu)
--output, -o OUTPUT
Example
Transcribe English audio in dataset/wavs using the medium model:
uvx trainscribe --folder dataset/wavs --lang en --model medium
This generates dataset/wavs/metadata.csv
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file trainscribe-0.1.2.tar.gz.
File metadata
- Download URL: trainscribe-0.1.2.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9aaa2f37c4d0a1342d2ab4093275ee914751560fe958d35bdbf0f379a0340c0
|
|
| MD5 |
5755103b0ce4f6f8102edbe54273a766
|
|
| BLAKE2b-256 |
cbf4bebc1504c264f7334a94ecb133f0c16ef2b23f8c3284a8fcaa15728c5332
|
File details
Details for the file trainscribe-0.1.2-py3-none-any.whl.
File metadata
- Download URL: trainscribe-0.1.2-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1eae31334121c34801dfa26c89ff1bd39504abcb62a6bfd47c563e6f83250b3
|
|
| MD5 |
cb4f2114e8789d08408d3bc2503bee2d
|
|
| BLAKE2b-256 |
4a0cd163c393571d2bde84e13900020c89b32b2dc264b28f14945ede7fce2765
|