There are more AWS SDK examples available in the AWS Doc SDK Examples
Use ListSpeechSynthesisTasks with an AWS SDK or CLI
The following code examples show how to use ListSpeechSynthesisTasks.
- CLI
-
- AWS CLI
-
To list your speech synthesis tasks
The following
list-speech-synthesis-tasksexample lists your speech synthesis tasks.aws polly list-speech-synthesis-tasksOutput:
{ "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" } ] }For more information, see Creating long audio files in the Amazon Polly Developer Guide.
-
For API details, see ListSpeechSynthesisTasks
in AWS CLI Command Reference.
-
- SAP ABAP
-
- SDK for SAP ABAP
-
Note
There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository
. 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.-
For API details, see ListSpeechSynthesisTasks in AWS SDK for SAP ABAP API reference.
-