As traduções são geradas por tradução automática. Em caso de conflito entre o conteúdo da tradução e da versão original em inglês, a versão em inglês prevalecerá.
Use ListSpeechSynthesisTasks com um AWS SDK ou CLI
Os exemplos de código a seguir mostram como usar o ListSpeechSynthesisTasks.
- CLI
-
- AWS CLI
-
Para listar suas tarefas de síntese de fala
O exemplo list-speech-synthesis-tasks a seguir lista suas tarefas de síntese de fala.
aws polly list-speech-synthesis-tasks
Saída:
{
"SynthesisTasks": [
{
"TaskId": "70b61c0f-57ce-4715-a247-cae8729dcce9",
"TaskStatus": "completed",
"OutputUri": "https://s3.us-west-2.amazonaws.com/amzn-s3-demo-bucket/70b61c0f-57ce-4715-a247-cae8729dcce9.mp3",
"CreationTime": 1603911042.689,
"RequestCharacters": 1311,
"OutputFormat": "mp3",
"TextType": "text",
"VoiceId": "Joanna"
}
]
}
Para obter mais informações, consulte Criar arquivos de áudio longos no Guia do desenvolvedor do Amazon Polly.
- SAP ABAP
-
- SDK para SAP ABAP
-
TRY.
" Only pass optional parameters if they have values
IF iv_max_results IS NOT INITIAL AND iv_status IS NOT INITIAL.
oo_result = lo_ply->listspeechsynthesistasks(
iv_maxresults = iv_max_results
iv_status = iv_status ).
ELSEIF iv_max_results IS NOT INITIAL.
oo_result = lo_ply->listspeechsynthesistasks(
iv_maxresults = iv_max_results ).
ELSEIF iv_status IS NOT INITIAL.
oo_result = lo_ply->listspeechsynthesistasks(
iv_status = iv_status ).
ELSE.
oo_result = lo_ply->listspeechsynthesistasks( ).
ENDIF.
DATA(lt_tasks) = oo_result->get_synthesistasks( ).
DATA(lv_count) = lines( lt_tasks ).
MESSAGE |Found { lv_count } synthesis tasks| TYPE 'I'.
CATCH /aws1/cx_plyinvalidnexttokenex.
MESSAGE 'Invalid NextToken.' TYPE 'E'.
CATCH /aws1/cx_plyservicefailureex.
MESSAGE 'Service failure occurred.' TYPE 'E'.
ENDTRY.
Para obter uma lista completa dos guias do desenvolvedor do AWS SDK e exemplos de código, consulteUsar o Amazon Polly com um AWS SDK. Este tópico também inclui informações sobre como começar e detalhes sobre versões anteriores do SDK.