I’m building a daily reminiscence app for my grandfather on iPad using Scriptable. It:
- Loads a simple JSON profile
- Calls the OpenAI Chat API to generate a gentle question
- Presents it via
Alert
+ Speech - Uses
Dictation.start()
to capture his spoken answer - Writes both Q&A into a local JSON log
Most of the code is working, but I keep hitting two errors in my Console log:
Console log
2025-05-10 17:17:15: Reminiscence app starting: 5:17:15 PM
2025-05-10 17:17:15: Generating question…
2025-05-10 17:17:16: OpenAI API Error: Error: No question generated
2025-05-10 17:17:16: Presenting question: Margaret, do you remember any special songs you enjoyed when you were younger?
2025-05-10 17:17:19: Starting dictation…
2025-05-10 17:17:25: Dictation error: Error: Recognizing the audio failed. Please try again.
2025-05-10 17:17:25: Saved conversation entry
2025-05-10 17:17:25: Presenting thanks for response: [No response recorded]
What I’ve tried so far
- OpenAI “no question generated”
- Verified
OPENAI_API_KEY
is set and valid - Logged out the raw response from
https://api.openai.com/v1/chat/completions
- Fallback to hard-coded questions works if I disable
useOpenAI
- Verified
- Dictation error
- Confirmed Scriptable has microphone permission
- Tried both
FileManager.local()
andFileManager.iCloud()
(for writing) - Wrapped
await Dictation.start()
intry/catch
My two big questions are
- OpenAI: Why does my call sometimes throw “No question generated”? Is my request payload malformed, or is Scriptable handling the JSON response incorrectly?
- Dictation: What steps are required to get reliable speech-to-text in Scriptable? The prompt appears, but
Dictation.start()
always fails with “Recognizing the audio failed.”
Any pointers on how to debug these two errors (or better patterns for calling OpenAI + Dictation in Scriptable) would be hugely appreciated. Thank you!