Skip to content

feat: add --text-only and --no-tts CLI flags to bypass audio dependencies - #36

Open
chetna123-ch wants to merge 5 commits into
Harshbansal8705:mainfrom
chetna123-ch:feature/text-only-mode
Open

chetna123-ch wants to merge 5 commits into
Harshbansal8705:mainfrom
chetna123-ch:feature/text-only-mode

Conversation

@chetna123-ch

@chetna123-ch chetna123-ch commented Oct 9, 2026 •

Copy link
Copy Markdown

Summary

This PR adds support for running DesktopAI in a text-only mode by introducing --text-only and --no-tts CLI flags. This removes mandatory audio hardware and dependency requirements, making the app accessible for headless environments, CI/CD pipelines, keyboard-first users, and developers without microphone access.

Problem

Previously, the app strictly required a working microphone, Porcupine access key, sounddevice streams, and speaker verification setup to start. This created setup blockers for:

  • Contributors testing logic without audio hardware.
  • Environments running on remote or headless servers/containers.
  • Automated CI/CD test runs.
  • Users who prefer typing over voice interaction.

Solution

  • Added --text-only CLI flag: Skips microphone initialization, Porcupine wake-word detection, and audio processing loops.
  • Added --no-tts CLI flag: Allows disabling Text-To-Speech output (automatically defaulted when running in --text-only mode or explicitly requested).
  • Updated configuration (src/config.py) to hold global states for TEXT_ONLY_MODE and NO_TTS.
  • Made heavy audio imports optional/lazy so environments lacking packages like pvporcupine, sounddevice, PyAudio, Resemblyzer, or torch can still run in text-only mode.

How to Test

  1. Text-Only Mode:
    python main.py --text-only
    

issue number #13

@Harshbansal8705

Copy link
Copy Markdown
Owner

Hi @chetna123-ch Please mention the issue number in PR description (#<issue number>) to link your PR with the issue, and resolve the merge conflicts.

@Harshbansal8705

Copy link
Copy Markdown
Owner

@chetna123-ch Please rebase your branch with the main

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.

2 participants