Skip to content

About

Batch transcription

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fun-asr-batch

FunASR-Nano batch transcription with multi-GPU support, managed with uv.

Features

  • Multi-GPU data parallelism (different files on different GPUs)
  • Handles long audio by chunking into configurable segments (default 50s)
  • Processes all audio files in input directory and outputs TXT files
  • Supports WAV, MP3, FLAC, M4A formats (recursive directory scan)
  • Skip already-transcribed files

Requirements

  • Python ≥ 3.10
  • CUDA-capable GPU(s)
  • uv
  • FunASR source (provides the model module):
git clone https://github.com/FunAudioLLM/Fun-ASR.git

Installation

# Install uv if you haven't already
curl -LsSf https://astral.sh/uv/install.sh | sh

# Install the project
uv sync

Usage

# Single GPU
uv run fun-asr-batch \
    --input_dir /path/to/audio \
    --output_dir /path/to/output \
    --model_dir FunAudioLLM/Fun-ASR-Nano-2512

# Multi-GPU (GPUs 0 and 1)
uv run fun-asr-batch \
    --input_dir /path/to/audio \
    --output_dir /path/to/output \
    --gpus 0,1

# With verbose output
uv run fun-asr-batch \
    --input_dir /path/to/audio \
    --output_dir /path/to/output \
    --verbose

Options

Option Default Description
--model_dir FunAudioLLM/Fun-ASR-Nano-2512 Path to model or HuggingFace model ID
--input_dir (required) Directory containing audio files
--output_dir (required) Directory to save transcription TXT files
--max_length 3500 Maximum tokens to generate per chunk
--chunk_seconds 50 Chunk duration in seconds for long audio
--language auto Target language: auto, zh, en, ja
--no_itn Disable inverse text normalization
--hotwords Comma-separated hotwords for better recognition
--gpus 0 Comma-separated GPU IDs (e.g. 0,1,2,3)
--no_skip_existing Re-transcribe files even if output TXT exists
--verbose Print transcription results in real-time

About

Batch transcription

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages