Troubleshooting
This guide covers common issues you might encounter while using ChatbotAI-Free and how to resolve them.Ollama Connection Issues
Error: 'Connection refused' or 'Ollama not responding'
Error: 'Connection refused' or 'Ollama not responding'
- App crashes on startup or when sending messages
- Console shows
ConnectionErrororConnection refused - “I’m sorry, I couldn’t process that request” message appears
Reinstall Ollama if needed
Error: Model 'llama3.1:8b' not found
Error: Model 'llama3.1:8b' not found
- “Model not found” errors when sending messages
- Dropdown shows models that don’t work
LLM responses are extremely slow
LLM responses are extremely slow
- Long delays (30+ seconds) before responses start
- UI freezes during generation
-
Use a smaller model:
llama3.2:3b(3 billion parameters) is much faster thanllama3.1:8b- Try
tinyllama:1.1bfor testing
-
Check GPU utilization:
If you have an NVIDIA GPU, Ollama should be using it. If not, reinstall Ollama.
-
Increase context window:
- Go to Settings → Advanced → Context Window Size
- Try setting to 4096 or 8192 (smaller = faster)
Kokoro Model Issues
Error: 'Kokoro not available' or TTS returns silence
Error: 'Kokoro not available' or TTS returns silence
- No voice output (silent)
- Console shows:
⚠ Kokoro not availableorTTS not available, returning silence - App starts but voice doesn’t work
kokoro-v1.0.onnx and voices-v1.0.bin).Solution:Download Kokoro files
kokoro-v1.0.onnx(~300 MB)voices-v1.0.bin(~27 MB)
Voice sounds robotic or distorted
Voice sounds robotic or distorted
- TTS output is choppy or robotic
- Audio has static or artifacts
-
Try a different voice:
- Use the voice dropdown to select a different Kokoro voice
- Some voices are higher quality than others
-
Adjust voice speed:
- Settings → Voice Speed → Try 0.9x or 1.1x
- Extreme speeds (< 0.6x or > 1.8x) can cause artifacts
-
Check GPU acceleration:
If you installed
onnxruntime-gpu:GPU acceleration significantly improves TTS quality.
Audio Device Problems
Error: 'paInvalidSampleRate' or microphone not working
Error: 'paInvalidSampleRate' or microphone not working
- Console shows:
paInvalidSampleRateorAudio status: [error] - Recording doesn’t capture any audio
- Recording stops immediately
-
Select correct input device:
- Settings → Audio Input Device → Select your microphone
- Try different devices in the dropdown
-
Test microphone in terminal:
-
Check permissions (Linux):
No audio output / Can't hear TTS
No audio output / Can't hear TTS
- Bot generates responses but no sound plays
- Console shows:
paplay not found, falling back to sounddevice - Other apps play audio fine
-
Install paplay (PipeWire/PulseAudio):
-
Select correct output device:
- Settings → Audio Output Device → Select your speakers/headphones
-
Test audio manually:
paplay to avoid ALSA device locking. This allows TTS to play simultaneously with YouTube, music players, etc.Echo or feedback loop during Live Mode
Echo or feedback loop during Live Mode
- Bot hears its own voice and responds to itself
- Continuous loop of responses
- Use headphones (best solution)
- Reduce speaker volume
- Increase microphone threshold:
- Edit
audio_utils.py:16 - Change
silence_threshold=0.03to0.05or higher
- Edit
GPU & CUDA Issues
CUDA not detected / Using CPU instead of GPU
CUDA not detected / Using CPU instead of GPU
- Console shows:
CUDA available: False - Whisper and TTS are slow
nvidia-smishows GPU but app doesn’t use it
Out of VRAM / CUDA out of memory
Out of VRAM / CUDA out of memory
RuntimeError: CUDA out of memory- App crashes during transcription or TTS
-
Use smaller Whisper model:
- Settings → Whisper Model → Select
baseorsmallinstead ofmediumorlarge-v3
- Settings → Whisper Model → Select
-
Use int8 quantization:
- Edit
ai_manager.py:55 - Change
self._compute_type = "float16"to"int8"
- Edit
-
Close other GPU applications:
Whisper Model Errors
Whisper downloads model every time / Model not found
Whisper downloads model every time / Model not found
- “Downloading model…” on every startup
- Slow first transcription (30+ seconds)
~/.cache/huggingface/hub/ but may fail to download on slow connections.Solution:Download models manually:Transcription returns empty text or hallucinations
Transcription returns empty text or hallucinations
- Whisper returns: “Thank you”, “Subscribe”, ”…” for real speech
- Short recordings transcribed as empty
-
Speak longer (> 1 second)
- The app filters audio shorter than 1 second
- Try speaking for 2-3 seconds
-
Check microphone volume:
If too quiet, increase microphone gain in system settings.
-
Disable hallucination filter (if needed):
- Edit
ai_manager.py:133-143 - Comment out the hallucination phrase checks
- (Not recommended - may cause false positives)
- Edit
Transcription is in wrong language
Transcription is in wrong language
- Spanish speech transcribed as English (or vice versa)
- Nonsensical transcriptions
- Settings → Language → Select “Spanish” or “English”
- The app sets Whisper’s
languageparameter accordingly (enores)
Voice Detection Issues
Recording doesn't stop / Listens forever
Recording doesn't stop / Listens forever
- Microphone button stays red indefinitely
- No transcription after 30 seconds
- Reduce background noise (close windows, turn off fans)
-
Increase silence threshold:
- Edit
audio_utils.py:16 - Change
silence_threshold=0.03to0.05
- Edit
-
Use manual send mode:
- Settings → Recording Mode → Disable “Auto-send after silence”
- Click mic button twice: once to start, once to stop
Recording stops too early
Recording stops too early
- Long sentences get cut off mid-speech
- Transcription only captures first few words
-
Increase silence duration:
- Edit
audio_utils.py:16 - Change
silence_duration=3.0to5.0(seconds)
- Edit
- Speak continuously without long pauses
-
Lower silence threshold:
- Edit
audio_utils.py:16 - Change
silence_threshold=0.03to0.02
- Edit
PDF Document Chat Issues
PDF attachment fails or shows 'Could not extract text'
PDF attachment fails or shows 'Could not extract text'
- PDF upload button does nothing
- Error dialog: “Failed to extract text”
-
Install PyMuPDF:
-
Check PDF format:
- Scanned PDFs (images) won’t work without OCR
- Use text-based PDFs only
- Try a different PDF - Some encrypted PDFs block text extraction
Context window overflow after attaching PDF
Context window overflow after attaching PDF
- Dialog shows: “Document exceeds context window”
- Token count is red in confirmation dialog
-
Use a model with larger context:
llama3.1:8bsupports 128K tokensmistralsupports 32K tokens
-
Increase context window override:
- Settings → Advanced → Context Window Size
- Set to 32768 or 65536 (if model supports it)
- Use a shorter PDF or extract only relevant pages
General Performance Issues
App is slow or UI freezes
App is slow or UI freezes
-
Use smaller models:
- Whisper:
baseinstead ofmediumorlarge-v3 - Ollama:
llama3.2:3binstead ofllama3.1:8b
- Whisper:
- Enable GPU acceleration (see CUDA section above)
- Close other apps to free RAM and VRAM
-
Reduce font size:
- Settings → Font Size → Small
- Less markdown rendering overhead
Getting More Help
If you’re still experiencing issues:-
Check the console output for detailed error messages:
- Search GitHub issues: ChatbotAI-Free Issues
-
Open a new issue with:
- Operating system and version
- Python version (
python --version) - Full console output (
debug.log) - Steps to reproduce the problem