Skip to content

Commit

Permalink
fix: cosinus spelling in indo
Browse files Browse the repository at this point in the history
  • Loading branch information
Cranbaerry committed Oct 5, 2024
1 parent 6d9fc64 commit f189c6a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/api/tts/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ export async function POST(req: Request) {
const tts = new MsEdgeTTS();

// Replace "cos" with "kos" to avoid Azure TTS mispronouncing it as "cos" in Bahasa Indonesia
const processedText = text.replace(/\bcos\b/gi, 'kos');
let processedText = text;
if (language === 'id-ID') processedText = text.replace(/\bcos\b/gi, 'kos').replace(/\bcosinus\b/gi, 'kosinus');

// VOICE LIST: https://gist.github.com/BettyJJ/17cbaa1de96235a7f5773b8690a20462
const langDetails = getLanguageDetailsById(language);
Expand Down

0 comments on commit f189c6a

Please sign in to comment.