Strip emojis on realistic speech text

This commit is contained in:
Jackson Harper
2023-02-16 19:16:01 +08:00
parent 9acce06744
commit d484d26f98

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,