Add language and rate in the cloud task params

This commit is contained in:
Hongbo Wu
2022-11-08 16:22:23 +08:00
parent 769e8c5f96
commit ddd1e84686
2 changed files with 9 additions and 3 deletions

View File

@ -345,6 +345,8 @@ export const enqueueTextToSpeech = async ({
queue = 'omnivore-demo-text-to-speech-queue',
location = env.gcp.location,
isUltraRealisticVoice = false,
language,
rate,
}: {
userId: string
speechId: string
@ -356,6 +358,8 @@ export const enqueueTextToSpeech = async ({
queue?: string
location?: string
isUltraRealisticVoice?: boolean
language?: string
rate?: string
}): Promise<string> => {
const { GOOGLE_CLOUD_PROJECT } = process.env
const payload = {
@ -365,6 +369,8 @@ export const enqueueTextToSpeech = async ({
bucket,
textType,
isUltraRealisticVoice,
language,
rate,
}
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore