Skip to main content

EigenWave-ASR: High-Performance Speech Recognition with Multi-Scale Robin Features

Project description

EigenWave-ASR 🎤

High-Performance Speech Recognition with Multi-Scale Robin Features

A novel ASR model achieving 6.36% WER on LibriSpeech test-clean with only 27.8M parameters.

🚀 Quick Start

from eigenwave import EigenWaveASR

# Load model
model = EigenWaveASR.from_pretrained("./")  # local directory
# or
model = EigenWaveASR.from_pretrained("sakibhasan/eigenwave-asr")  # from Hub

# Transcribe audio
text = model.transcribe("speech.wav")
print(text)
# Output: "hello this is a test of the speech recognition system"

📦 Installation

pip install eigenwave-asr

# For best accuracy (KenLM language model):
pip install eigenwave-asr[lm]

# For HuggingFace Hub support:
pip install eigenwave-asr[all]

📋 Usage Examples

Basic Transcription

from eigenwave import EigenWaveASR

model = EigenWaveASR.from_pretrained("sakibhasan/eigenwave-asr")

# From file
text = model.transcribe("audio.wav")

# Batch
texts = model.transcribe(["audio1.wav", "audio2.wav", "audio3.wav"])

# From tensor (16kHz mono)
import torch
audio_tensor = torch.randn(16000 * 5)  # 5 seconds
text = model.transcribe(audio_tensor)

Detailed Output

result = model.transcribe_with_details("audio.wav")
print(result)
# {
#     "text": "hello world",
#     "duration": 2.5,
#     "processing_time": 0.320,
#     "rtf": 0.128,         # Real-Time Factor (< 1.0 = real-time)
#     "real_time": True
# }

CPU Inference

model = EigenWaveASR.from_pretrained("sakibhasan/eigenwave-asr", device="cpu")
text = model.transcribe("audio.wav", beam_width=10)  # smaller beam for speed

Without Language Model (faster, less accurate)

model = EigenWaveASR.from_pretrained("sakibhasan/eigenwave-asr", use_lm=False)
text = model.transcribe("audio.wav")

📊 Performance

Dataset Greedy WER Beam+LM WER
test-clean ~8.5% 6.36%
test-other ~20% ~15%

🏗️ Model Details

  • Architecture: Conformer-style encoder with Multi-Scale Robin Features
  • Parameters: 27.8M
  • Input: 16kHz mono audio
  • Output: English text (lowercase)
  • Training: LibriSpeech 960h, 182k steps
  • Features: Novel Robin differential operator feature extraction at scales [1, 3, 5]

⚡ Optimal Hyperparameters (Optuna-tuned)

alpha       = 0.9268   (LM weight)
beta        = 0.061    (word insertion bonus)
temperature = 0.536    (softmax sharpness)
beam_width  = 50       (beam search width)

📄 License

MIT License

👤 Author

Sakib Hasan (@sakibhasanml)

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

eigenwave_asr-1.0.0.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

eigenwave_asr-1.0.0-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file eigenwave_asr-1.0.0.tar.gz.

File metadata

  • Download URL: eigenwave_asr-1.0.0.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for eigenwave_asr-1.0.0.tar.gz
Algorithm Hash digest
SHA256 27deaa2a327954f13e2ba09505f1cde01f3f288ee2c16cfc1e97a3dc416ee315
MD5 aabc1d61fb6c2ebfc5b244cd2fd4f87d
BLAKE2b-256 c62ea49d9c4afdda89ee2fb8e1b9ab4f17121beab2846c96a23079cf99709c14

See more details on using hashes here.

File details

Details for the file eigenwave_asr-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: eigenwave_asr-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for eigenwave_asr-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 934a72a70a969f4018febf09884b708f15ba761b145b3c1a1e1f60568ca33b71
MD5 7c08b21228552322e2a6a9923044eceb
BLAKE2b-256 0b054ed9b7c2f1a42c883aac0bfef686c53e9ed3b3b7a915114b483af8f884ad

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page