AWS Polly Speech Generation: Is it possible to produce speech plus speech marks in one call?

1

I need both speech output (as .MP3) and speechMarks output (as .JSON). Currently, I'm using two calls from the CLI based on the documentation, one call to generate each one for the same text.

I believe that means I'm getting billed twice for the same text. Is this correct? Are you billed twice, once for audio, and a second time for speech marks?

Also, this takes two calls / more time / seems to duplicate effort / the server must be doing the same computation twice.

Is there a way to make a single call that generates both speech audio output (mp3) and SpeechMarks (json) in a single call, and/or a way to pay once rather than twice for the same text?

Related question / Similar issue: I also need multiple speech variants for the same text to allow for end-user preferences (eg different voices, different speed/prosody). Is there a way to batch generate multiple sets of speech output from a single call to decrease speech generation cost for this situation, rather than paying for 2x the amount of text for each small variant?

Would prefer to do this using the CLI, but also fine to use tasks, the js API, the python API, etc.

Here are the docs with examples of the calls to generate audio and SpeechMarks:

https://docs.amazonaws.cn/en_us/polly/latest/dg/using-speechmarks.html

https://docs.amazonaws.cn/en_us/polly/latest/dg/get-started-cli-exercise.html

Thanks for your help

ccccc
posta 2 anni fa306 visualizzazioni
1 Risposta
0

Hello,

It's not possible to call both speech audio output (mp3) and SpeechMarks (json) in a single API call. One API call can only provide audio output (or) speech marks output. Also, it's currently not possible to pass different outputs for input parameters in same API call. For different speech variants outputs, different API calls needs to be initiated.

AWS
TECNICO DI SUPPORTO
Ayush_S
con risposta 2 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande