Merge branch 'main' of ssh://gitea.meghsakha.com:22222/Benjamin_Boenisch/breakpilot-core
All checks were successful
Build pitch-deck / build-push-deploy (push) Successful in 1m9s
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 36s
CI / test-python-voice (push) Successful in 34s
CI / test-bqas (push) Successful in 33s

This commit is contained in:
Benjamin Admin
2026-04-17 08:36:07 +02:00
6 changed files with 676 additions and 3 deletions

View File

@@ -154,12 +154,10 @@ export default function ChatFAB({
ttsAbortRef.current = controller
try {
const textLang = /[äöüÄÖÜß]|(?:^|\s)(?:das|die|der|und|ist|wir|ein|für|mit|auf|von|den|des)\s/i.test(cleanText) ? 'de' : lang
const res = await fetch('/api/presenter/tts', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
// Detect response language from text content (not UI language)
// German text typically contains umlauts, ß, or common German words
const textLang = /[äöüÄÖÜß]|(?:^|\s)(?:das|die|der|und|ist|wir|ein|für|mit|auf|von|den|des)\s/i.test(cleanText) ? 'de' : lang
body: JSON.stringify({ text: cleanText, language: textLang }),
signal: controller.signal,
})