fix: disable TTS cache + adjust BreakPilot pronunciation
All checks were successful
Build pitch-deck / build-push-deploy (push) Successful in 1m13s
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-consent (push) Successful in 29s
CI / test-python-voice (push) Successful in 31s
CI / test-bqas (push) Successful in 30s

This commit is contained in:
Benjamin Admin
2026-04-22 11:18:59 +02:00
parent 1a963f9e66
commit 9f61eea9f6

View File

@@ -33,8 +33,8 @@ export async function POST(request: NextRequest) {
let ttsText = text let ttsText = text
if (language === 'de') { if (language === 'de') {
ttsText = ttsText ttsText = ttsText
.replace(/BreakPilot/g, 'Brejk-Peilot') .replace(/BreakPilot/g, 'Brejk Peilott')
.replace(/Breakpilot/g, 'Brejk-Peilot') .replace(/Breakpilot/g, 'Brejk Peilott')
.replace(/COMPLAI/g, 'Complei') .replace(/COMPLAI/g, 'Complei')
.replace(/Executive Summary/g, 'Exekjutiv Sammäri') .replace(/Executive Summary/g, 'Exekjutiv Sammäri')
.replace(/Onepager/g, 'Wann-Päidscher') .replace(/Onepager/g, 'Wann-Päidscher')
@@ -100,7 +100,7 @@ async function synthesizeViaOvh(
return new NextResponse(new Uint8Array(wav), { return new NextResponse(new Uint8Array(wav), {
headers: { headers: {
'Content-Type': 'audio/wav', 'Content-Type': 'audio/wav',
'Cache-Control': 'public, max-age=86400', 'Cache-Control': 'no-cache',
'X-TTS-Source': 'ovh', 'X-TTS-Source': 'ovh',
}, },
}) })
@@ -124,7 +124,7 @@ async function synthesizeViaComplianceService(text: string, language: string): P
return new NextResponse(audioBuffer, { return new NextResponse(audioBuffer, {
headers: { headers: {
'Content-Type': 'audio/mpeg', 'Content-Type': 'audio/mpeg',
'Cache-Control': 'public, max-age=86400', 'Cache-Control': 'no-cache',
'X-TTS-Cache': res.headers.get('X-TTS-Cache') || 'unknown', 'X-TTS-Cache': res.headers.get('X-TTS-Cache') || 'unknown',
'X-TTS-Source': 'compliance', 'X-TTS-Source': 'compliance',
}, },