narrow-chef-71655
10/08/2025, 10:21 AMtall-airline-16756
10/08/2025, 10:21 AMtall-airline-16756
10/08/2025, 10:22 AMnarrow-chef-71655
10/08/2025, 10:24 AMtall-airline-16756
10/08/2025, 10:24 AMnarrow-chef-71655
10/08/2025, 10:24 AMtall-airline-16756
10/08/2025, 10:25 AMlibrosa.effects.time_stretch, which lets you tweak the speed factor easily.
• Adjust Pitch: If you want to shift the pitch without affecting speed, librosa.effects.pitch_shift is your friend. It’s great for fine-tuning the audio.
• Integrate with LiveKit: Consider overriding the realtime_audio_output_node method in your agent class to apply these real-time transformations. Using AudioByteStream helps with smooth buffering and processing of audio frames.
• Use Built-In Speed Parameter: The RealtimeModel class actually has a speed parameter (default is 1.0). Feel free to experiment with this when you initialize the model to find what works best.
• Ensure Audio Compatibility: Make sure your audio is resampled to the format expected (like 24kHz mono) using tools such as rtc.AudioResampler. This step can really help keep things consistent.
To make things easier, here are some detailed examples you might find useful:
• Speedup Output Audio Example
• Realtime Pitch Shift Example
If you have any questions or want a hand implementing these, please don’t hesitate to reach out. I’m here to support you every step of the way!
Sources: livekit-plugins/livekit-plugins-minimax/livekit/plugins/minimax/tts.py | docs/index.yaml | plugins/openai/src/realtime/realtime_model.ts