FireRedLID language identification model for fasr
Project description
fasr-lid-firered
FireRedLID language identification for fasr. It accepts a Waveform and returns
a language tag such as "zh" or "en".
Install
pip install fasr-lid-firered
Registered Model
| Registry name | Class | Best for |
|---|---|---|
firered |
FireRedForLID |
Audio language identification with FireRedLID |
The default checkpoint is FireRedTeam/FireRedLID.
Direct Model Usage
from fasr.config import registry
from fasr.data import Waveform
model = registry.lid_models.get("firered")(
use_gpu=True,
use_half=True,
max_chunk_seconds=60.0,
)
waveform = Waveform.from_file("example.wav")
language = model.identify(waveform)
print(language)
Use local weights:
model.load_checkpoint("/path/to/FireRedLID")
Confection Config
[lid_model]
@lid_models = "firered"
use_gpu = true
use_half = false
max_chunk_seconds = 60.0
Parameters
| Parameter | Type / range | Default | Higher / true | Lower / false | Change when |
|---|---|---|---|---|---|
use_gpu |
bool |
True |
Uses CUDA when available | Uses CPU | You want predictable CPU deployment or faster GPU inference |
use_half |
bool |
False |
Uses FP16 on GPU, lower VRAM | Uses FP32, more stable | GPU memory is tight, or FP16 causes instability |
max_chunk_seconds |
float > 0 |
60.0 |
Fewer chunks, more memory per call | More chunks, less memory per call | Long audio causes OOM, or throughput needs tuning |
Generic checkpoint fields such as checkpoint, cache_dir, endpoint,
revision, and force_download are inherited from the base model.
Tuning Guide
| Symptom | Try first |
|---|---|
| GPU out of memory on long audio | Lower max_chunk_seconds to 20.0 or 30.0 |
| GPU memory is tight | Set use_half=True |
| CPU-only deployment | Set use_gpu=False |
| Language result is unstable on very long audio | Keep chunking enabled and aggregate over multiple chunks, the model already votes internally |
Dependencies
fasrtorch >= 2.0.0numpy >= 1.24kaldiio >= 2.18.0kaldi-native-fbank >= 1.19.0- Python 3.10-3.12
Project details
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 fasr_lid_firered-0.5.2.tar.gz.
File metadata
- Download URL: fasr_lid_firered-0.5.2.tar.gz
- Upload date:
- Size: 12.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a535db539dc1dc780b810f7fe354b0684461aa79f9577be3663d866d8ae208b
|
|
| MD5 |
87e88157b6734a0454a85dccd3913783
|
|
| BLAKE2b-256 |
286c2af39ca7c0b0177544065fe3958287a201ee960ca3c1240dce04cac33e67
|
File details
Details for the file fasr_lid_firered-0.5.2-py3-none-any.whl.
File metadata
- Download URL: fasr_lid_firered-0.5.2-py3-none-any.whl
- Upload date:
- Size: 20.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f1b46ce2b5ccbc50240a5cf46ef04593ea0dcea1df81635eb6b40f5234cf6d51
|
|
| MD5 |
9c5cdaee6414c081aa0a9989824292be
|
|
| BLAKE2b-256 |
b6b3b4f4a8b09f5e4c274755f161db65cc0eb72459a9491d57489821cf1f2a85
|