Merge pull request #416 from chriswritescode-dev/fix/tts-overlap-and-cache-race

fix(tts): prevent overlapping playback and corrupted audio cache
This commit is contained in:
Chris Scott authored and GitHub committed 2026-10-11 00:19:15 -04:00
commit 51e92d8cf2
9 files changed
+1145 -167

No files matched your search

+10
View File
@@ -11,6 +11,10 @@ export interface TTSVoicesResponse {
cached: boolean
}
export interface TTSClearCacheResponse {
cleared: number
}
export interface TTSStatusResponse {
enabled: boolean
configured: boolean
@@ -42,6 +46,12 @@ export const ttsApi = {
})
},
clearCache: async (): Promise<TTSClearCacheResponse> => {
return fetchWrapper(`${API_BASE_URL}/api/tts/cache`, {
method: 'DELETE',
})
},
synthesize: async (text: string, userId = 'default', signal?: AbortSignal): Promise<Blob> => {
return fetchWrapperBlob(`${API_BASE_URL}/api/tts/synthesize`, {
method: 'POST',