Skip to main content

Unified speech recognition library with multi-provider support and Indian language focus

Project description

🎙️ 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.


🔗 Links


💬 Support


Made with ❤️ by Auretrix AI

Building AI tools for creators, by creators.

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

auretrix-0.1.1.tar.gz (21.6 kB view details)

Uploaded Source

Built Distribution

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

auretrix-0.1.1-py3-none-any.whl (23.3 kB view details)

Uploaded Python 3

File details

Details for the file auretrix-0.1.1.tar.gz.

File metadata

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

File hashes

Hashes for auretrix-0.1.1.tar.gz
Algorithm Hash digest
SHA256 2228544d89122288eac17a8c66adb05220ea298d59a396ad318175890e912830
MD5 886de7a66380983775c7cd0954382eee
BLAKE2b-256 1ef4c2b1e64a5ff4ee6b31c9e4113d61d30bda9c90306efcbc22a1b10d61d704

See more details on using hashes here.

File details

Details for the file auretrix-0.1.1-py3-none-any.whl.

File metadata

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

File hashes

Hashes for auretrix-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0ef9df6229a65d005cdbf3a1f7041f1bf3c9dbda43e3205b355164fc74a94a9d
MD5 83400202cf1f5d0e1a921bef4ac5fb2b
BLAKE2b-256 ed99c58467645b60344b44892890c47570a3d75bfb866a9e58a2a39c3608e9ac

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