Skip to content

TTSKit: add pausePlayback/resumePlayback to AudioOutput#480

Open
yemreak wants to merge 2 commits into
argmaxinc:mainfrom
yemreak:fix/ttskit-audiooutput-pause-resume
Open

TTSKit: add pausePlayback/resumePlayback to AudioOutput#480
yemreak wants to merge 2 commits into
argmaxinc:mainfrom
yemreak:fix/ttskit-audiooutput-pause-resume

Conversation

@yemreak
Copy link
Copy Markdown

@yemreak yemreak commented May 18, 2026

Summary

Exposes pause and resume controls on TTSKit.AudioOutput so callers can suspend playback (e.g., when the user takes the mic or switches tasks) and resume it without tearing down the audio engine. Mirrors the existing scheduleBuffer / teardown lifecycle.

Motivation

We hit this in a dictation/TTS pipeline where a hotkey toggles between recording and speaking; today the only escape is to stop and recreate the engine, which adds latency and drops scheduled buffers.

Changes

  • pausePlayback()playerNode.pause()
  • resumePlayback() — restart the engine if it was stopped and resume the player

Testing

Verified locally inside an optionOS dictation/TTS pipeline that toggles playback frequently. Existing teardown path unchanged.

a2they and others added 2 commits May 1, 2026 16:11
Exposes pause and resume controls on the TTSKit AudioOutput so
callers can suspend playback (e.g., when the user takes the mic
or switches tasks) and resume it without tearing down the audio
engine. Mirrors the existing schedule/teardown lifecycle.

Tested locally inside an optionOS dictation/TTS pipeline that
toggles playback frequently.
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