Using TTS models like Omnivoice with AI models
17:58 17 Jun 2026

this might not be an Omnivoice issue. I'm programming a bot that can respond with voice commands. I tried Omnivoice and loved the results, but since I'm already using the Gemma 4 model via llama.cpp for the bot, when Omnivoice is activated, it generates and sends the audio file. However, when Gemma receives another message, its speed drops drastically, from about 40t/s to about 10t/s. I'm new to this and have researched it. I tried using:

del model

gc.collect()

if torch.cuda.is_available():

torch.cuda.empty_cache()

torch.cuda.ipc_collect()

To free up VRAM, and while it works, it doesn't solve the problem.

Another solution was to use Omnivoice in a separate Python file and call it in my main bot as a subprocess, ensuring that the system releases everything when it finishes, but that didn't work either.

I don't know if anyone developing something similar or familiar with it could help me. Thanks.

Before of load Omnivoice:
Before

After of load Omnivoice:
After

python bots agent ollama gemma