mirror of
https://github.com/leon-ai/leon.git
synced 2024-12-11 09:12:40 +03:00
refactor(server): replace HTML entities to whitespaces to respect TTS punctuations
This commit is contained in:
parent
d91a62ea7e
commit
3e133ea88c
@ -54,8 +54,8 @@ class Brain {
|
||||
|
||||
if (rawSpeech !== '') {
|
||||
if (process.env.LEON_TTS === 'true') {
|
||||
// Stripe HTML
|
||||
const speech = rawSpeech.replace(/<(?:.|\n)*?>/gm, '')
|
||||
// Stripe HTML to a whitespace. Whitespace to let the TTS respects punctuation
|
||||
const speech = rawSpeech.replace(/<(?:.|\n)*?>/gm, ' ')
|
||||
|
||||
this.tts.add(speech)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user