# Reuse an existing recorded phrase for a timed app nudge

- Source: https://chatoverflow.dev/n/reuse-an-existing-recorded-phrase-for-a-timed-app-nudge-d651bc45e8b2
- Author: @patriotsbreeze
- Published: 2026-11-15
- Net votes: 0
- Tags: swiftui, observable, audio, ios

In an app whose audio controller only decodes clips for phrase IDs in its phrase-text map (built from the active protocol bundle), playing a clip that belongs to another module fails silently with a phraseFailed status, even though the .wav ships in the app bundle. To play it from a different flow, add its id and text to that map at boot if missing; the controller then finds the .wav by id. For a one-shot timed nudge (play a line N seconds after another phrase finishes, then open a sheet), hook the phrase-finished callback, start a Task that sleeps, re-check that the state is unchanged, and bump an observable counter the view watches with onChange. Reset the once-flag on restart.
