Skip to content

release: stabilize TTS microservice integration, voice system, and UI improvements#46

Merged
Afdaan merged 41 commits into
masterfrom
development
Mar 19, 2026
Merged

release: stabilize TTS microservice integration, voice system, and UI improvements#46
Afdaan merged 41 commits into
masterfrom
development

Conversation

@Afdaan
Copy link
Copy Markdown
Owner

@Afdaan Afdaan commented Mar 19, 2026

Overview

This PR promotes the latest stable changes from development to production, focusing on TTS architecture, voice system improvements, UI enhancements, and dependency stabilization.


Key Changes

Voice System & TTS Architecture

  • Introduced structured voice handling via voice_helpers
  • Integrated !tts command with improved dispatch flow
  • Added support for:
    • Replied voice messages
    • Group-based TTS triggers
  • Fully migrated TTS processing to external microservice:
  • Removed bundled RVC and local voice model dependencies
  • Added voice and mood support in database schema

Admin & Command Improvements

  • Enhanced admin and voice commands to support:
    • User mentions
    • Reply-based targeting
  • Supported commands:
    • /voiceadd
    • /voiceremove
    • /addadmin
    • /removeadmin
  • Eliminates the need to manually input user IDs
  • Improves usability and reduces friction for admin operations

RVC & Voice Model Refactor (Deprecated Path Cleanup)

  • Removed internal RVC dependencies and local model handling
  • Cleaned up forced module reload logic and internal lib overrides
  • Transitioned architecture to microservice-based voice processing

UI & Interaction Improvements

  • Added animated loading UI with centralized helper
  • Improved loading timing, punctuation, and responsiveness
  • Added timeout handling to prevent stuck states
  • Enhanced error handling during async operations
  • Improved message editing and response flow

System & Backend Improvements

  • Introduced ChatActionSender with improved error handling
  • Refactored context handling using ContextManager
  • Improved handling of persona prompts with language awareness
  • Precomputed persona traits and relationship context for efficiency

Database & Structure Updates

  • Extended users table:
    • Added mood and voice columns
  • Refactored DB imports and migration flow

Dependency & Environment Stabilization

  • Downgraded faiss-cpu to 1.7.3
  • Adjusted torchaudio minimum to 2.6.0
  • Pinned pip <24.1
  • Removed omegaconf
  • Cleaned up and simplified deployment steps

Cleanup

  • Removed unused test files
  • Removed redundant Python installation steps
  • Simplified internal module structure

Notes

  • This release finalizes migration to microservice-based TTS architecture
  • Improves system stability, scalability, and maintainability
  • Reduces resource usage on the main bot service

Impact

  • More scalable and maintainable voice system
  • Reduced CPU and memory load on main service
  • Better admin experience with mention/reply support
  • Improved UX with smoother loading and responses
  • More stable dependency and deployment pipeline

Migration Notes

  • Ensure TTS microservice is deployed and accessible:
  • Apply database migrations for new users fields (mood, voice)
  • Verify environment dependencies match updated constraints

Afdaan and others added 30 commits February 9, 2026 19:52
Introduce voice-language and RVC-based voice features across the app. Adds a new DB migration (migrate_add_voice_language.py) and adds voice_language column to the User model (database/models.py); also updates the existing migration for voice_enabled. DatabaseManager gained getters/setters for user voice language and refactors for user creation/message saving. Core changes: settings reorganized, NLPEngine made resilient when transformers/torch are unavailable, Application now initializes a VoiceProcessor (when enabled) and registers VoiceHandler. Commands and responses updated to expose /voicelang and interactive language selection (callbacks), and new libs/rvc_python plus utility helpers were added. Run the new migration script from project root to update the database before enabling voice features.
Move voice generation to an external TTS microservice and remove the bundled rvc_python library. Key changes:

- .env.example: add TTS_SERVICE_URL, reorganize voice/NLP/DB settings and defaults.
- README: document new Alya-TTS microservice-based voice setup and update voice feature text.
- Removed libs/rvc_python package and related API/CLI/config files to stop bundling RVC internals.
- Added utils/tts_queue.py and integrated dispatching to queue TTS jobs rather than inlining heavy audio work.
- handlers/voice.py: refactored to translate and dispatch TTS via the queue, use DEFAULT_LANGUAGE, and avoid direct file-based TTS handling.
- handlers/conversation.py & core/bot.py: removed inline voice processing from conversation flow and updated handler wiring.
- database/database_manager.py: get_user_voice_language now falls back to user's language_code when voice_language is unset.
- handlers/admin.py: removed deployment manager/status command and cleaned up registration/logging.
- handlers/response/lang.py & handlers/commands.py: trimmed supported languages and updated voicelang labels.
- core/nlp.py: clarified torch <2.6 warning message.

Overall this refactor isolates audio workloads to a microservice, simplifies the bot code, and removes the bundled RVC implementation in favor of a separate TTS service and queued processing.
feat: add animated loading placeholder for AI response generation
feat: integrate TTS voice responses and improve response loading UX
@Afdaan Afdaan merged commit 4175866 into master Mar 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant