Skip to main content

🎙️ Auretrix

Unified Speech Recognition Library - Simplify speech-to-text with multi-provider support, auto-fallback, and Indian language focus.

PyPI version Python 3.8+ License: MIT


🚀 Features

  • 🔄 Multi-Provider Support - Whisper, Google Speech, AssemblyAI, Azure
  • 🛡️ Auto-Fallback - Automatically switches providers on failure
  • 💰 Cost Optimization - Intelligently chooses cheapest provider
  • 🇮🇳 Indian Languages - First-class support for Hindi, Tamil, Telugu, and 10+ Indian languages
  • 📝 Multiple Formats - Export to TXT, JSON, SRT, VTT
  • ⚡ Simple API - One-liner transcription
  • 🔧 Flexible - Use local models or cloud APIs

📦 Installation

# Basic installation
pip install auretrix

# With Whisper support (local transcription)
pip install auretrix[whisper]

# With all providers
pip install auretrix[all]

🎯 Quick Start

Simple Transcription

from auretrix import transcribe_audio

# One-liner transcription
text = transcribe_audio('meeting.mp3', language='hi-IN')
print(text)

Advanced Usage

from auretrix import SpeechRecognizer

# Initialize with multiple providers
recognizer = SpeechRecognizer(
    providers=['whisper', 'google', 'assemblyai'],
    auto_fallback=True,
    optimize_cost=True
)

# Transcribe with detailed results
result = recognizer.recognize('podcast.mp3', language='en-US')

print(f"Text: {result['text']}")
print(f"Provider: {result['provider']}")
print(f"Confidence: {result['confidence']}")

Batch Transcription

from auretrix import batch_transcribe

files = ['audio1.mp3', 'audio2.wav', 'audio3.m4a']
results = batch_transcribe(files, language='hi-IN')

for result in results:
    print(f"{result['file']}: {result['text']}")

Export to Subtitles

from auretrix import transcribe_file

# Generate SRT subtitles
result = transcribe_file(
    'video.mp4',
    output_format='srt',
    language='en-US',
    include_timestamps=True
)

print(f"Subtitles saved to: {result['output_file']}")

🌏 Language Support

Indian Languages

from auretrix.languages import INDIAN_LANGUAGES, list_indian_languages

# See all supported Indian languages
languages = list_indian_languages()
for lang in languages:
    print(f"{lang['name']} ({lang['native']}): {lang['code']}")

Supported Indian Languages:

  • 🇮🇳 Hindi (हिन्दी) - hi-IN
  • 🇮🇳 Bengali (বাংলা) - bn-IN
  • 🇮🇳 Telugu (తెలుగు) - te-IN
  • 🇮🇳 Marathi (मराठी) - mr-IN
  • 🇮🇳 Tamil (தமிழ்) - ta-IN
  • 🇮🇳 Gujarati (ગુજરાતી) - gu-IN
  • 🇮🇳 Kannada (ಕನ್ನಡ) - kn-IN
  • 🇮🇳 Malayalam (മലയാളം) - ml-IN
  • 🇮🇳 Punjabi (ਪੰਜਾਬੀ) - pa-IN
  • 🇮🇳 Urdu (اردو) - ur-IN
  • And more...

🔑 Provider Setup

Whisper (Local - Free)

from auretrix import SpeechRecognizer

# Use local Whisper model (no API key needed)
recognizer = SpeechRecognizer(
    providers=['whisper'],
    use_local=True,
    model='base'  # Options: tiny, base, small, medium, large
)

Google Speech API

export GOOGLE_SPEECH_API_KEY='your-api-key'
recognizer = SpeechRecognizer(providers=['google'])

AssemblyAI

export ASSEMBLYAI_API_KEY='your-api-key'

Azure Speech

export AZURE_SPEECH_KEY='your-key'
export AZURE_SPEECH_REGION='your-region'

💡 Use Cases

1. Podcast Transcription

result = transcribe_file(
    'podcast_episode.mp3',
    output_format='txt',
    language='en-US'
)

2. Meeting Notes

recognizer = SpeechRecognizer(providers=['whisper'])
result = recognizer.recognize('team_meeting.wav', language='hi-IN')

3. Video Subtitles

transcribe_file(
    'video.mp4',
    output_format='srt',
    include_timestamps=True
)

4. Multi-Language Content

# Detect and transcribe multiple languages
for audio_file, lang in [('hindi.mp3', 'hi-IN'), ('tamil.mp3', 'ta-IN')]:
    text = transcribe_audio(audio_file, language=lang)
    print(f"{lang}: {text}")

🛠️ Configuration

Environment Variables

# Optional API keys
export GOOGLE_SPEECH_API_KEY='...'
export ASSEMBLYAI_API_KEY='...'
export AZURE_SPEECH_KEY='...'
export AZURE_SPEECH_REGION='...'

Provider Priority

recognizer = SpeechRecognizer(
    providers=['whisper', 'google', 'assemblyai'],  # Priority order
    auto_fallback=True  # Auto switch on failure
)

Cost Optimization

recognizer = SpeechRecognizer(
    optimize_cost=True  # Chooses cheapest provider based on audio length
)

📊 Provider Comparison

Provider Cost Speed Languages Local
Whisper Free Fast 99+ ✅
Google $0.024/min Fast 125+ ❌
AssemblyAI $0.00025/sec Medium 99+ ❌
Azure $1/hour Fast 100+ ❌

🤝 Contributing

Contributions are welcome! Check out our Contributing Guide.


📄 License

MIT License - see LICENSE file.



💬 Support


Made with ❤️ by Auretrix AI

Building AI tools for creators, by creators.

Metadata

Release files for auretrix 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for auretrix 0.1.1
File Size Uploaded
auretrix-0.1.1.tar.gz 21.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for auretrix 0.1.1
File Interpreter ABI Platform
auretrix-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 44.9 kB

Release files / auretrix-0.1.1.tar.gz

Download URL auretrix-0.1.1.tar.gz
Size 21.6 kB
Tags Source
SHA-256 checksum
How to use checksums
2228544d89122288eac17a8c66adb05220ea298d59a396ad318175890e912830
BLAKE2b-256 checksum
How to use checksums
1ef4c2b1e64a5ff4ee6b31c9e4113d61d30bda9c90306efcbc22a1b10d61d704
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release files / auretrix-0.1.1-py3-none-any.whl

Download URL auretrix-0.1.1-py3-none-any.whl
Size 23.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0ef9df6229a65d005cdbf3a1f7041f1bf3c9dbda43e3205b355164fc74a94a9d
BLAKE2b-256 checksum
How to use checksums
ed99c58467645b60344b44892890c47570a3d75bfb866a9e58a2a39c3608e9ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page