CoolFace
Apppublic

pltobing/streaming-asr-nmt_nemo-translategemma_onnx-gguf

sourceHugging Facecc-by-nc-nd-4.0updated 8mo agoView on Hugging Face
0likes
App README

๐ŸŽ™๏ธ Nemotron-TranslateGemma Cache-Aware Streaming ASR-NMT - ONNX-GGUF - Hugging Face Space

Real-time speech recognition with incremental transcription and live performance metrics

License: CC-BY-NC-ND 4.0 Author: Patrick Lumbantobing, Vertox-AI Copyright (c) 2026 Vertox-AI. All rights reserved.


โœจ Features

โœ… Live Microphone Input - Real-time speech recognition โœ… File Upload Support - Process audio files (WAV) โœ… Incremental Transcripts - Updates as text is recognized (not batch) โœ… Incremental Translation - Updates as text is translated (not batch) โœ… Real-Time Metrics - See detailed pipeline performance โœ… No Scrolling - Everything visible on standard displays โœ… Responsive Design - Works on desktop and tablet โœ… Production Ready* - Error handling, resource cleanup


๐ŸŽฏ What Is This?

This is a Gradio web interface for Nemotron Cache-Aware Streaming ASR - a state-of-the-art streaming speech recognition system that:

  • โ€”Performs real-time inference using a Conformer-RNN-T architecture
  • โ€”Implements cache-aware streaming for efficient incremental inference
  • โ€”Maintains a multi-threaded pipeline for low-latency processing
  • โ€”Outputs incremental transcripts (piece-by-piece as recognized)
  • โ€”Provides comprehensive performance metrics for debugging and optimization

๐Ÿš€ Quick Start

Try It Now

Simply use the interface:

  1. 1.For Microphone:
  2. 2.Click "๐ŸŽค Mic" tab
  3. 3.Adjust recording duration (5-60 seconds)
  4. 4.Click "๐ŸŽ™๏ธ Record"
  5. 5.Speak clearly into your microphone
  6. 6.Watch the transcript update in real-time
  1. 1.For File Upload:
  2. 2.Click "๐Ÿ“ File" tab
  3. 3.Upload an audio file (WAV)
  4. 4.Click "๐Ÿ“ Process"
  5. 5.Watch transcription with live metrics

๐Ÿ“Š Understanding the Metrics

The metrics display shows real-time pipeline performance:

Stage                       Data           Elapsed Time       Latency (avg)

Audio Input
Features Extraction
Features Chunking
Encoder Passes
Decoder
NMT
Transcript GUI
Translation GUI

Key Metrics Explained

Audio Input:

  • โ€”Number of audio chunks captured
  • โ€”Duration of audio processed
  • โ€”Latency per audio chunk

Feature Extraction:

  • โ€”Raw features extracted from audio
  • โ€”Feature chunks assembled for encoding
  • โ€”Latency per feature extraction step

Encoding:

  • โ€”Number of encoder inference passes
  • โ€”Time spent in encoder
  • โ€”Latency per encoder pass

Decoding:

  • โ€”Transcripts generated (actual words)
  • โ€”Blank frames (silence/filler)
  • โ€”Latency per decoding step

Translation:

  • โ€”Transcripts segmented
  • โ€”Translations generated (actual words)
  • โ€”Blank frames (silence/filler)
  • โ€”Latency per decoding step

Performance:

  • โ€”RTF (Real-Time Factor): >1.0 is faster than real-time (good!)
  • โ€”Throughput: Feature chunks processed per second
  • โ€”E2E Latency: End-to-end latency per chunk

Queue Status:

  • โ€”Monitor each processing stage's queue depth
  • โ€”Helps identify bottlenecks

๐Ÿ—๏ธ System Architecture

User Input (Mic or File)
         โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Nemotron Streaming Pipeline     โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ 1. Audio Thread (capture/load)  โ”‚ โ†’ Audio Queue
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ 2. Preprocess Thread (features) โ”‚ โ†’ Preprocess Queue
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ 3. Encoder Thread (Conformer)   โ”‚ โ†’ Encoder Queue
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ 4. Decoder Thread (RNN-T)       โ”‚ โ†’ Decoder Queue
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ 5. NMT Thread (Gemma)           โ”‚ โ†’ NMT Queue
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ†“
   GUI Output
   โ”œโ”€ Transcript (incremental)
   โ”œโ”€ Translation (incremental)
   โ”œโ”€ Metrics (live)
   โ””โ”€ Status (current stage)

๐ŸŽค Microphone Tips

  • โ€”Environment: Use quiet environment for best results
  • โ€”Duration: 5-60 seconds configurable
  • โ€”Microphone: Any standard microphone works (built-in OK)
  • โ€”Volume: Speak at normal conversation volume
  • โ€”Distance: 6-12 inches from microphone
  • โ€”Accents: Works best with clear pronunciation

๐Ÿ“ File Upload Tips

Supported Formats:

  • โ€”WAV (16kHz mono recommended)

File Requirements:

  • โ€”Maximum size: Limited by server (typically 100MB+)
  • โ€”Duration: No hard limit (longer = slower)
  • โ€”Mono or stereo (stereo auto-converted to mono)
  • โ€”Any sample rate (auto-resampled to 16kHz)

Best Results:

  • โ€”Clear speech without background noise
  • โ€”Mono, 16kHz WAV files for fastest processing
  • โ€”Professional audio recordings

โšก Performance

Typical Performance (on standard hardware):

  • โ€”Latency: 100-200ms per audio chunk
  • โ€”Throughput: 2-5 feature chunks/sec
  • โ€”Real-Time Factor: 0.8-1.2x (varies by hardware)
  • โ€”Memory: Stable during processing
  • โ€”CPU: 40-80% utilization

Factors Affecting Performance:

  • โ€”Server hardware (CPU cores, RAM)
  • โ€”Audio chunk size (10-20ms typical)
  • โ€”ASR Model size (560ms latency model used here)
  • โ€”NMT Model size (Q8\_0 model used here, ~10 token/s on m8a.xlarge CPU)
  • โ€”Concurrent users

๐ŸŽจ Layout Features

โœ“ Compact Design - No scrolling needed โœ“ Responsive Layout - Adapts to screen size โœ“ Real-Time Updates - 100ms refresh rate โœ“ Mobile Friendly - Works on tablets โœ“ Dark Mode Support - Gradio theme support


๐Ÿ”’ Privacy & Security

  • โ€”Local Processing: Audio stays on your device during recording
  • โ€”Server Processing: Server receives audio for inference only
  • โ€”No Storage: Audio not saved after processing
  • โ€”No Tracking: No analytics or tracking
  • โ€”Open Source: Code is transparent and auditable

๐Ÿ“œ License Information

License: CC-BY-NC-ND 4.0 (Creative Commons Attribution-NonCommercial-NoDerivatives 4.0)

What You Can Do โœ“

  • โ€”Use for non-commercial purposes
  • โ€”Run the application
  • โ€”Study the code
  • โ€”Reference in your work (with attribution)
  • โ€”Share with others

What You Cannot Do โœ—

  • โ€”Use for commercial purposes without permission
  • โ€”Modify or create derivatives
  • โ€”Sell or monetize
  • โ€”Remove copyright notices
  • โ€”Use without attribution

Attribution Required

When using this software, please include:

Based on Nemotron Streaming ASR - Gradio Demo
by Patrick Lumbantobing (Vertox-AI)
Licensed under CC-BY-NC-ND 4.0
https://creativecommons.org/licenses/by-nc-nd/4.0/

For commercial use: Contact Patrick Lumbantobing (Vertox-AI) for licensing options.


๐Ÿ› ๏ธ Technical Details

Model Information

Pipeline Components

  • โ€”Audio Input: Microphone (sounddevice) or File (byte read)
  • โ€”Feature Extraction: Mel-spectrogram preprocessing
  • โ€”Encoder: Conformer-based acoustic model
  • โ€”Decoder: RNN-T text generator
  • โ€”Threading: 4-thread multi-threaded pipeline

Dependencies

  • โ€”Python 3.8+
  • โ€”Gradio 5.49.1
  • โ€”ONNX Runtime
  • โ€”llama-cpp-python
  • โ€”NumPy
  • โ€”soxr

๐Ÿ“Š Benchmarks

Nemotron 560ms Model:

  • โ€”Word Error Rate (WER): ~7% (comparable to Whisper)
  • โ€”Latency: 560ms end-to-end
  • โ€”Real-Time Factor: 1.0-1.25x on standard hardware
  • โ€”Model Size: ~2.4GB ONNX

TranslateGemma Q8\_0 Model:

  • โ€”Speed: ~10 token/s on m8a.xlarge CPU
  • โ€”Real-Time Factor: 1.0-1.16x on standard hardware
  • โ€”Model Size: ~4.2GB ONNX

๐Ÿ› Troubleshooting

ProblemSolution
Microphone not detectedCheck browser permissions, try different browser
"File not found"Ensure file is uploaded correctly
Very slow processingServer may be busy, try again later
No transcript outputCheck microphone volume, speak louder/clearer
High latencyNormal on slower hardware, RTF ~1.0 is acceptable

๐Ÿ“š Documentation

  • โ€”Code: app.py - Main Gradio application
  • โ€”License: LICENSE_HEADER.md - Full license information
  • โ€”Source: TBD on GitHub (link to be added)

๐Ÿค Citation

If you use this in research, please cite:

bibtex
@software{pltobing2026nemotron,
  title={Nemotron-TranslateGemma Cache-Aware Streaming ASR-NMT - ONNX-GGUF - Gradio Demo},
  author={Tobing, Patrick Lumban},
  organization={Vertox-AI},
  year={2026},
  license={CC-BY-NC-ND 4.0}
}

๐Ÿ“ž Contact & Support

Author: Patrick Lumbantobing Organization: Vertox-AI License Questions: See LICENSE_HEADER.md Commercial Licensing: Contact Vertox-AI


๐Ÿ™ Acknowledgments


๐Ÿ“ Version

Version: 1.1 Release Date: February 11, 2026 License: CC-BY-NC-ND 4.0 Status: Production Ready


Enjoy real-time speech recognition and speech translation! ๐ŸŽคโœจ

For the best experience, use a modern web browser (Chrome, Firefox, Safari, Edge)