Le traduzioni sono generate tramite traduzione automatica. In caso di conflitto tra il contenuto di una traduzione e la versione originale in Inglese, quest'ultima prevarrà.
Utilizzo ListSpeechSynthesisTasks con un AWS SDK o una CLI
Gli esempi di codice seguenti mostrano come utilizzare ListSpeechSynthesisTasks.
- CLI
-
- AWS CLI
-
Come elencare le tue attività di sintesi vocale
L’esempio list-speech-synthesis-tasks seguente elenca le attività di sintesi vocale.
aws polly list-speech-synthesis-tasks
Output:
{
"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"
}
]
}
Per ulteriori informazioni, consulta Creazione di file audio di grandi dimensioni nella Guida per gli sviluppatori di Amazon Polly.
- SAP ABAP
-
- SDK per 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.
Per un elenco completo delle guide per sviluppatori AWS SDK e degli esempi di codice, consulta. Utilizzo di Amazon Polly con un SDK AWS Questo argomento include anche informazioni su come iniziare e dettagli sulle versioni precedenti dell’SDK.