ProjectTech4DevAI / ProjectTech4DevAI/kaapi-backend
TTS: Normalize input text handling
@Prajna1999 ci sta già lavorando.
Dal 28/7/2026.
- Lingua principale
- Python
- Stelle
- 18
- Fork
- 10
- Merge medio
- 2g 20h
- PR unite (30g)
- 14
Descrizione
Is your feature request related to a problem?
The same payload for TTS sometimes succeeds and sometimes fails with a misleading config error. This causes confusion, especially when dealing with Marathi/Devanagari text that includes emojis, markdown, and new line escapes.
Describe the solution you'd like
- Normalize/sanitize text before TTS calls.
- Investigate with the provider regarding the issues.
- Explore if rule-based emoji stripping could affect speech quality since emojis might provide tonal context.
Original issue
Describe the current behavior
Same payload sometimes succeeds, sometimes fails with a misleading config error. Text is Marathi/Devanagari with emojis, markdown, and \n escapes.
eg
Getting the Failure message for TTS
[KAAPI] Invalid or unexpected parameter in Config: 'NoneType' object is not subscriptable. Review the completion config; one of the parameters does not match the provider's expected signature.
This is the payload:
{"voice":"Kore","text":"🎲 **अंक मोजणी साठी TLM**\n\n🧒 **क्रियाकलाप 1: लेटर बिंगो** \n- **साहित्य:** \n - कार्डबोर्ड \n - ए4 कागद \n - स्केल \n - स्केच पेन \n\n- **काय करायचे?** \n 1. कार्डबोर्डवर अकारांचे बिंगो खेळण्याचे ग्रिड तयार करा. \n 2. प्रत्येक बॉक्समध्ये एक अक्षर लिहा. \n 3. मुलांना डाएस किंवा बिंगो चिठ्ठ्या देऊन खेळवा. \n 4. जो पहिला बिंगो पुर्ण करतो, तो विजेता ठरावा. \n\n🌱 **शिक्षणाचा फायदा** \nअक्षरांची ओळख, आवाजाची ओळख, आणि सामाजिक संवाद कौशल्ये विकसित होते.\n\n🧒 **क्रियाकलाप 2: पाण्याच्या श्रोत परी** \n- **साहित्य:** \n - पाण्यात जात असलेले गोटे वा चीक \n\n- **काय करायचे?** \n 1. मुलांना पाण्यात गोटे फेकायला सांगा. \n 2. प्रत्येक गोट्यामध्ये संख्या लिहा. \n 3. त्यांच्या गोट्यांवरून संख्या ओळखायला सांगा. \n 4. गोटे गोळा करण्याची स्पर्धा आयोजित करा. \n\n🌱 **शिक्षणाचा फायदा** \nसंख्यांची मोजणी, स्पर्धात्मक भावना, आणि शारीरिक क्रिया यांचे संगम होते.\n\n✨ तुम्हाला या क्रियाकलापांबद्दल अधिक माहिती हवी का? 😊","provider":"google-native","organization_id":190,"model":"gemini-3.1-flash-tts-preview"}
Describe the enhancement you'd like
Normalize/sanitize text before TTS call. Follow-up = investigate with provider. Open question: Could rule-based emoji stripping hurt speech quality if emojis add tonal context? No confirmed case yet, but worth checking.
Additional context
Add any other context, metrics, screenshots, or examples about the enhancement here.
https://aistudio.google.com/learn/gemini-tts-prompt-guide-with-tags
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Valutazione
Questa issue non è ancora stata valutata.