Quick start
This guide will help you transcribe your first audio file using Tafrigh.Initialize the library
First, import and initialize Tafrigh with your Wit.ai API key:You can provide multiple API keys to enable concurrent processing and avoid rate limits:
Transcribe an audio file
Now you can transcribe any audio or video file supported by FFmpeg:Understanding the output
Thetranscribe function returns an array of segments with timestamps:
text- The transcribed textstart- Start time in secondsend- End time in secondsconfidence(optional) - Confidence score between 0 and 1tokens(optional) - Word-by-word breakdown with individual timestamps
Add progress tracking
Monitor transcription progress with callbacks:Enable logging
Use any logger that implements the Logger interface:Environment variables
You can also set API keys using environment variables:Complete example
Here’s a complete example that puts it all together:Next steps
Advanced configuration
Learn about all available configuration options
Error handling
Handle failures and resume failed transcriptions
Noise reduction
Optimize audio preprocessing for better accuracy
API reference
Explore the complete API documentation