A speech recognition model trained in 24 hours on a single GPU for ~$12. Built with Tiny Audio—a minimal, hackable ASR framework. Quick Start
Model source
Source description
Sources
1 sourceSource excerpts
3 excerptslicense: mit language: en datasets: speechbrain/LoquaciousSet basemodel: zai-org/GLM-ASR-Nano-2512 Qwen/Qwen3-0.6B pipelinetag: automatic-speech-recognition tags: asr speech-recognition audio qwen glm-asr libraryname: transformers
python from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="mazesmazes/tiny-audio", trust_remote_code=True) result = pipe("audio.wav") print(result["text"]) python from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="mazesmazes/tiny-audio", trust_remote_code=True) # From file result = pipe("audio.wav") print(result["text"]) # From URL result = pipe("https://example.com/audio.mp3") # From numpy array (must be 16kHz) import numpy as np audio = np.random.randn(16000).astype(np.float32) # 1 second result = pipe(audio) python # Process multiple files files = ["audio1.wav", "audio2.wav", "audio3.wav"] results = pipe(files, batch_size=4) for r in results: print(r["text"]) python result = pipe("audio.wav", return_timestamps="word") # Returns: # { # "text": "hello world", # "chunks": [ # {"text": "hello", "timestamp": (0.0, 0.5)}, # {"text": "world", "timestamp": (0.6, 1.0)} # ] # } python from tiny_audio import ASRModel, ASRProcessor import torch model = ASRModel.from_pretrained("mazesmazes/tiny-audio") processor = ASRProcessor.from_pretrained("mazesmazes/tiny-audio") # Load and process audio import librosa audio, sr = librosa.load("audio.wav", sr=16000) inputs = processor(audio, sampling_rate=16000, return_tensors="pt") # Stream tokens for token in model.generate_streaming(inputs["input_features"]): print(token, end="", flush=True) python from tiny_audio import ASRModel, ASRProcessor import torch import librosa # Load model and processor model = ASRModel.from_pretrained("mazesmazes/tiny-audio") processor = ASRProcessor.from_pretrained("mazesmazes/tiny-audio") # Load audio (16kHz) audio, sr = librosa.load("audio.wav", sr=16000) # Process inputs = processor(audio, sampling_rate=16000, return_tensors="pt") # Generate with torch.no_grad(): output = model.generate( input_features=inputs["input_features"], attention_mask=inputs["attention_mask"], max_new_tokens=256 ) # Decode text = processor.batch_decode(output, skip_special_tokens=True)[0] print(text) python import torch pipe = pipeline( "automatic-speech-recognition", model="mazesmazes/tiny-audio", trust_remote_code=True, device="cuda" # or device=0 ) python pipe = pipeline( "automatic-speech-recognition", model="mazesmazes/tiny-audio", trust_remote_code=True, torch_dtype=torch.float16, device="cuda" ) Audio (16kHz) → GLM-ASR Encoder (frozen) → MLP Projector (trained) → Qwen3 (frozen) → Textoutput_len = (input_len - 5) // 5 + 1transformers>=4.40.0 torch>=2.0.0 torchaudio>=2.0.0librosa soundfileconfig.jsonmodel.safetensorspreprocessor_config.jsontokenizer.jsontokenizer_config.jsonspecial_tokens_map.jsonbibtex @misc{tinyaudio2024, author = {Alex Kroman}, title = {Tiny Audio: Minimal ASR Training}, year = {2024}, publisher = {GitHub}, url = {https://github.com/alexkroman/tiny-audio} } A speech recognition model trained in 24 hours on a single GPU for ~$12. Built with Tiny Audio—a minimal, hackable ASR framework. Quick Start
mazesmazes/tiny-audio