Skip to content

Voice: make the "Speaking" indicator tappable to stop TTS #128

Description

@serge-ivo

Feature Request

Current

While the agent is speaking, the voice status pill shows a "Speaking…" label. It is purely informational — the pill is not interactive in that state (resolveVoiceStatus returns tap: false for the speak tone), so there's no quick way to stop playback except waiting it out or using another control.

Desired

Show a stop affordance on the Speaking pill — e.g. "Speaking · tap to stop" — and make the pill tappable in that state. Tapping it should immediately cancel the current TTS (and any queued speech), the same as voice.cancelSpeak().

  • Current: Speaking…
  • Desired: Speaking · tap to stop, and tapping calls the TTS stop/cancel immediately.

Likely files

  • packages/sdk/src/voice/convo.tsresolveVoiceStatus() builds the pill ({ label, tone, tap, icon }); the speaking branch currently returns label: "Speaking…", tap: false.
  • store/console/src/pages/InstanceDetail.tsx — renders the status pill (onClick={s.tap ? voice.toggleTalk : undefined}).
  • agents/coder/web/src/CopilotView.tsx — renders the same status pill.
  • packages/sdk/src/voice/use-voice.tscancelSpeak() (the stop function), already exposed on the hook.

Notes

  • The pill's tap currently routes to toggleTalk; for the Speaking state it must route to cancelSpeak instead. Simplest: keep tap as "is the pill interactive" and pick the action by tone (speak → cancelSpeak, else toggleTalk).
  • Applies to both the Assistant chat (InstanceDetail) and the Co-pilot (CopilotView).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestvoiceVoice / STT / TTS

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions