Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
HuggingSound: A toolkit for speech-related tasks based on Hugging Face's tools
| Date | Stars |
|---|---|
| 2026-07-24 | 470 |
| 2026-07-25 | 470 |
| 2026-07-28 | 470 |
| 2026-07-30 | 470 |
| 2026-08-06 | 470 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
# HuggingSound
HuggingSound: A toolkit for speech-related tasks based on [HuggingFace's](https://huggingface.co/) tools.
I have no intention of building a very complex tool here.
I just wanna have an easy-to-use toolkit for my speech-related experiments.
I hope this library could be helpful for someone else too :)
# Requirements
- Python 3.8+
# Installation
```console
$ pip install huggingsound
```
# How to use it?
I'll try to summarize the usage of this toolkit.
But many things will be missing from the documentation below. I promise to make it better soon.
For now, you can open an issue if you have some questions or look at the source code to see how it works.
You can check more usage examples in the repository `examples` folder.
## Speech recognition
For speech recognition you can use any CTC model hosted on the Hugging Face Hub. You can find some available models [here](https://huggingface.co/models?pipeline_tag=automatic-speech-recognition).
### Inference
```python
from huggingsound import SpeechRecognitionModel
model = SpeechRecognitionModel("jonatasgrosman/wav2vec2-large-xlsr-53-english")
audio_paths = ["/path/to/sagan.mp3", "/path/to/asimov.wav"]
transcriptions = model.transcribe(audio_paths)
print(transcriptions)
# transcriptions format (a list of dicts, one for each audio file):
# [
# {
# "transcription": "extraordinary claims require extraordinary evidence",
# "start_timestamps": [100, 120, 140, 180, ...],
# "end_timestamps": [120, 140, 180, 200, ...],
# "probabilities": [0.95, 0.88, 0.9, 0.97, ...]
# },
# ...]
#
# as you can see, not only the transcription is returned but also the timestamps (in milliseconds)
# and probabilities of each character of the transcription.
```
### Inference (boosted by a language model)
```python
from huggingsound import SpeechRecognitionModel, KenshoLMDecoder
model = SpeechRecognitionModel("jonatasgrosman/wav2vec2-large-xlsr-53-english")
audio_paths = ["/path/to/sagan.mp3", "/path/to/asimov.wav"]
# The LM format used by the LM decoders is the KenLM format (arpa or binary file).
# You can download some LM files examples from here: https://huggingface.co/jonatasgrosman/wav2vec2-large-xlsr-53-english/tree/main/language_model
lm_path = "path/to/your/lm_files/lm.binary"
unigrams_path = "path/to/your/lm_files/unigrams.txt"
# We implemented three different decoders for LM boosted decoding: KenshoLMDecoder, ParlanceLMDecoder, and FlashlightLMDecoder
# On this example, we'll use the KenshoLMDecoder
# To use this decoder you'll need to install the Kensho's ctcdecode first (https://github.com/kensho-technologies/pyctcdecode)
decoder = KenshoLMDecoder(model.token_set, lm_path=lm_path, unigrams_path=unigrams_path)
transcriptions = model.transcribe(audio_paths, decoder=decoder)
print(transcriptions)
```
### Evaluation
```python
from huggingsound import SpeechRecognitionModel
model = SpeechRecognitionModel("jonatasgrosman/wav2vec2-large-xlsr-53-english")
references = [
{"path": "/path/to/sagan.mp3", "transcription": "extraordinary claims require extraordinary evidence"},
{"path": "/path/to/asimov.wav", "transcription": "violence is the last refuge of the incompetent"},
]
evaluation = model.evaluate(references)
print(evaluation)
# evaluation format: {"wer": 0.08, "cer": 0.02}
```
### Fine-tuning
```python
from huggingsound import TrainingArguments, ModelArguments, SpeechRecognitionModel, TokenSet
model = SpeechRecognitionModel("facebook/wav2vec2-large-xlsr-53")
output_dir = "my/finetuned/model/output/dir"
# first of all, you need to define your model's token set
# however, the token set is only needed for non-finetuned models
# if you pass a new token set for an already finetuned model, it'll be ignored during training
tokens = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "'"]
token_set = TokenSet(tokens)
# define your train/eval data
train_data = [
{"path": Excerpt of 5,750 characters
Read on GitHubWould you bet a product on this? Bounded 0–100 and slow moving.
matched fp:7774cf9578701735, topic:speech-recognition, topic:asr, topic:speech-to-text