Skip to content

Feature Request: Add Speech Input Support (--listen mode) #70

@VJLIVE

Description

@VJLIVE

Description:

Enable users to speak natural language commands using their microphone, which PromptShell will convert to text and then process as a query. This makes the tool more accessible, hands-free, and faster to use in some workflows.

Expected Behavior:

  • Add a CLI flag:
--listen
  • PromptShell will:
    • Activate the microphone
    • Convert speech to text (via offline/online models)
    • Show transcribed text as a normal query
    • Send it to the LLM
    • Display the result

Dependencies:

Test case example:

$ promptshell --listen
🎤 Listening... (press Ctrl+C to stop)

User said: "List all Python files modified in the last 2 days"

Response:
find . -name "*.py" -mtime -2

Challenges

  1. Cross-platform microphone access
  2. Error handling if mic access fails
  3. Optional fallback to text if no speech detected

Benefits:

  1. Greatly improves accessibility
  2. Useful for hands-free use cases (e.g., DevOps, on-the-go scripting)
  3. Helps differently-abled users interact with the shell via voice

Metadata

Metadata

Assignees

Labels

AdvancedComplex changes needing deep architectural understanding.SSoC25Part of Social Summer of Code 2025. Tag for recognition.enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions