v2.2.0
What's New
- Voice Streaming: Real-time voice analysis over WebSocket with live transcription, safety alerts, and session summaries
- Credits Tracking: Added
credits_usedfield to all result models (BullyingResult, GroomingResult, UnsafeResult, etc.) - Documentation: Added voice streaming and credits tracking documentation to README
Voice Streaming
session = client.voice_stream(
config=VoiceStreamConfig(interval_seconds=10, analysis_types=["bullying", "unsafe"]),
handlers=VoiceStreamHandlers(
on_transcription=lambda e: print(f"Transcript: {e.text}"),
on_alert=lambda e: print(f"Alert: {e.category} ({e.severity})"),
),
)
await session.connect()
await session.send_audio(audio_bytes)
summary = await session.end()Install with voice support: pip install tuteliq[voice]