01 / DECIDE
架構決策
適合 accessibility、narration、preview 與 conversational feedback,且使用者能暫停或切回文字。
把 voice、format、chunking、playback 與 interruption 都當成產品決策,並揭露語音由 AI 生成。 先把 input、output、state 與 side effect 畫成一條可觀察路徑,再決定 把 synthetic speech 設計成有揭露的介面 要放在哪一層。
02 / BUILD
三步實作
- 01
框定合約
先寫下 caller、資料分類、成功條件、timeout、取消與 ownership。適合 accessibility、narration、preview 與 conversational feedback,且使用者能暫停或切回文字。
- 02
建立單一路徑
只實作一條 end-to-end path,保留 request correlation、typed state 與可逆 failure handling。把 voice、format、chunking、playback 與 interruption 都當成產品決策,並揭露語音由 AI 生成。
- 03
證明結果
把驗收寫成可重跑的 fixture、contract test 或 browser test。Playback test 涵蓋 first-byte latency、interruption、punctuation、多語文字、unsupported input 與 fallback rendering。
03 / BOUND
Production 邊界
未經授權不可模仿真人;需保留揭露,且重要資訊要有非語音路徑。
04 / PROVE
驗收證據
Playback test 涵蓋 first-byte latency、interruption、punctuation、多語文字、unsupported input 與 fallback rendering。
SOURCE / HTTP
可重現來源探針
curl -fsSI 'https://developers.openai.com/api/docs/guides/text-to-speech' | sed -n '1,5p'