Merge pull request #1814 from omnivore-app/fix/strip-emojis-for-realistic-speech

Strip emojis on realistic speech text
This commit is contained in:
Jackson Harper 2023-02-16 19:40:57 +08:00 committed by GitHub
commit 9584267c48
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,6 +4,7 @@ import {
TextToSpeechOutput,
} from './textToSpeech'
import axios from 'axios'
import { stripEmojis } from './htmlToSsml'
const getRealisticVoiceId = (name: string | undefined) => {
const voiceList = [
@ -57,7 +58,7 @@ export class RealisticTextToSpeech implements TextToSpeech {
const response = await axios.post<Buffer>(
requestUrl,
{
text: input.text,
text: stripEmojis(input.text),
},
{
headers: HEADERS,