本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
ListSpeechSynthesisTasks与 Amazon SDK 或 CLI 配合使用
以下代码示例演示如何使用 ListSpeechSynthesisTasks。
- CLI
-
- Amazon CLI
-
列出您的语音合成任务
以下
list-speech-synthesis-tasks示例列出了您的语音合成任务。aws polly list-speech-synthesis-tasks输出:
{ "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" } ] }有关更多信息,请参阅《Amazon Polly 开发人员指南》中的创建长音频文件。
-
有关 API 的详细信息,请参阅Amazon CLI 命令参考ListSpeechSynthesisTasks
中的。
-
- SAP ABAP
-
- 适用于 SAP ABAP 的 SDK
-
注意
还有更多相关信息 GitHub。在 Amazon 代码示例存储库
中查找完整示例,了解如何进行设置和运行。 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.-
有关 API 的详细信息,请参阅适用ListSpeechSynthesisTasks于 S AP 的Amazon SDK ABAP API 参考。
-
有关 S Amazon DK 开发者指南和代码示例的完整列表,请参阅将 Amazon Polly 与 Amazon SDK 结合使用。本主题还包括有关入门的信息以及有关先前的 SDK 版本的详细信息。
ListLexicons
PutLexicon