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