diff --git a/clients/aws-sdk-transcribe-streaming/CHANGELOG.md b/clients/aws-sdk-transcribe-streaming/CHANGELOG.md new file mode 100644 index 0000000..f675f6b --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/CHANGELOG.md @@ -0,0 +1,8 @@ +# Changelog + +## Unreleased + +## v0.0.1 + +### Features +* Initial client release with support for current Amazon Transcribe Streaming operations. diff --git a/clients/aws-sdk-transcribe-streaming/LICENSE b/clients/aws-sdk-transcribe-streaming/LICENSE new file mode 100644 index 0000000..67db858 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/LICENSE @@ -0,0 +1,175 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. diff --git a/clients/aws-sdk-transcribe-streaming/NOTICE b/clients/aws-sdk-transcribe-streaming/NOTICE new file mode 100644 index 0000000..616fc58 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/NOTICE @@ -0,0 +1 @@ +Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/clients/aws-sdk-transcribe-streaming/README.md b/clients/aws-sdk-transcribe-streaming/README.md new file mode 100644 index 0000000..6b1cbfa --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/README.md @@ -0,0 +1,13 @@ +## Amazon Transcribe Streaming Service Client + +The `aws_sdk_transcribe_streaming` client is still under active developement. +Changes may result in breaking changes prior to the release of version +1.0.0. + +### Documentation + +Documentation is available in the `/docs` directory of this package. +Pages can be built into portable HTML files for the time being. You can +follow the instructions in the docs [README.md](https://github.com/awslabs/aws-sdk-python/blob/main/clients/aws-sdk-transcribe-streaming/docs/README.md). + +For high-level documentation, you can view the [`dev-guide`](https://github.com/awslabs/aws-sdk-python/tree/main/dev-guide) at the top level of this repo. diff --git a/clients/aws-sdk-transcribe-streaming/docs/Makefile b/clients/aws-sdk-transcribe-streaming/docs/Makefile new file mode 100644 index 0000000..59458fa --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/Makefile @@ -0,0 +1,15 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +SPHINXBUILD = sphinx-build +BUILDDIR = build +SERVICESDIR = source/reference/services +SPHINXOPTS = -j auto +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(SPHINXOPTS) . + +clean: + -rm -rf $(BUILDDIR)/* + +html: + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." diff --git a/clients/aws-sdk-transcribe-streaming/docs/README.md b/clients/aws-sdk-transcribe-streaming/docs/README.md new file mode 100644 index 0000000..141b2c7 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/README.md @@ -0,0 +1,10 @@ +## Generating Documentation + +Sphinx is used for documentation. You can generate HTML locally with the +following: + +``` +$ uv pip install --group docs . +$ cd docs +$ make html +``` diff --git a/clients/aws-sdk-transcribe-streaming/docs/client/__init__.py b/clients/aws-sdk-transcribe-streaming/docs/client/__init__.py new file mode 100644 index 0000000..247be3e --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/client/__init__.py @@ -0,0 +1 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. diff --git a/clients/aws-sdk-transcribe-streaming/docs/client/get_medical_scribe_stream.rst b/clients/aws-sdk-transcribe-streaming/docs/client/get_medical_scribe_stream.rst new file mode 100644 index 0000000..5fe7a3c --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/client/get_medical_scribe_stream.rst @@ -0,0 +1,25 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +get_medical_scribe_stream +========================= + +.. automethod:: aws_sdk_transcribe_streaming.client.TranscribeStreamingClient.get_medical_scribe_stream + +.. toctree:: + :hidden: + :maxdepth: 2 + +================= +Input: +================= + +.. autoclass:: aws_sdk_transcribe_streaming.models.GetMedicalScribeStreamInput + :members: + +================= +Output: +================= + +.. autoclass:: aws_sdk_transcribe_streaming.models.GetMedicalScribeStreamOutput + :members: diff --git a/clients/aws-sdk-transcribe-streaming/docs/client/index.rst b/clients/aws-sdk-transcribe-streaming/docs/client/index.rst new file mode 100644 index 0000000..371f32a --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/client/index.rst @@ -0,0 +1,11 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +Client +======= +.. toctree:: + :maxdepth: 1 + :titlesonly: + :glob: + + * diff --git a/clients/aws-sdk-transcribe-streaming/docs/client/start_call_analytics_stream_transcription.rst b/clients/aws-sdk-transcribe-streaming/docs/client/start_call_analytics_stream_transcription.rst new file mode 100644 index 0000000..25a0b14 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/client/start_call_analytics_stream_transcription.rst @@ -0,0 +1,25 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +start_call_analytics_stream_transcription +========================================= + +.. automethod:: aws_sdk_transcribe_streaming.client.TranscribeStreamingClient.start_call_analytics_stream_transcription + +.. toctree:: + :hidden: + :maxdepth: 2 + +================= +Input: +================= + +.. autoclass:: aws_sdk_transcribe_streaming.models.StartCallAnalyticsStreamTranscriptionInput + :members: + +================= +Output: +================= + +.. autoclass:: aws_sdk_transcribe_streaming.models.StartCallAnalyticsStreamTranscriptionOutput + :members: diff --git a/clients/aws-sdk-transcribe-streaming/docs/client/start_medical_scribe_stream.rst b/clients/aws-sdk-transcribe-streaming/docs/client/start_medical_scribe_stream.rst new file mode 100644 index 0000000..d48c9f9 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/client/start_medical_scribe_stream.rst @@ -0,0 +1,25 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +start_medical_scribe_stream +=========================== + +.. automethod:: aws_sdk_transcribe_streaming.client.TranscribeStreamingClient.start_medical_scribe_stream + +.. toctree:: + :hidden: + :maxdepth: 2 + +================= +Input: +================= + +.. autoclass:: aws_sdk_transcribe_streaming.models.StartMedicalScribeStreamInput + :members: + +================= +Output: +================= + +.. autoclass:: aws_sdk_transcribe_streaming.models.StartMedicalScribeStreamOutput + :members: diff --git a/clients/aws-sdk-transcribe-streaming/docs/client/start_medical_stream_transcription.rst b/clients/aws-sdk-transcribe-streaming/docs/client/start_medical_stream_transcription.rst new file mode 100644 index 0000000..5adf99a --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/client/start_medical_stream_transcription.rst @@ -0,0 +1,25 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +start_medical_stream_transcription +================================== + +.. automethod:: aws_sdk_transcribe_streaming.client.TranscribeStreamingClient.start_medical_stream_transcription + +.. toctree:: + :hidden: + :maxdepth: 2 + +================= +Input: +================= + +.. autoclass:: aws_sdk_transcribe_streaming.models.StartMedicalStreamTranscriptionInput + :members: + +================= +Output: +================= + +.. autoclass:: aws_sdk_transcribe_streaming.models.StartMedicalStreamTranscriptionOutput + :members: diff --git a/clients/aws-sdk-transcribe-streaming/docs/client/start_stream_transcription.rst b/clients/aws-sdk-transcribe-streaming/docs/client/start_stream_transcription.rst new file mode 100644 index 0000000..d910aca --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/client/start_stream_transcription.rst @@ -0,0 +1,25 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +start_stream_transcription +========================== + +.. automethod:: aws_sdk_transcribe_streaming.client.TranscribeStreamingClient.start_stream_transcription + +.. toctree:: + :hidden: + :maxdepth: 2 + +================= +Input: +================= + +.. autoclass:: aws_sdk_transcribe_streaming.models.StartStreamTranscriptionInput + :members: + +================= +Output: +================= + +.. autoclass:: aws_sdk_transcribe_streaming.models.StartStreamTranscriptionOutput + :members: diff --git a/clients/aws-sdk-transcribe-streaming/docs/conf.py b/clients/aws-sdk-transcribe-streaming/docs/conf.py new file mode 100644 index 0000000..c6b9c11 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/conf.py @@ -0,0 +1,24 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +import os +import sys + +sys.path.insert(0, os.path.abspath("..")) + +project = "Amazon Transcribe Streaming Service" +author = "Amazon Web Services" +release = "0.0.1" + +extensions = ["sphinx.ext.autodoc", "sphinx.ext.viewcode"] + +templates_path = ["_templates"] +exclude_patterns = [] + +autodoc_default_options = { + "exclude-members": "deserialize,deserialize_kwargs,serialize,serialize_members" +} + +html_theme = "pydata_sphinx_theme" +html_theme_options = {"logo": {"text": "Amazon Transcribe Streaming Service"}} + +autodoc_typehints = "description" diff --git a/clients/aws-sdk-transcribe-streaming/docs/index.rst b/clients/aws-sdk-transcribe-streaming/docs/index.rst new file mode 100644 index 0000000..1b4bc25 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/index.rst @@ -0,0 +1,12 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +Amazon Transcribe Streaming Service +=================================== + +.. toctree:: + :maxdepth: 2 + :titlesonly: + :glob: + + */index diff --git a/clients/aws-sdk-transcribe-streaming/docs/make.bat b/clients/aws-sdk-transcribe-streaming/docs/make.bat new file mode 100644 index 0000000..3245132 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/make.bat @@ -0,0 +1,35 @@ +REM Code generated by smithy-python-codegen DO NOT EDIT. + +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set BUILDDIR=build +set SERVICESDIR=source/reference/services +set SPHINXOPTS=-j auto +set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . + +if "%1" == "" goto help + +if "%1" == "clean" ( + rmdir /S /Q %BUILDDIR% + goto end +) + +if "%1" == "html" ( + %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html + echo. + echo "Build finished. The HTML pages are in %BUILDDIR%/html." + goto end +) + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/Alternative.rst b/clients/aws-sdk-transcribe-streaming/docs/models/Alternative.rst new file mode 100644 index 0000000..ee174ab --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/Alternative.rst @@ -0,0 +1,8 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +Alternative +=========== + +.. autoclass:: aws_sdk_transcribe_streaming.models.Alternative + :members: diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/AudioEvent.rst b/clients/aws-sdk-transcribe-streaming/docs/models/AudioEvent.rst new file mode 100644 index 0000000..4bf335b --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/AudioEvent.rst @@ -0,0 +1,8 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +AudioEvent +========== + +.. autoclass:: aws_sdk_transcribe_streaming.models.AudioEvent + :members: diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/AudioStream.rst b/clients/aws-sdk-transcribe-streaming/docs/models/AudioStream.rst new file mode 100644 index 0000000..f4339e7 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/AudioStream.rst @@ -0,0 +1,9 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +.. _AudioStream: + +AudioStream +=========== + +.. autodata:: aws_sdk_transcribe_streaming.models.AudioStream diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/AudioStreamAudioEvent.rst b/clients/aws-sdk-transcribe-streaming/docs/models/AudioStreamAudioEvent.rst new file mode 100644 index 0000000..af2cb41 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/AudioStreamAudioEvent.rst @@ -0,0 +1,9 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +.. _AudioStreamAudioEvent: + +AudioStreamAudioEvent +===================== + +.. autoclass:: aws_sdk_transcribe_streaming.models.AudioStreamAudioEvent diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/AudioStreamConfigurationEvent.rst b/clients/aws-sdk-transcribe-streaming/docs/models/AudioStreamConfigurationEvent.rst new file mode 100644 index 0000000..7434ac7 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/AudioStreamConfigurationEvent.rst @@ -0,0 +1,9 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +.. _AudioStreamConfigurationEvent: + +AudioStreamConfigurationEvent +============================= + +.. autoclass:: aws_sdk_transcribe_streaming.models.AudioStreamConfigurationEvent diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/AudioStreamUnknown.rst b/clients/aws-sdk-transcribe-streaming/docs/models/AudioStreamUnknown.rst new file mode 100644 index 0000000..ce98717 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/AudioStreamUnknown.rst @@ -0,0 +1,9 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +.. _AudioStreamUnknown: + +AudioStreamUnknown +================== + +.. autoclass:: aws_sdk_transcribe_streaming.models.AudioStreamUnknown diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/BadRequestException.rst b/clients/aws-sdk-transcribe-streaming/docs/models/BadRequestException.rst new file mode 100644 index 0000000..c576514 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/BadRequestException.rst @@ -0,0 +1,9 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +BadRequestException +=================== + +.. autoexception:: aws_sdk_transcribe_streaming.models.BadRequestException + :members: + :show-inheritance: diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/CallAnalyticsEntity.rst b/clients/aws-sdk-transcribe-streaming/docs/models/CallAnalyticsEntity.rst new file mode 100644 index 0000000..b2250c4 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/CallAnalyticsEntity.rst @@ -0,0 +1,8 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +CallAnalyticsEntity +=================== + +.. autoclass:: aws_sdk_transcribe_streaming.models.CallAnalyticsEntity + :members: diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/CallAnalyticsItem.rst b/clients/aws-sdk-transcribe-streaming/docs/models/CallAnalyticsItem.rst new file mode 100644 index 0000000..9f61e32 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/CallAnalyticsItem.rst @@ -0,0 +1,8 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +CallAnalyticsItem +================= + +.. autoclass:: aws_sdk_transcribe_streaming.models.CallAnalyticsItem + :members: diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/CallAnalyticsLanguageWithScore.rst b/clients/aws-sdk-transcribe-streaming/docs/models/CallAnalyticsLanguageWithScore.rst new file mode 100644 index 0000000..c3e7cdd --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/CallAnalyticsLanguageWithScore.rst @@ -0,0 +1,8 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +CallAnalyticsLanguageWithScore +============================== + +.. autoclass:: aws_sdk_transcribe_streaming.models.CallAnalyticsLanguageWithScore + :members: diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/CallAnalyticsTranscriptResultStream.rst b/clients/aws-sdk-transcribe-streaming/docs/models/CallAnalyticsTranscriptResultStream.rst new file mode 100644 index 0000000..edd3755 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/CallAnalyticsTranscriptResultStream.rst @@ -0,0 +1,9 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +.. _CallAnalyticsTranscriptResultStream: + +CallAnalyticsTranscriptResultStream +=================================== + +.. autodata:: aws_sdk_transcribe_streaming.models.CallAnalyticsTranscriptResultStream diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/CallAnalyticsTranscriptResultStreamBadRequestException.rst b/clients/aws-sdk-transcribe-streaming/docs/models/CallAnalyticsTranscriptResultStreamBadRequestException.rst new file mode 100644 index 0000000..2857cf2 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/CallAnalyticsTranscriptResultStreamBadRequestException.rst @@ -0,0 +1,9 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +.. _CallAnalyticsTranscriptResultStreamBadRequestException: + +CallAnalyticsTranscriptResultStreamBadRequestException +====================================================== + +.. autoclass:: aws_sdk_transcribe_streaming.models.CallAnalyticsTranscriptResultStreamBadRequestException diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/CallAnalyticsTranscriptResultStreamCategoryEvent.rst b/clients/aws-sdk-transcribe-streaming/docs/models/CallAnalyticsTranscriptResultStreamCategoryEvent.rst new file mode 100644 index 0000000..c4d4441 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/CallAnalyticsTranscriptResultStreamCategoryEvent.rst @@ -0,0 +1,9 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +.. _CallAnalyticsTranscriptResultStreamCategoryEvent: + +CallAnalyticsTranscriptResultStreamCategoryEvent +================================================ + +.. autoclass:: aws_sdk_transcribe_streaming.models.CallAnalyticsTranscriptResultStreamCategoryEvent diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/CallAnalyticsTranscriptResultStreamConflictException.rst b/clients/aws-sdk-transcribe-streaming/docs/models/CallAnalyticsTranscriptResultStreamConflictException.rst new file mode 100644 index 0000000..7055f3f --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/CallAnalyticsTranscriptResultStreamConflictException.rst @@ -0,0 +1,9 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +.. _CallAnalyticsTranscriptResultStreamConflictException: + +CallAnalyticsTranscriptResultStreamConflictException +==================================================== + +.. autoclass:: aws_sdk_transcribe_streaming.models.CallAnalyticsTranscriptResultStreamConflictException diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/CallAnalyticsTranscriptResultStreamInternalFailureException.rst b/clients/aws-sdk-transcribe-streaming/docs/models/CallAnalyticsTranscriptResultStreamInternalFailureException.rst new file mode 100644 index 0000000..733bc5f --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/CallAnalyticsTranscriptResultStreamInternalFailureException.rst @@ -0,0 +1,9 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +.. _CallAnalyticsTranscriptResultStreamInternalFailureException: + +CallAnalyticsTranscriptResultStreamInternalFailureException +=========================================================== + +.. autoclass:: aws_sdk_transcribe_streaming.models.CallAnalyticsTranscriptResultStreamInternalFailureException diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/CallAnalyticsTranscriptResultStreamLimitExceededException.rst b/clients/aws-sdk-transcribe-streaming/docs/models/CallAnalyticsTranscriptResultStreamLimitExceededException.rst new file mode 100644 index 0000000..008ef72 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/CallAnalyticsTranscriptResultStreamLimitExceededException.rst @@ -0,0 +1,9 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +.. _CallAnalyticsTranscriptResultStreamLimitExceededException: + +CallAnalyticsTranscriptResultStreamLimitExceededException +========================================================= + +.. autoclass:: aws_sdk_transcribe_streaming.models.CallAnalyticsTranscriptResultStreamLimitExceededException diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/CallAnalyticsTranscriptResultStreamServiceUnavailableException.rst b/clients/aws-sdk-transcribe-streaming/docs/models/CallAnalyticsTranscriptResultStreamServiceUnavailableException.rst new file mode 100644 index 0000000..6853d26 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/CallAnalyticsTranscriptResultStreamServiceUnavailableException.rst @@ -0,0 +1,9 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +.. _CallAnalyticsTranscriptResultStreamServiceUnavailableException: + +CallAnalyticsTranscriptResultStreamServiceUnavailableException +============================================================== + +.. autoclass:: aws_sdk_transcribe_streaming.models.CallAnalyticsTranscriptResultStreamServiceUnavailableException diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/CallAnalyticsTranscriptResultStreamUnknown.rst b/clients/aws-sdk-transcribe-streaming/docs/models/CallAnalyticsTranscriptResultStreamUnknown.rst new file mode 100644 index 0000000..62f8856 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/CallAnalyticsTranscriptResultStreamUnknown.rst @@ -0,0 +1,9 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +.. _CallAnalyticsTranscriptResultStreamUnknown: + +CallAnalyticsTranscriptResultStreamUnknown +========================================== + +.. autoclass:: aws_sdk_transcribe_streaming.models.CallAnalyticsTranscriptResultStreamUnknown diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/CallAnalyticsTranscriptResultStreamUtteranceEvent.rst b/clients/aws-sdk-transcribe-streaming/docs/models/CallAnalyticsTranscriptResultStreamUtteranceEvent.rst new file mode 100644 index 0000000..e932f2a --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/CallAnalyticsTranscriptResultStreamUtteranceEvent.rst @@ -0,0 +1,9 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +.. _CallAnalyticsTranscriptResultStreamUtteranceEvent: + +CallAnalyticsTranscriptResultStreamUtteranceEvent +================================================= + +.. autoclass:: aws_sdk_transcribe_streaming.models.CallAnalyticsTranscriptResultStreamUtteranceEvent diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/CategoryEvent.rst b/clients/aws-sdk-transcribe-streaming/docs/models/CategoryEvent.rst new file mode 100644 index 0000000..95606c4 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/CategoryEvent.rst @@ -0,0 +1,8 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +CategoryEvent +============= + +.. autoclass:: aws_sdk_transcribe_streaming.models.CategoryEvent + :members: diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/ChannelDefinition.rst b/clients/aws-sdk-transcribe-streaming/docs/models/ChannelDefinition.rst new file mode 100644 index 0000000..2c2b54d --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/ChannelDefinition.rst @@ -0,0 +1,8 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +ChannelDefinition +================= + +.. autoclass:: aws_sdk_transcribe_streaming.models.ChannelDefinition + :members: diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/CharacterOffsets.rst b/clients/aws-sdk-transcribe-streaming/docs/models/CharacterOffsets.rst new file mode 100644 index 0000000..301b03a --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/CharacterOffsets.rst @@ -0,0 +1,8 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +CharacterOffsets +================ + +.. autoclass:: aws_sdk_transcribe_streaming.models.CharacterOffsets + :members: diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/ClinicalNoteGenerationResult.rst b/clients/aws-sdk-transcribe-streaming/docs/models/ClinicalNoteGenerationResult.rst new file mode 100644 index 0000000..d569b4b --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/ClinicalNoteGenerationResult.rst @@ -0,0 +1,8 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +ClinicalNoteGenerationResult +============================ + +.. autoclass:: aws_sdk_transcribe_streaming.models.ClinicalNoteGenerationResult + :members: diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/ClinicalNoteGenerationSettings.rst b/clients/aws-sdk-transcribe-streaming/docs/models/ClinicalNoteGenerationSettings.rst new file mode 100644 index 0000000..3ed0212 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/ClinicalNoteGenerationSettings.rst @@ -0,0 +1,8 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +ClinicalNoteGenerationSettings +============================== + +.. autoclass:: aws_sdk_transcribe_streaming.models.ClinicalNoteGenerationSettings + :members: diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/ConfigurationEvent.rst b/clients/aws-sdk-transcribe-streaming/docs/models/ConfigurationEvent.rst new file mode 100644 index 0000000..ab14a02 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/ConfigurationEvent.rst @@ -0,0 +1,8 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +ConfigurationEvent +================== + +.. autoclass:: aws_sdk_transcribe_streaming.models.ConfigurationEvent + :members: diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/ConflictException.rst b/clients/aws-sdk-transcribe-streaming/docs/models/ConflictException.rst new file mode 100644 index 0000000..a2b0aff --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/ConflictException.rst @@ -0,0 +1,9 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +ConflictException +================= + +.. autoexception:: aws_sdk_transcribe_streaming.models.ConflictException + :members: + :show-inheritance: diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/Entity.rst b/clients/aws-sdk-transcribe-streaming/docs/models/Entity.rst new file mode 100644 index 0000000..3285153 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/Entity.rst @@ -0,0 +1,8 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +Entity +====== + +.. autoclass:: aws_sdk_transcribe_streaming.models.Entity + :members: diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/InternalFailureException.rst b/clients/aws-sdk-transcribe-streaming/docs/models/InternalFailureException.rst new file mode 100644 index 0000000..5037404 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/InternalFailureException.rst @@ -0,0 +1,9 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +InternalFailureException +======================== + +.. autoexception:: aws_sdk_transcribe_streaming.models.InternalFailureException + :members: + :show-inheritance: diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/IssueDetected.rst b/clients/aws-sdk-transcribe-streaming/docs/models/IssueDetected.rst new file mode 100644 index 0000000..a697448 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/IssueDetected.rst @@ -0,0 +1,8 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +IssueDetected +============= + +.. autoclass:: aws_sdk_transcribe_streaming.models.IssueDetected + :members: diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/Item.rst b/clients/aws-sdk-transcribe-streaming/docs/models/Item.rst new file mode 100644 index 0000000..e4a6385 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/Item.rst @@ -0,0 +1,8 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +Item +==== + +.. autoclass:: aws_sdk_transcribe_streaming.models.Item + :members: diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/LanguageWithScore.rst b/clients/aws-sdk-transcribe-streaming/docs/models/LanguageWithScore.rst new file mode 100644 index 0000000..340adef --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/LanguageWithScore.rst @@ -0,0 +1,8 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +LanguageWithScore +================= + +.. autoclass:: aws_sdk_transcribe_streaming.models.LanguageWithScore + :members: diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/LimitExceededException.rst b/clients/aws-sdk-transcribe-streaming/docs/models/LimitExceededException.rst new file mode 100644 index 0000000..d4c037a --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/LimitExceededException.rst @@ -0,0 +1,9 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +LimitExceededException +====================== + +.. autoexception:: aws_sdk_transcribe_streaming.models.LimitExceededException + :members: + :show-inheritance: diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/MedicalAlternative.rst b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalAlternative.rst new file mode 100644 index 0000000..d145a1d --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalAlternative.rst @@ -0,0 +1,8 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +MedicalAlternative +================== + +.. autoclass:: aws_sdk_transcribe_streaming.models.MedicalAlternative + :members: diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/MedicalEntity.rst b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalEntity.rst new file mode 100644 index 0000000..5e2e50f --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalEntity.rst @@ -0,0 +1,8 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +MedicalEntity +============= + +.. autoclass:: aws_sdk_transcribe_streaming.models.MedicalEntity + :members: diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/MedicalItem.rst b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalItem.rst new file mode 100644 index 0000000..0bc804e --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalItem.rst @@ -0,0 +1,8 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +MedicalItem +=========== + +.. autoclass:: aws_sdk_transcribe_streaming.models.MedicalItem + :members: diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/MedicalResult.rst b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalResult.rst new file mode 100644 index 0000000..e7a7025 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalResult.rst @@ -0,0 +1,8 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +MedicalResult +============= + +.. autoclass:: aws_sdk_transcribe_streaming.models.MedicalResult + :members: diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeAudioEvent.rst b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeAudioEvent.rst new file mode 100644 index 0000000..26d7dea --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeAudioEvent.rst @@ -0,0 +1,8 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +MedicalScribeAudioEvent +======================= + +.. autoclass:: aws_sdk_transcribe_streaming.models.MedicalScribeAudioEvent + :members: diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeChannelDefinition.rst b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeChannelDefinition.rst new file mode 100644 index 0000000..50417c9 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeChannelDefinition.rst @@ -0,0 +1,8 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +MedicalScribeChannelDefinition +============================== + +.. autoclass:: aws_sdk_transcribe_streaming.models.MedicalScribeChannelDefinition + :members: diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeConfigurationEvent.rst b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeConfigurationEvent.rst new file mode 100644 index 0000000..bab62c1 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeConfigurationEvent.rst @@ -0,0 +1,8 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +MedicalScribeConfigurationEvent +=============================== + +.. autoclass:: aws_sdk_transcribe_streaming.models.MedicalScribeConfigurationEvent + :members: diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeContext.rst b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeContext.rst new file mode 100644 index 0000000..df72ef9 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeContext.rst @@ -0,0 +1,8 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +MedicalScribeContext +==================== + +.. autoclass:: aws_sdk_transcribe_streaming.models.MedicalScribeContext + :members: diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeEncryptionSettings.rst b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeEncryptionSettings.rst new file mode 100644 index 0000000..4eae4d7 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeEncryptionSettings.rst @@ -0,0 +1,8 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +MedicalScribeEncryptionSettings +=============================== + +.. autoclass:: aws_sdk_transcribe_streaming.models.MedicalScribeEncryptionSettings + :members: diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeInputStream.rst b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeInputStream.rst new file mode 100644 index 0000000..96c37ee --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeInputStream.rst @@ -0,0 +1,9 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +.. _MedicalScribeInputStream: + +MedicalScribeInputStream +======================== + +.. autodata:: aws_sdk_transcribe_streaming.models.MedicalScribeInputStream diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeInputStreamAudioEvent.rst b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeInputStreamAudioEvent.rst new file mode 100644 index 0000000..0a8229e --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeInputStreamAudioEvent.rst @@ -0,0 +1,9 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +.. _MedicalScribeInputStreamAudioEvent: + +MedicalScribeInputStreamAudioEvent +================================== + +.. autoclass:: aws_sdk_transcribe_streaming.models.MedicalScribeInputStreamAudioEvent diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeInputStreamConfigurationEvent.rst b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeInputStreamConfigurationEvent.rst new file mode 100644 index 0000000..7a62924 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeInputStreamConfigurationEvent.rst @@ -0,0 +1,9 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +.. _MedicalScribeInputStreamConfigurationEvent: + +MedicalScribeInputStreamConfigurationEvent +========================================== + +.. autoclass:: aws_sdk_transcribe_streaming.models.MedicalScribeInputStreamConfigurationEvent diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeInputStreamSessionControlEvent.rst b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeInputStreamSessionControlEvent.rst new file mode 100644 index 0000000..8900307 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeInputStreamSessionControlEvent.rst @@ -0,0 +1,9 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +.. _MedicalScribeInputStreamSessionControlEvent: + +MedicalScribeInputStreamSessionControlEvent +=========================================== + +.. autoclass:: aws_sdk_transcribe_streaming.models.MedicalScribeInputStreamSessionControlEvent diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeInputStreamUnknown.rst b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeInputStreamUnknown.rst new file mode 100644 index 0000000..063c2c3 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeInputStreamUnknown.rst @@ -0,0 +1,9 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +.. _MedicalScribeInputStreamUnknown: + +MedicalScribeInputStreamUnknown +=============================== + +.. autoclass:: aws_sdk_transcribe_streaming.models.MedicalScribeInputStreamUnknown diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribePatientContext.rst b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribePatientContext.rst new file mode 100644 index 0000000..f73f6fe --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribePatientContext.rst @@ -0,0 +1,8 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +MedicalScribePatientContext +=========================== + +.. autoclass:: aws_sdk_transcribe_streaming.models.MedicalScribePatientContext + :members: diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribePostStreamAnalyticsResult.rst b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribePostStreamAnalyticsResult.rst new file mode 100644 index 0000000..bf0f57f --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribePostStreamAnalyticsResult.rst @@ -0,0 +1,8 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +MedicalScribePostStreamAnalyticsResult +====================================== + +.. autoclass:: aws_sdk_transcribe_streaming.models.MedicalScribePostStreamAnalyticsResult + :members: diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribePostStreamAnalyticsSettings.rst b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribePostStreamAnalyticsSettings.rst new file mode 100644 index 0000000..807ec06 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribePostStreamAnalyticsSettings.rst @@ -0,0 +1,8 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +MedicalScribePostStreamAnalyticsSettings +======================================== + +.. autoclass:: aws_sdk_transcribe_streaming.models.MedicalScribePostStreamAnalyticsSettings + :members: diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeResultStream.rst b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeResultStream.rst new file mode 100644 index 0000000..1833384 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeResultStream.rst @@ -0,0 +1,9 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +.. _MedicalScribeResultStream: + +MedicalScribeResultStream +========================= + +.. autodata:: aws_sdk_transcribe_streaming.models.MedicalScribeResultStream diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeResultStreamBadRequestException.rst b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeResultStreamBadRequestException.rst new file mode 100644 index 0000000..c54f1b2 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeResultStreamBadRequestException.rst @@ -0,0 +1,9 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +.. _MedicalScribeResultStreamBadRequestException: + +MedicalScribeResultStreamBadRequestException +============================================ + +.. autoclass:: aws_sdk_transcribe_streaming.models.MedicalScribeResultStreamBadRequestException diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeResultStreamConflictException.rst b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeResultStreamConflictException.rst new file mode 100644 index 0000000..6eacead --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeResultStreamConflictException.rst @@ -0,0 +1,9 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +.. _MedicalScribeResultStreamConflictException: + +MedicalScribeResultStreamConflictException +========================================== + +.. autoclass:: aws_sdk_transcribe_streaming.models.MedicalScribeResultStreamConflictException diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeResultStreamInternalFailureException.rst b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeResultStreamInternalFailureException.rst new file mode 100644 index 0000000..60731be --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeResultStreamInternalFailureException.rst @@ -0,0 +1,9 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +.. _MedicalScribeResultStreamInternalFailureException: + +MedicalScribeResultStreamInternalFailureException +================================================= + +.. autoclass:: aws_sdk_transcribe_streaming.models.MedicalScribeResultStreamInternalFailureException diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeResultStreamLimitExceededException.rst b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeResultStreamLimitExceededException.rst new file mode 100644 index 0000000..2b3ae11 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeResultStreamLimitExceededException.rst @@ -0,0 +1,9 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +.. _MedicalScribeResultStreamLimitExceededException: + +MedicalScribeResultStreamLimitExceededException +=============================================== + +.. autoclass:: aws_sdk_transcribe_streaming.models.MedicalScribeResultStreamLimitExceededException diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeResultStreamServiceUnavailableException.rst b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeResultStreamServiceUnavailableException.rst new file mode 100644 index 0000000..23b9d09 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeResultStreamServiceUnavailableException.rst @@ -0,0 +1,9 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +.. _MedicalScribeResultStreamServiceUnavailableException: + +MedicalScribeResultStreamServiceUnavailableException +==================================================== + +.. autoclass:: aws_sdk_transcribe_streaming.models.MedicalScribeResultStreamServiceUnavailableException diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeResultStreamTranscriptEvent.rst b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeResultStreamTranscriptEvent.rst new file mode 100644 index 0000000..6c60845 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeResultStreamTranscriptEvent.rst @@ -0,0 +1,9 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +.. _MedicalScribeResultStreamTranscriptEvent: + +MedicalScribeResultStreamTranscriptEvent +======================================== + +.. autoclass:: aws_sdk_transcribe_streaming.models.MedicalScribeResultStreamTranscriptEvent diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeResultStreamUnknown.rst b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeResultStreamUnknown.rst new file mode 100644 index 0000000..42940ee --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeResultStreamUnknown.rst @@ -0,0 +1,9 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +.. _MedicalScribeResultStreamUnknown: + +MedicalScribeResultStreamUnknown +================================ + +.. autoclass:: aws_sdk_transcribe_streaming.models.MedicalScribeResultStreamUnknown diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeSessionControlEvent.rst b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeSessionControlEvent.rst new file mode 100644 index 0000000..3943c66 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeSessionControlEvent.rst @@ -0,0 +1,8 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +MedicalScribeSessionControlEvent +================================ + +.. autoclass:: aws_sdk_transcribe_streaming.models.MedicalScribeSessionControlEvent + :members: diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeStreamDetails.rst b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeStreamDetails.rst new file mode 100644 index 0000000..f55a4a4 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeStreamDetails.rst @@ -0,0 +1,8 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +MedicalScribeStreamDetails +========================== + +.. autoclass:: aws_sdk_transcribe_streaming.models.MedicalScribeStreamDetails + :members: diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeTranscriptEvent.rst b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeTranscriptEvent.rst new file mode 100644 index 0000000..97d0f77 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeTranscriptEvent.rst @@ -0,0 +1,8 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +MedicalScribeTranscriptEvent +============================ + +.. autoclass:: aws_sdk_transcribe_streaming.models.MedicalScribeTranscriptEvent + :members: diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeTranscriptItem.rst b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeTranscriptItem.rst new file mode 100644 index 0000000..0e6387e --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeTranscriptItem.rst @@ -0,0 +1,8 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +MedicalScribeTranscriptItem +=========================== + +.. autoclass:: aws_sdk_transcribe_streaming.models.MedicalScribeTranscriptItem + :members: diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeTranscriptSegment.rst b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeTranscriptSegment.rst new file mode 100644 index 0000000..ea22bcb --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalScribeTranscriptSegment.rst @@ -0,0 +1,8 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +MedicalScribeTranscriptSegment +============================== + +.. autoclass:: aws_sdk_transcribe_streaming.models.MedicalScribeTranscriptSegment + :members: diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/MedicalTranscript.rst b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalTranscript.rst new file mode 100644 index 0000000..86463a6 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalTranscript.rst @@ -0,0 +1,8 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +MedicalTranscript +================= + +.. autoclass:: aws_sdk_transcribe_streaming.models.MedicalTranscript + :members: diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/MedicalTranscriptEvent.rst b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalTranscriptEvent.rst new file mode 100644 index 0000000..9b76292 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalTranscriptEvent.rst @@ -0,0 +1,8 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +MedicalTranscriptEvent +====================== + +.. autoclass:: aws_sdk_transcribe_streaming.models.MedicalTranscriptEvent + :members: diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/MedicalTranscriptResultStream.rst b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalTranscriptResultStream.rst new file mode 100644 index 0000000..66b7ed7 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalTranscriptResultStream.rst @@ -0,0 +1,9 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +.. _MedicalTranscriptResultStream: + +MedicalTranscriptResultStream +============================= + +.. autodata:: aws_sdk_transcribe_streaming.models.MedicalTranscriptResultStream diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/MedicalTranscriptResultStreamBadRequestException.rst b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalTranscriptResultStreamBadRequestException.rst new file mode 100644 index 0000000..805ea08 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalTranscriptResultStreamBadRequestException.rst @@ -0,0 +1,9 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +.. _MedicalTranscriptResultStreamBadRequestException: + +MedicalTranscriptResultStreamBadRequestException +================================================ + +.. autoclass:: aws_sdk_transcribe_streaming.models.MedicalTranscriptResultStreamBadRequestException diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/MedicalTranscriptResultStreamConflictException.rst b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalTranscriptResultStreamConflictException.rst new file mode 100644 index 0000000..1cc36bd --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalTranscriptResultStreamConflictException.rst @@ -0,0 +1,9 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +.. _MedicalTranscriptResultStreamConflictException: + +MedicalTranscriptResultStreamConflictException +============================================== + +.. autoclass:: aws_sdk_transcribe_streaming.models.MedicalTranscriptResultStreamConflictException diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/MedicalTranscriptResultStreamInternalFailureException.rst b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalTranscriptResultStreamInternalFailureException.rst new file mode 100644 index 0000000..951bba5 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalTranscriptResultStreamInternalFailureException.rst @@ -0,0 +1,9 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +.. _MedicalTranscriptResultStreamInternalFailureException: + +MedicalTranscriptResultStreamInternalFailureException +===================================================== + +.. autoclass:: aws_sdk_transcribe_streaming.models.MedicalTranscriptResultStreamInternalFailureException diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/MedicalTranscriptResultStreamLimitExceededException.rst b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalTranscriptResultStreamLimitExceededException.rst new file mode 100644 index 0000000..dbef22b --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalTranscriptResultStreamLimitExceededException.rst @@ -0,0 +1,9 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +.. _MedicalTranscriptResultStreamLimitExceededException: + +MedicalTranscriptResultStreamLimitExceededException +=================================================== + +.. autoclass:: aws_sdk_transcribe_streaming.models.MedicalTranscriptResultStreamLimitExceededException diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/MedicalTranscriptResultStreamServiceUnavailableException.rst b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalTranscriptResultStreamServiceUnavailableException.rst new file mode 100644 index 0000000..c9fd5d8 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalTranscriptResultStreamServiceUnavailableException.rst @@ -0,0 +1,9 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +.. _MedicalTranscriptResultStreamServiceUnavailableException: + +MedicalTranscriptResultStreamServiceUnavailableException +======================================================== + +.. autoclass:: aws_sdk_transcribe_streaming.models.MedicalTranscriptResultStreamServiceUnavailableException diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/MedicalTranscriptResultStreamTranscriptEvent.rst b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalTranscriptResultStreamTranscriptEvent.rst new file mode 100644 index 0000000..3cbfb89 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalTranscriptResultStreamTranscriptEvent.rst @@ -0,0 +1,9 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +.. _MedicalTranscriptResultStreamTranscriptEvent: + +MedicalTranscriptResultStreamTranscriptEvent +============================================ + +.. autoclass:: aws_sdk_transcribe_streaming.models.MedicalTranscriptResultStreamTranscriptEvent diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/MedicalTranscriptResultStreamUnknown.rst b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalTranscriptResultStreamUnknown.rst new file mode 100644 index 0000000..dc72681 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/MedicalTranscriptResultStreamUnknown.rst @@ -0,0 +1,9 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +.. _MedicalTranscriptResultStreamUnknown: + +MedicalTranscriptResultStreamUnknown +==================================== + +.. autoclass:: aws_sdk_transcribe_streaming.models.MedicalTranscriptResultStreamUnknown diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/PointsOfInterest.rst b/clients/aws-sdk-transcribe-streaming/docs/models/PointsOfInterest.rst new file mode 100644 index 0000000..f7bc7fe --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/PointsOfInterest.rst @@ -0,0 +1,8 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +PointsOfInterest +================ + +.. autoclass:: aws_sdk_transcribe_streaming.models.PointsOfInterest + :members: diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/PostCallAnalyticsSettings.rst b/clients/aws-sdk-transcribe-streaming/docs/models/PostCallAnalyticsSettings.rst new file mode 100644 index 0000000..a8cb78a --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/PostCallAnalyticsSettings.rst @@ -0,0 +1,8 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +PostCallAnalyticsSettings +========================= + +.. autoclass:: aws_sdk_transcribe_streaming.models.PostCallAnalyticsSettings + :members: diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/ResourceNotFoundException.rst b/clients/aws-sdk-transcribe-streaming/docs/models/ResourceNotFoundException.rst new file mode 100644 index 0000000..ae64cbf --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/ResourceNotFoundException.rst @@ -0,0 +1,9 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +ResourceNotFoundException +========================= + +.. autoexception:: aws_sdk_transcribe_streaming.models.ResourceNotFoundException + :members: + :show-inheritance: diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/Result.rst b/clients/aws-sdk-transcribe-streaming/docs/models/Result.rst new file mode 100644 index 0000000..a887496 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/Result.rst @@ -0,0 +1,8 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +Result +====== + +.. autoclass:: aws_sdk_transcribe_streaming.models.Result + :members: diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/ServiceUnavailableException.rst b/clients/aws-sdk-transcribe-streaming/docs/models/ServiceUnavailableException.rst new file mode 100644 index 0000000..8a2453b --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/ServiceUnavailableException.rst @@ -0,0 +1,9 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +ServiceUnavailableException +=========================== + +.. autoexception:: aws_sdk_transcribe_streaming.models.ServiceUnavailableException + :members: + :show-inheritance: diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/TimestampRange.rst b/clients/aws-sdk-transcribe-streaming/docs/models/TimestampRange.rst new file mode 100644 index 0000000..c1cb0ce --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/TimestampRange.rst @@ -0,0 +1,8 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +TimestampRange +============== + +.. autoclass:: aws_sdk_transcribe_streaming.models.TimestampRange + :members: diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/Transcript.rst b/clients/aws-sdk-transcribe-streaming/docs/models/Transcript.rst new file mode 100644 index 0000000..a9d97b2 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/Transcript.rst @@ -0,0 +1,8 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +Transcript +========== + +.. autoclass:: aws_sdk_transcribe_streaming.models.Transcript + :members: diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/TranscriptEvent.rst b/clients/aws-sdk-transcribe-streaming/docs/models/TranscriptEvent.rst new file mode 100644 index 0000000..799f1fc --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/TranscriptEvent.rst @@ -0,0 +1,8 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +TranscriptEvent +=============== + +.. autoclass:: aws_sdk_transcribe_streaming.models.TranscriptEvent + :members: diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/TranscriptResultStream.rst b/clients/aws-sdk-transcribe-streaming/docs/models/TranscriptResultStream.rst new file mode 100644 index 0000000..2e11dc5 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/TranscriptResultStream.rst @@ -0,0 +1,9 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +.. _TranscriptResultStream: + +TranscriptResultStream +====================== + +.. autodata:: aws_sdk_transcribe_streaming.models.TranscriptResultStream diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/TranscriptResultStreamBadRequestException.rst b/clients/aws-sdk-transcribe-streaming/docs/models/TranscriptResultStreamBadRequestException.rst new file mode 100644 index 0000000..245f4f7 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/TranscriptResultStreamBadRequestException.rst @@ -0,0 +1,9 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +.. _TranscriptResultStreamBadRequestException: + +TranscriptResultStreamBadRequestException +========================================= + +.. autoclass:: aws_sdk_transcribe_streaming.models.TranscriptResultStreamBadRequestException diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/TranscriptResultStreamConflictException.rst b/clients/aws-sdk-transcribe-streaming/docs/models/TranscriptResultStreamConflictException.rst new file mode 100644 index 0000000..e024b7c --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/TranscriptResultStreamConflictException.rst @@ -0,0 +1,9 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +.. _TranscriptResultStreamConflictException: + +TranscriptResultStreamConflictException +======================================= + +.. autoclass:: aws_sdk_transcribe_streaming.models.TranscriptResultStreamConflictException diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/TranscriptResultStreamInternalFailureException.rst b/clients/aws-sdk-transcribe-streaming/docs/models/TranscriptResultStreamInternalFailureException.rst new file mode 100644 index 0000000..9fcc830 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/TranscriptResultStreamInternalFailureException.rst @@ -0,0 +1,9 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +.. _TranscriptResultStreamInternalFailureException: + +TranscriptResultStreamInternalFailureException +============================================== + +.. autoclass:: aws_sdk_transcribe_streaming.models.TranscriptResultStreamInternalFailureException diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/TranscriptResultStreamLimitExceededException.rst b/clients/aws-sdk-transcribe-streaming/docs/models/TranscriptResultStreamLimitExceededException.rst new file mode 100644 index 0000000..2d8031b --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/TranscriptResultStreamLimitExceededException.rst @@ -0,0 +1,9 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +.. _TranscriptResultStreamLimitExceededException: + +TranscriptResultStreamLimitExceededException +============================================ + +.. autoclass:: aws_sdk_transcribe_streaming.models.TranscriptResultStreamLimitExceededException diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/TranscriptResultStreamServiceUnavailableException.rst b/clients/aws-sdk-transcribe-streaming/docs/models/TranscriptResultStreamServiceUnavailableException.rst new file mode 100644 index 0000000..b8a988a --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/TranscriptResultStreamServiceUnavailableException.rst @@ -0,0 +1,9 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +.. _TranscriptResultStreamServiceUnavailableException: + +TranscriptResultStreamServiceUnavailableException +================================================= + +.. autoclass:: aws_sdk_transcribe_streaming.models.TranscriptResultStreamServiceUnavailableException diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/TranscriptResultStreamTranscriptEvent.rst b/clients/aws-sdk-transcribe-streaming/docs/models/TranscriptResultStreamTranscriptEvent.rst new file mode 100644 index 0000000..30e1562 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/TranscriptResultStreamTranscriptEvent.rst @@ -0,0 +1,9 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +.. _TranscriptResultStreamTranscriptEvent: + +TranscriptResultStreamTranscriptEvent +===================================== + +.. autoclass:: aws_sdk_transcribe_streaming.models.TranscriptResultStreamTranscriptEvent diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/TranscriptResultStreamUnknown.rst b/clients/aws-sdk-transcribe-streaming/docs/models/TranscriptResultStreamUnknown.rst new file mode 100644 index 0000000..5e07d9c --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/TranscriptResultStreamUnknown.rst @@ -0,0 +1,9 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +.. _TranscriptResultStreamUnknown: + +TranscriptResultStreamUnknown +============================= + +.. autoclass:: aws_sdk_transcribe_streaming.models.TranscriptResultStreamUnknown diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/UtteranceEvent.rst b/clients/aws-sdk-transcribe-streaming/docs/models/UtteranceEvent.rst new file mode 100644 index 0000000..4009e0c --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/UtteranceEvent.rst @@ -0,0 +1,8 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +UtteranceEvent +============== + +.. autoclass:: aws_sdk_transcribe_streaming.models.UtteranceEvent + :members: diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/__init__.py b/clients/aws-sdk-transcribe-streaming/docs/models/__init__.py new file mode 100644 index 0000000..247be3e --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/__init__.py @@ -0,0 +1 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. diff --git a/clients/aws-sdk-transcribe-streaming/docs/models/index.rst b/clients/aws-sdk-transcribe-streaming/docs/models/index.rst new file mode 100644 index 0000000..c403929 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/docs/models/index.rst @@ -0,0 +1,11 @@ +.. + Code generated by smithy-python-codegen DO NOT EDIT. + +Models +======= +.. toctree:: + :maxdepth: 1 + :titlesonly: + :glob: + + * diff --git a/clients/aws-sdk-transcribe-streaming/pyproject.toml b/clients/aws-sdk-transcribe-streaming/pyproject.toml new file mode 100644 index 0000000..9ee61d1 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/pyproject.toml @@ -0,0 +1,73 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + + +[project] +name = "aws_sdk_transcribe_streaming" +version = "0.0.1" +description = "aws_sdk_transcribe_streaming client" +readme = "README.md" +requires-python = ">=3.12" +keywords = ["smithy", "aws_sdk_transcribe_streaming"] +license = {text = "Apache-2.0"} +classifiers = [ + "Development Status :: 2 - Pre-Alpha", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Natural Language :: English", + "License :: OSI Approved :: Apache Software License", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14" +] + +dependencies = [ + "smithy_aws_core[eventstream, json]~=0.1.0", + "smithy_core~=0.1.0", + "smithy_http[awscrt]~=0.2.0" +] + +[dependency-groups] +test = [ + "pytest>=7.2.0,<8.0.0", + "pytest-asyncio>=0.20.3,<0.21.0" +] + +docs = [ + "pydata-sphinx-theme>=0.16.1", + "sphinx>=8.2.3" +] + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[tool.hatch.build.targets.bdist] +exclude = [ + "tests", + "docs", +] + +[tool.pyright] +typeCheckingMode = "strict" +reportPrivateUsage = false +reportUnusedFunction = false +reportUnusedVariable = false +reportUnnecessaryComparison = false +reportUnusedClass = false +enableExperimentalFeatures = true + +[tool.ruff] +target-version = "py312" + +[tool.ruff.lint] +ignore = ["F841"] + +[tool.ruff.format] +skip-magic-trailing-comma = true + +[tool.pytest.ini_options] +python_classes = ["!Test"] +asyncio_mode = "auto" diff --git a/clients/aws-sdk-transcribe-streaming/src/aws_sdk_transcribe_streaming/__init__.py b/clients/aws-sdk-transcribe-streaming/src/aws_sdk_transcribe_streaming/__init__.py new file mode 100644 index 0000000..30f6d44 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/src/aws_sdk_transcribe_streaming/__init__.py @@ -0,0 +1,3 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +__version__: str = "0.0.1" diff --git a/clients/aws-sdk-transcribe-streaming/src/aws_sdk_transcribe_streaming/_private/__init__.py b/clients/aws-sdk-transcribe-streaming/src/aws_sdk_transcribe_streaming/_private/__init__.py new file mode 100644 index 0000000..247be3e --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/src/aws_sdk_transcribe_streaming/_private/__init__.py @@ -0,0 +1 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. diff --git a/clients/aws-sdk-transcribe-streaming/src/aws_sdk_transcribe_streaming/_private/schemas.py b/clients/aws-sdk-transcribe-streaming/src/aws_sdk_transcribe_streaming/_private/schemas.py new file mode 100644 index 0000000..0cfb2aa --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/src/aws_sdk_transcribe_streaming/_private/schemas.py @@ -0,0 +1,4242 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +from types import MappingProxyType + +from smithy_core.prelude import UNIT +from smithy_core.schemas import Schema +from smithy_core.shapes import ShapeID, ShapeType +from smithy_core.traits import Trait + + +STRING = Schema( + id=ShapeID("com.amazonaws.transcribestreaming#String"), shape_type=ShapeType.STRING +) + +CONFIDENCE = Schema( + id=ShapeID("com.amazonaws.transcribestreaming#Confidence"), + shape_type=ShapeType.DOUBLE, + traits=[Trait.new(id=ShapeID("smithy.api#box"))], +) + +DOUBLE = Schema( + id=ShapeID("com.amazonaws.transcribestreaming#Double"), + shape_type=ShapeType.DOUBLE, + traits=[Trait.new(id=ShapeID("smithy.api#default"), value=0)], +) + +ENTITY = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#Entity"), + members={ + "StartTime": { + "target": DOUBLE, + "traits": [Trait.new(id=ShapeID("smithy.api#default"), value=0)], + }, + "EndTime": { + "target": DOUBLE, + "traits": [Trait.new(id=ShapeID("smithy.api#default"), value=0)], + }, + "Category": {"target": STRING}, + "Type": {"target": STRING}, + "Content": {"target": STRING}, + "Confidence": {"target": CONFIDENCE}, + }, +) + +ENTITY_LIST = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#EntityList"), + shape_type=ShapeType.LIST, + members={"member": {"target": ENTITY}}, +) + +STABLE = Schema( + id=ShapeID("com.amazonaws.transcribestreaming#Stable"), + shape_type=ShapeType.BOOLEAN, + traits=[Trait.new(id=ShapeID("smithy.api#box"))], +) + +ITEM_TYPE = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#ItemType"), + shape_type=ShapeType.ENUM, + members={ + "PRONUNCIATION": { + "target": UNIT, + "traits": [ + Trait.new(id=ShapeID("smithy.api#enumValue"), value="pronunciation") + ], + }, + "PUNCTUATION": { + "target": UNIT, + "traits": [ + Trait.new(id=ShapeID("smithy.api#enumValue"), value="punctuation") + ], + }, + }, +) + +BOOLEAN = Schema( + id=ShapeID("com.amazonaws.transcribestreaming#Boolean"), + shape_type=ShapeType.BOOLEAN, + traits=[Trait.new(id=ShapeID("smithy.api#default"), value=False)], +) + +ITEM = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#Item"), + members={ + "StartTime": { + "target": DOUBLE, + "traits": [Trait.new(id=ShapeID("smithy.api#default"), value=0)], + }, + "EndTime": { + "target": DOUBLE, + "traits": [Trait.new(id=ShapeID("smithy.api#default"), value=0)], + }, + "Type": {"target": ITEM_TYPE}, + "Content": {"target": STRING}, + "VocabularyFilterMatch": { + "target": BOOLEAN, + "traits": [Trait.new(id=ShapeID("smithy.api#default"), value=False)], + }, + "Speaker": {"target": STRING}, + "Confidence": {"target": CONFIDENCE}, + "Stable": {"target": STABLE}, + }, +) + +ITEM_LIST = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#ItemList"), + shape_type=ShapeType.LIST, + members={"member": {"target": ITEM}}, +) + +ALTERNATIVE = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#Alternative"), + members={ + "Transcript": {"target": STRING}, + "Items": {"target": ITEM_LIST}, + "Entities": {"target": ENTITY_LIST}, + }, +) + +ALTERNATIVE_LIST = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#AlternativeList"), + shape_type=ShapeType.LIST, + members={"member": {"target": ALTERNATIVE}}, +) + +AUDIO_CHUNK = Schema( + id=ShapeID("com.amazonaws.transcribestreaming#AudioChunk"), + shape_type=ShapeType.BLOB, +) + +AUDIO_EVENT = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#AudioEvent"), + members={ + "AudioChunk": { + "target": AUDIO_CHUNK, + "traits": [Trait.new(id=ShapeID("smithy.api#eventPayload"))], + } + }, +) + +CHANNEL_ID = Schema( + id=ShapeID("com.amazonaws.transcribestreaming#ChannelId"), + shape_type=ShapeType.INTEGER, + traits=[ + Trait.new(id=ShapeID("smithy.api#default"), value=0), + Trait.new( + id=ShapeID("smithy.api#range"), value=MappingProxyType({"min": 0, "max": 1}) + ), + ], +) + +PARTICIPANT_ROLE = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#ParticipantRole"), + shape_type=ShapeType.ENUM, + members={ + "AGENT": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="AGENT")], + }, + "CUSTOMER": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="CUSTOMER")], + }, + }, +) + +CHANNEL_DEFINITION = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#ChannelDefinition"), + members={ + "ChannelId": { + "target": CHANNEL_ID, + "traits": [ + Trait.new(id=ShapeID("smithy.api#default"), value=0), + Trait.new(id=ShapeID("smithy.api#required")), + ], + }, + "ParticipantRole": { + "target": PARTICIPANT_ROLE, + "traits": [Trait.new(id=ShapeID("smithy.api#required"))], + }, + }, +) + +CHANNEL_DEFINITIONS = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#ChannelDefinitions"), + shape_type=ShapeType.LIST, + traits=[ + Trait.new( + id=ShapeID("smithy.api#length"), + value=MappingProxyType({"min": 2, "max": 2}), + ) + ], + members={"member": {"target": CHANNEL_DEFINITION}}, +) + +CONTENT_REDACTION_OUTPUT = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#ContentRedactionOutput"), + shape_type=ShapeType.ENUM, + members={ + "REDACTED": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="redacted")], + }, + "REDACTED_AND_UNREDACTED": { + "target": UNIT, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#enumValue"), value="redacted_and_unredacted" + ) + ], + }, + }, +) + +POST_CALL_ANALYTICS_SETTINGS = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#PostCallAnalyticsSettings"), + members={ + "OutputLocation": { + "target": STRING, + "traits": [Trait.new(id=ShapeID("smithy.api#required"))], + }, + "DataAccessRoleArn": { + "target": STRING, + "traits": [Trait.new(id=ShapeID("smithy.api#required"))], + }, + "ContentRedactionOutput": {"target": CONTENT_REDACTION_OUTPUT}, + "OutputEncryptionKMSKeyId": {"target": STRING}, + }, +) + +CONFIGURATION_EVENT = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#ConfigurationEvent"), + members={ + "ChannelDefinitions": {"target": CHANNEL_DEFINITIONS}, + "PostCallAnalyticsSettings": {"target": POST_CALL_ANALYTICS_SETTINGS}, + }, +) + +AUDIO_STREAM = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#AudioStream"), + shape_type=ShapeType.UNION, + traits=[Trait.new(id=ShapeID("smithy.api#streaming"))], + members={ + "AudioEvent": {"target": AUDIO_EVENT}, + "ConfigurationEvent": {"target": CONFIGURATION_EVENT}, + }, +) + +BAD_REQUEST_EXCEPTION = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#BadRequestException"), + traits=[ + Trait.new(id=ShapeID("smithy.api#error"), value="client"), + Trait.new(id=ShapeID("smithy.api#httpError"), value=400), + ], + members={"Message": {"target": STRING}}, +) + +BUCKET_NAME = Schema( + id=ShapeID("com.amazonaws.transcribestreaming#BucketName"), + shape_type=ShapeType.STRING, + traits=[ + Trait.new( + id=ShapeID("smithy.api#length"), + value=MappingProxyType({"min": 0, "max": 64}), + ), + Trait.new( + id=ShapeID("smithy.api#pattern"), + value="^[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9]$", + ), + ], +) + +LONG = Schema( + id=ShapeID("com.amazonaws.transcribestreaming#Long"), + shape_type=ShapeType.LONG, + traits=[Trait.new(id=ShapeID("smithy.api#box"))], +) + +CALL_ANALYTICS_ENTITY = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#CallAnalyticsEntity"), + members={ + "BeginOffsetMillis": {"target": LONG}, + "EndOffsetMillis": {"target": LONG}, + "Category": {"target": STRING}, + "Type": {"target": STRING}, + "Content": {"target": STRING}, + "Confidence": {"target": CONFIDENCE}, + }, +) + +CALL_ANALYTICS_ENTITY_LIST = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#CallAnalyticsEntityList"), + shape_type=ShapeType.LIST, + members={"member": {"target": CALL_ANALYTICS_ENTITY}}, +) + +CALL_ANALYTICS_ITEM = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#CallAnalyticsItem"), + members={ + "BeginOffsetMillis": {"target": LONG}, + "EndOffsetMillis": {"target": LONG}, + "Type": {"target": ITEM_TYPE}, + "Content": {"target": STRING}, + "Confidence": {"target": CONFIDENCE}, + "VocabularyFilterMatch": { + "target": BOOLEAN, + "traits": [Trait.new(id=ShapeID("smithy.api#default"), value=False)], + }, + "Stable": {"target": STABLE}, + }, +) + +CALL_ANALYTICS_ITEM_LIST = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#CallAnalyticsItemList"), + shape_type=ShapeType.LIST, + members={"member": {"target": CALL_ANALYTICS_ITEM}}, +) + +CALL_ANALYTICS_LANGUAGE_CODE = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#CallAnalyticsLanguageCode"), + shape_type=ShapeType.ENUM, + members={ + "EN_US": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="en-US")], + }, + "EN_GB": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="en-GB")], + }, + "ES_US": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="es-US")], + }, + "FR_CA": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="fr-CA")], + }, + "FR_FR": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="fr-FR")], + }, + "EN_AU": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="en-AU")], + }, + "IT_IT": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="it-IT")], + }, + "DE_DE": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="de-DE")], + }, + "PT_BR": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="pt-BR")], + }, + }, +) + +CALL_ANALYTICS_LANGUAGE_WITH_SCORE = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#CallAnalyticsLanguageWithScore"), + members={ + "LanguageCode": {"target": CALL_ANALYTICS_LANGUAGE_CODE}, + "Score": { + "target": DOUBLE, + "traits": [Trait.new(id=ShapeID("smithy.api#default"), value=0)], + }, + }, +) + +CALL_ANALYTICS_LANGUAGE_IDENTIFICATION = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#CallAnalyticsLanguageIdentification"), + shape_type=ShapeType.LIST, + members={"member": {"target": CALL_ANALYTICS_LANGUAGE_WITH_SCORE}}, +) + +STRING_LIST = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#StringList"), + shape_type=ShapeType.LIST, + members={"member": {"target": STRING}}, +) + +TIMESTAMP_RANGE = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#TimestampRange"), + members={ + "BeginOffsetMillis": {"target": LONG}, + "EndOffsetMillis": {"target": LONG}, + }, +) + +TIMESTAMP_RANGES = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#TimestampRanges"), + shape_type=ShapeType.LIST, + members={"member": {"target": TIMESTAMP_RANGE}}, +) + +POINTS_OF_INTEREST = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#PointsOfInterest"), + members={"TimestampRanges": {"target": TIMESTAMP_RANGES}}, +) + +MATCHED_CATEGORY_DETAILS = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#MatchedCategoryDetails"), + shape_type=ShapeType.MAP, + members={"key": {"target": STRING}, "value": {"target": POINTS_OF_INTEREST}}, +) + +CATEGORY_EVENT = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#CategoryEvent"), + members={ + "MatchedCategories": {"target": STRING_LIST}, + "MatchedDetails": {"target": MATCHED_CATEGORY_DETAILS}, + }, +) + +CONFLICT_EXCEPTION = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#ConflictException"), + traits=[ + Trait.new(id=ShapeID("smithy.api#error"), value="client"), + Trait.new(id=ShapeID("smithy.api#httpError"), value=409), + ], + members={"Message": {"target": STRING}}, +) + +INTERNAL_FAILURE_EXCEPTION = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#InternalFailureException"), + traits=[ + Trait.new(id=ShapeID("smithy.api#error"), value="server"), + Trait.new(id=ShapeID("smithy.api#httpError"), value=500), + ], + members={"Message": {"target": STRING}}, +) + +LIMIT_EXCEEDED_EXCEPTION = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#LimitExceededException"), + traits=[ + Trait.new(id=ShapeID("smithy.api#error"), value="client"), + Trait.new(id=ShapeID("smithy.api#httpError"), value=429), + ], + members={"Message": {"target": STRING}}, +) + +SERVICE_UNAVAILABLE_EXCEPTION = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#ServiceUnavailableException"), + traits=[ + Trait.new(id=ShapeID("smithy.api#error"), value="server"), + Trait.new(id=ShapeID("smithy.api#httpError"), value=503), + ], + members={"Message": {"target": STRING}}, +) + +INTEGER = Schema( + id=ShapeID("com.amazonaws.transcribestreaming#Integer"), + shape_type=ShapeType.INTEGER, + traits=[Trait.new(id=ShapeID("smithy.api#box"))], +) + +CHARACTER_OFFSETS = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#CharacterOffsets"), + members={"Begin": {"target": INTEGER}, "End": {"target": INTEGER}}, +) + +ISSUE_DETECTED = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#IssueDetected"), + members={"CharacterOffsets": {"target": CHARACTER_OFFSETS}}, +) + +ISSUES_DETECTED = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#IssuesDetected"), + shape_type=ShapeType.LIST, + members={"member": {"target": ISSUE_DETECTED}}, +) + +SENTIMENT = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#Sentiment"), + shape_type=ShapeType.ENUM, + members={ + "POSITIVE": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="POSITIVE")], + }, + "NEGATIVE": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="NEGATIVE")], + }, + "MIXED": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="MIXED")], + }, + "NEUTRAL": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="NEUTRAL")], + }, + }, +) + +UTTERANCE_EVENT = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#UtteranceEvent"), + members={ + "UtteranceId": {"target": STRING}, + "IsPartial": { + "target": BOOLEAN, + "traits": [Trait.new(id=ShapeID("smithy.api#default"), value=False)], + }, + "ParticipantRole": {"target": PARTICIPANT_ROLE}, + "BeginOffsetMillis": {"target": LONG}, + "EndOffsetMillis": {"target": LONG}, + "Transcript": {"target": STRING}, + "Items": {"target": CALL_ANALYTICS_ITEM_LIST}, + "Entities": {"target": CALL_ANALYTICS_ENTITY_LIST}, + "Sentiment": {"target": SENTIMENT}, + "IssuesDetected": {"target": ISSUES_DETECTED}, + "LanguageCode": {"target": CALL_ANALYTICS_LANGUAGE_CODE}, + "LanguageIdentification": {"target": CALL_ANALYTICS_LANGUAGE_IDENTIFICATION}, + }, +) + +CALL_ANALYTICS_TRANSCRIPT_RESULT_STREAM = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#CallAnalyticsTranscriptResultStream"), + shape_type=ShapeType.UNION, + traits=[Trait.new(id=ShapeID("smithy.api#streaming"))], + members={ + "UtteranceEvent": {"target": UTTERANCE_EVENT}, + "CategoryEvent": {"target": CATEGORY_EVENT}, + "BadRequestException": {"target": BAD_REQUEST_EXCEPTION}, + "LimitExceededException": {"target": LIMIT_EXCEEDED_EXCEPTION}, + "InternalFailureException": {"target": INTERNAL_FAILURE_EXCEPTION}, + "ConflictException": {"target": CONFLICT_EXCEPTION}, + "ServiceUnavailableException": {"target": SERVICE_UNAVAILABLE_EXCEPTION}, + }, +) + +URI = Schema( + id=ShapeID("com.amazonaws.transcribestreaming#Uri"), + shape_type=ShapeType.STRING, + traits=[ + Trait.new( + id=ShapeID("smithy.api#length"), + value=MappingProxyType({"min": 1, "max": 2000}), + ), + Trait.new(id=ShapeID("smithy.api#pattern"), value="^(s3://|http(s*)://).+$"), + ], +) + +CLINICAL_NOTE_GENERATION_STATUS = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#ClinicalNoteGenerationStatus"), + shape_type=ShapeType.ENUM, + members={ + "IN_PROGRESS": { + "target": UNIT, + "traits": [ + Trait.new(id=ShapeID("smithy.api#enumValue"), value="IN_PROGRESS") + ], + }, + "FAILED": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="FAILED")], + }, + "COMPLETED": { + "target": UNIT, + "traits": [ + Trait.new(id=ShapeID("smithy.api#enumValue"), value="COMPLETED") + ], + }, + }, +) + +CLINICAL_NOTE_GENERATION_RESULT = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#ClinicalNoteGenerationResult"), + members={ + "ClinicalNoteOutputLocation": {"target": URI}, + "TranscriptOutputLocation": {"target": URI}, + "Status": {"target": CLINICAL_NOTE_GENERATION_STATUS}, + "FailureReason": {"target": STRING}, + }, +) + +MEDICAL_SCRIBE_NOTE_TEMPLATE = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#MedicalScribeNoteTemplate"), + shape_type=ShapeType.ENUM, + members={ + "HISTORY_AND_PHYSICAL": { + "target": UNIT, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#enumValue"), value="HISTORY_AND_PHYSICAL" + ) + ], + }, + "GIRPP": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="GIRPP")], + }, + "DAP": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="DAP")], + }, + "SIRP": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="SIRP")], + }, + "BIRP": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="BIRP")], + }, + "BEHAVIORAL_SOAP": { + "target": UNIT, + "traits": [ + Trait.new(id=ShapeID("smithy.api#enumValue"), value="BEHAVIORAL_SOAP") + ], + }, + "PHYSICAL_SOAP": { + "target": UNIT, + "traits": [ + Trait.new(id=ShapeID("smithy.api#enumValue"), value="PHYSICAL_SOAP") + ], + }, + }, +) + +CLINICAL_NOTE_GENERATION_SETTINGS = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#ClinicalNoteGenerationSettings"), + members={ + "OutputBucketName": { + "target": BUCKET_NAME, + "traits": [Trait.new(id=ShapeID("smithy.api#required"))], + }, + "NoteTemplate": {"target": MEDICAL_SCRIBE_NOTE_TEMPLATE}, + }, +) + +CONTENT_IDENTIFICATION_TYPE = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#ContentIdentificationType"), + shape_type=ShapeType.ENUM, + members={ + "PII": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="PII")], + } + }, +) + +CONTENT_REDACTION_TYPE = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#ContentRedactionType"), + shape_type=ShapeType.ENUM, + members={ + "PII": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="PII")], + } + }, +) + +DATE_TIME = Schema( + id=ShapeID("com.amazonaws.transcribestreaming#DateTime"), + shape_type=ShapeType.TIMESTAMP, +) + +SESSION_ID = Schema( + id=ShapeID("com.amazonaws.transcribestreaming#SessionId"), + shape_type=ShapeType.STRING, + traits=[ + Trait.new( + id=ShapeID("smithy.api#length"), + value=MappingProxyType({"min": 36, "max": 36}), + ), + Trait.new( + id=ShapeID("smithy.api#pattern"), + value="^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$", + ), + ], +) + +GET_MEDICAL_SCRIBE_STREAM_INPUT = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#GetMedicalScribeStreamInput"), + traits=[ + Trait.new( + id=ShapeID("smithy.synthetic#originalShapeId"), + value="com.amazonaws.transcribestreaming#GetMedicalScribeStreamRequest", + ), + Trait.new(id=ShapeID("smithy.api#input")), + ], + members={ + "SessionId": { + "target": SESSION_ID, + "traits": [ + Trait.new(id=ShapeID("smithy.api#required")), + Trait.new(id=ShapeID("smithy.api#httpLabel")), + ], + } + }, +) + +MEDICAL_SCRIBE_CHANNEL_ID = Schema( + id=ShapeID("com.amazonaws.transcribestreaming#MedicalScribeChannelId"), + shape_type=ShapeType.INTEGER, + traits=[ + Trait.new(id=ShapeID("smithy.api#default"), value=0), + Trait.new( + id=ShapeID("smithy.api#range"), value=MappingProxyType({"min": 0, "max": 1}) + ), + ], +) + +MEDICAL_SCRIBE_PARTICIPANT_ROLE = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#MedicalScribeParticipantRole"), + shape_type=ShapeType.ENUM, + members={ + "PATIENT": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="PATIENT")], + }, + "CLINICIAN": { + "target": UNIT, + "traits": [ + Trait.new(id=ShapeID("smithy.api#enumValue"), value="CLINICIAN") + ], + }, + }, +) + +MEDICAL_SCRIBE_CHANNEL_DEFINITION = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#MedicalScribeChannelDefinition"), + members={ + "ChannelId": { + "target": MEDICAL_SCRIBE_CHANNEL_ID, + "traits": [ + Trait.new(id=ShapeID("smithy.api#default"), value=0), + Trait.new(id=ShapeID("smithy.api#required")), + ], + }, + "ParticipantRole": { + "target": MEDICAL_SCRIBE_PARTICIPANT_ROLE, + "traits": [Trait.new(id=ShapeID("smithy.api#required"))], + }, + }, +) + +MEDICAL_SCRIBE_CHANNEL_DEFINITIONS = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#MedicalScribeChannelDefinitions"), + shape_type=ShapeType.LIST, + traits=[ + Trait.new( + id=ShapeID("smithy.api#length"), + value=MappingProxyType({"min": 2, "max": 2}), + ) + ], + members={"member": {"target": MEDICAL_SCRIBE_CHANNEL_DEFINITION}}, +) + +NON_EMPTY_STRING = Schema( + id=ShapeID("com.amazonaws.transcribestreaming#NonEmptyString"), + shape_type=ShapeType.STRING, + traits=[ + Trait.new( + id=ShapeID("smithy.api#length"), + value=MappingProxyType({"min": 1, "max": 2000}), + ), + Trait.new(id=ShapeID("smithy.api#pattern"), value="\\S"), + ], +) + +KMS_ENCRYPTION_CONTEXT_MAP = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#KMSEncryptionContextMap"), + shape_type=ShapeType.MAP, + traits=[ + Trait.new( + id=ShapeID("smithy.api#length"), + value=MappingProxyType({"min": 1, "max": 10}), + ) + ], + members={ + "key": {"target": NON_EMPTY_STRING}, + "value": {"target": NON_EMPTY_STRING}, + }, +) + +KMS_KEY_ID = Schema( + id=ShapeID("com.amazonaws.transcribestreaming#KMSKeyId"), + shape_type=ShapeType.STRING, + traits=[ + Trait.new( + id=ShapeID("smithy.api#length"), + value=MappingProxyType({"min": 1, "max": 2048}), + ), + Trait.new( + id=ShapeID("smithy.api#pattern"), + value="^[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,2048}$", + ), + ], +) + +MEDICAL_SCRIBE_ENCRYPTION_SETTINGS = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#MedicalScribeEncryptionSettings"), + members={ + "KmsEncryptionContext": {"target": KMS_ENCRYPTION_CONTEXT_MAP}, + "KmsKeyId": { + "target": KMS_KEY_ID, + "traits": [Trait.new(id=ShapeID("smithy.api#required"))], + }, + }, +) + +MEDICAL_SCRIBE_LANGUAGE_CODE = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#MedicalScribeLanguageCode"), + shape_type=ShapeType.ENUM, + members={ + "EN_US": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="en-US")], + } + }, +) + +MEDICAL_SCRIBE_MEDIA_ENCODING = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#MedicalScribeMediaEncoding"), + shape_type=ShapeType.ENUM, + members={ + "PCM": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="pcm")], + }, + "OGG_OPUS": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="ogg-opus")], + }, + "FLAC": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="flac")], + }, + }, +) + +MEDICAL_SCRIBE_MEDIA_SAMPLE_RATE_HERTZ = Schema( + id=ShapeID("com.amazonaws.transcribestreaming#MedicalScribeMediaSampleRateHertz"), + shape_type=ShapeType.INTEGER, + traits=[ + Trait.new(id=ShapeID("smithy.api#box")), + Trait.new( + id=ShapeID("smithy.api#range"), + value=MappingProxyType({"min": 16000, "max": 48000}), + ), + ], +) + +NULLABLE_BOOLEAN = Schema( + id=ShapeID("com.amazonaws.transcribestreaming#NullableBoolean"), + shape_type=ShapeType.BOOLEAN, + traits=[Trait.new(id=ShapeID("smithy.api#box"))], +) + +MEDICAL_SCRIBE_POST_STREAM_ANALYTICS_RESULT = Schema.collection( + id=ShapeID( + "com.amazonaws.transcribestreaming#MedicalScribePostStreamAnalyticsResult" + ), + members={ + "ClinicalNoteGenerationResult": {"target": CLINICAL_NOTE_GENERATION_RESULT} + }, +) + +MEDICAL_SCRIBE_POST_STREAM_ANALYTICS_SETTINGS = Schema.collection( + id=ShapeID( + "com.amazonaws.transcribestreaming#MedicalScribePostStreamAnalyticsSettings" + ), + members={ + "ClinicalNoteGenerationSettings": { + "target": CLINICAL_NOTE_GENERATION_SETTINGS, + "traits": [Trait.new(id=ShapeID("smithy.api#required"))], + } + }, +) + +IAM_ROLE_ARN = Schema( + id=ShapeID("com.amazonaws.transcribestreaming#IamRoleArn"), + shape_type=ShapeType.STRING, + traits=[ + Trait.new( + id=ShapeID("smithy.api#length"), + value=MappingProxyType({"min": 20, "max": 2048}), + ), + Trait.new( + id=ShapeID("smithy.api#pattern"), + value="^arn:(aws|aws-cn|aws-us-gov|aws-iso-{0,1}[a-z]{0,1}):iam::[0-9]{0,63}:role/[A-Za-z0-9:_/+=,@.-]{0,1024}$", + ), + ], +) + +MEDICAL_SCRIBE_STREAM_STATUS = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#MedicalScribeStreamStatus"), + shape_type=ShapeType.ENUM, + members={ + "IN_PROGRESS": { + "target": UNIT, + "traits": [ + Trait.new(id=ShapeID("smithy.api#enumValue"), value="IN_PROGRESS") + ], + }, + "PAUSED": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="PAUSED")], + }, + "FAILED": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="FAILED")], + }, + "COMPLETED": { + "target": UNIT, + "traits": [ + Trait.new(id=ShapeID("smithy.api#enumValue"), value="COMPLETED") + ], + }, + }, +) + +MEDICAL_SCRIBE_VOCABULARY_FILTER_METHOD = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#MedicalScribeVocabularyFilterMethod"), + shape_type=ShapeType.ENUM, + members={ + "REMOVE": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="remove")], + }, + "MASK": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="mask")], + }, + "TAG": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="tag")], + }, + }, +) + +VOCABULARY_FILTER_NAME = Schema( + id=ShapeID("com.amazonaws.transcribestreaming#VocabularyFilterName"), + shape_type=ShapeType.STRING, + traits=[ + Trait.new( + id=ShapeID("smithy.api#length"), + value=MappingProxyType({"min": 1, "max": 200}), + ), + Trait.new(id=ShapeID("smithy.api#pattern"), value="^[0-9a-zA-Z._-]+$"), + ], +) + +VOCABULARY_NAME = Schema( + id=ShapeID("com.amazonaws.transcribestreaming#VocabularyName"), + shape_type=ShapeType.STRING, + traits=[ + Trait.new( + id=ShapeID("smithy.api#length"), + value=MappingProxyType({"min": 1, "max": 200}), + ), + Trait.new(id=ShapeID("smithy.api#pattern"), value="^[0-9a-zA-Z._-]+$"), + ], +) + +MEDICAL_SCRIBE_STREAM_DETAILS = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#MedicalScribeStreamDetails"), + members={ + "SessionId": {"target": SESSION_ID}, + "StreamCreatedAt": {"target": DATE_TIME}, + "StreamEndedAt": {"target": DATE_TIME}, + "LanguageCode": {"target": MEDICAL_SCRIBE_LANGUAGE_CODE}, + "MediaSampleRateHertz": {"target": MEDICAL_SCRIBE_MEDIA_SAMPLE_RATE_HERTZ}, + "MediaEncoding": {"target": MEDICAL_SCRIBE_MEDIA_ENCODING}, + "VocabularyName": {"target": VOCABULARY_NAME}, + "VocabularyFilterName": {"target": VOCABULARY_FILTER_NAME}, + "VocabularyFilterMethod": {"target": MEDICAL_SCRIBE_VOCABULARY_FILTER_METHOD}, + "ResourceAccessRoleArn": {"target": IAM_ROLE_ARN}, + "ChannelDefinitions": {"target": MEDICAL_SCRIBE_CHANNEL_DEFINITIONS}, + "EncryptionSettings": {"target": MEDICAL_SCRIBE_ENCRYPTION_SETTINGS}, + "StreamStatus": {"target": MEDICAL_SCRIBE_STREAM_STATUS}, + "PostStreamAnalyticsSettings": { + "target": MEDICAL_SCRIBE_POST_STREAM_ANALYTICS_SETTINGS + }, + "PostStreamAnalyticsResult": { + "target": MEDICAL_SCRIBE_POST_STREAM_ANALYTICS_RESULT + }, + "MedicalScribeContextProvided": {"target": NULLABLE_BOOLEAN}, + }, +) + +GET_MEDICAL_SCRIBE_STREAM_OUTPUT = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#GetMedicalScribeStreamOutput"), + traits=[ + Trait.new( + id=ShapeID("smithy.synthetic#originalShapeId"), + value="com.amazonaws.transcribestreaming#GetMedicalScribeStreamResponse", + ), + Trait.new(id=ShapeID("smithy.api#output")), + ], + members={"MedicalScribeStreamDetails": {"target": MEDICAL_SCRIBE_STREAM_DETAILS}}, +) + +RESOURCE_NOT_FOUND_EXCEPTION = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#ResourceNotFoundException"), + traits=[ + Trait.new(id=ShapeID("smithy.api#error"), value="client"), + Trait.new(id=ShapeID("smithy.api#httpError"), value=404), + ], + members={"Message": {"target": STRING}}, +) + +GET_MEDICAL_SCRIBE_STREAM = Schema( + id=ShapeID("com.amazonaws.transcribestreaming#GetMedicalScribeStream"), + shape_type=ShapeType.OPERATION, + traits=[ + Trait.new( + id=ShapeID("smithy.api#http"), + value=MappingProxyType( + { + "method": "GET", + "uri": "/medical-scribe-stream/{SessionId}", + "code": 200, + } + ), + ) + ], +) + +LANGUAGE_CODE = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#LanguageCode"), + shape_type=ShapeType.ENUM, + members={ + "EN_US": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="en-US")], + }, + "EN_GB": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="en-GB")], + }, + "ES_US": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="es-US")], + }, + "FR_CA": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="fr-CA")], + }, + "FR_FR": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="fr-FR")], + }, + "EN_AU": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="en-AU")], + }, + "IT_IT": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="it-IT")], + }, + "DE_DE": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="de-DE")], + }, + "PT_BR": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="pt-BR")], + }, + "JA_JP": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="ja-JP")], + }, + "KO_KR": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="ko-KR")], + }, + "ZH_CN": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="zh-CN")], + }, + "TH_TH": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="th-TH")], + }, + "ES_ES": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="es-ES")], + }, + "AR_SA": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="ar-SA")], + }, + "PT_PT": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="pt-PT")], + }, + "CA_ES": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="ca-ES")], + }, + "AR_AE": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="ar-AE")], + }, + "HI_IN": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="hi-IN")], + }, + "ZH_HK": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="zh-HK")], + }, + "NL_NL": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="nl-NL")], + }, + "NO_NO": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="no-NO")], + }, + "SV_SE": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="sv-SE")], + }, + "PL_PL": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="pl-PL")], + }, + "FI_FI": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="fi-FI")], + }, + "ZH_TW": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="zh-TW")], + }, + "EN_IN": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="en-IN")], + }, + "EN_IE": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="en-IE")], + }, + "EN_NZ": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="en-NZ")], + }, + "EN_AB": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="en-AB")], + }, + "EN_ZA": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="en-ZA")], + }, + "EN_WL": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="en-WL")], + }, + "DE_CH": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="de-CH")], + }, + "AF_ZA": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="af-ZA")], + }, + "EU_ES": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="eu-ES")], + }, + "HR_HR": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="hr-HR")], + }, + "CS_CZ": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="cs-CZ")], + }, + "DA_DK": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="da-DK")], + }, + "FA_IR": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="fa-IR")], + }, + "GL_ES": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="gl-ES")], + }, + "EL_GR": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="el-GR")], + }, + "HE_IL": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="he-IL")], + }, + "ID_ID": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="id-ID")], + }, + "LV_LV": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="lv-LV")], + }, + "MS_MY": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="ms-MY")], + }, + "RO_RO": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="ro-RO")], + }, + "RU_RU": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="ru-RU")], + }, + "SR_RS": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="sr-RS")], + }, + "SK_SK": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="sk-SK")], + }, + "SO_SO": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="so-SO")], + }, + "TL_PH": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="tl-PH")], + }, + "UK_UA": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="uk-UA")], + }, + "VI_VN": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="vi-VN")], + }, + "ZU_ZA": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="zu-ZA")], + }, + }, +) + +LANGUAGE_WITH_SCORE = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#LanguageWithScore"), + members={ + "LanguageCode": {"target": LANGUAGE_CODE}, + "Score": { + "target": DOUBLE, + "traits": [Trait.new(id=ShapeID("smithy.api#default"), value=0)], + }, + }, +) + +LANGUAGE_IDENTIFICATION = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#LanguageIdentification"), + shape_type=ShapeType.LIST, + members={"member": {"target": LANGUAGE_WITH_SCORE}}, +) + +LANGUAGE_OPTIONS = Schema( + id=ShapeID("com.amazonaws.transcribestreaming#LanguageOptions"), + shape_type=ShapeType.STRING, + traits=[ + Trait.new( + id=ShapeID("smithy.api#length"), + value=MappingProxyType({"min": 1, "max": 200}), + ), + Trait.new(id=ShapeID("smithy.api#pattern"), value="^[a-zA-Z-,]+$"), + ], +) + +MEDIA_ENCODING = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#MediaEncoding"), + shape_type=ShapeType.ENUM, + members={ + "PCM": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="pcm")], + }, + "OGG_OPUS": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="ogg-opus")], + }, + "FLAC": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="flac")], + }, + }, +) + +MEDIA_SAMPLE_RATE_HERTZ = Schema( + id=ShapeID("com.amazonaws.transcribestreaming#MediaSampleRateHertz"), + shape_type=ShapeType.INTEGER, + traits=[ + Trait.new(id=ShapeID("smithy.api#box")), + Trait.new( + id=ShapeID("smithy.api#range"), + value=MappingProxyType({"min": 8000, "max": 48000}), + ), + ], +) + +MEDICAL_ENTITY = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#MedicalEntity"), + members={ + "StartTime": { + "target": DOUBLE, + "traits": [Trait.new(id=ShapeID("smithy.api#default"), value=0)], + }, + "EndTime": { + "target": DOUBLE, + "traits": [Trait.new(id=ShapeID("smithy.api#default"), value=0)], + }, + "Category": {"target": STRING}, + "Content": {"target": STRING}, + "Confidence": {"target": CONFIDENCE}, + }, +) + +MEDICAL_ENTITY_LIST = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#MedicalEntityList"), + shape_type=ShapeType.LIST, + members={"member": {"target": MEDICAL_ENTITY}}, +) + +MEDICAL_ITEM = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#MedicalItem"), + members={ + "StartTime": { + "target": DOUBLE, + "traits": [Trait.new(id=ShapeID("smithy.api#default"), value=0)], + }, + "EndTime": { + "target": DOUBLE, + "traits": [Trait.new(id=ShapeID("smithy.api#default"), value=0)], + }, + "Type": {"target": ITEM_TYPE}, + "Content": {"target": STRING}, + "Confidence": {"target": CONFIDENCE}, + "Speaker": {"target": STRING}, + }, +) + +MEDICAL_ITEM_LIST = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#MedicalItemList"), + shape_type=ShapeType.LIST, + members={"member": {"target": MEDICAL_ITEM}}, +) + +MEDICAL_ALTERNATIVE = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#MedicalAlternative"), + members={ + "Transcript": {"target": STRING}, + "Items": {"target": MEDICAL_ITEM_LIST}, + "Entities": {"target": MEDICAL_ENTITY_LIST}, + }, +) + +MEDICAL_ALTERNATIVE_LIST = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#MedicalAlternativeList"), + shape_type=ShapeType.LIST, + members={"member": {"target": MEDICAL_ALTERNATIVE}}, +) + +MEDICAL_CONTENT_IDENTIFICATION_TYPE = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#MedicalContentIdentificationType"), + shape_type=ShapeType.ENUM, + members={ + "PHI": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="PHI")], + } + }, +) + +MEDICAL_RESULT = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#MedicalResult"), + members={ + "ResultId": {"target": STRING}, + "StartTime": { + "target": DOUBLE, + "traits": [Trait.new(id=ShapeID("smithy.api#default"), value=0)], + }, + "EndTime": { + "target": DOUBLE, + "traits": [Trait.new(id=ShapeID("smithy.api#default"), value=0)], + }, + "IsPartial": { + "target": BOOLEAN, + "traits": [Trait.new(id=ShapeID("smithy.api#default"), value=False)], + }, + "Alternatives": {"target": MEDICAL_ALTERNATIVE_LIST}, + "ChannelId": {"target": STRING}, + }, +) + +MEDICAL_RESULT_LIST = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#MedicalResultList"), + shape_type=ShapeType.LIST, + members={"member": {"target": MEDICAL_RESULT}}, +) + +MEDICAL_SCRIBE_AUDIO_EVENT = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#MedicalScribeAudioEvent"), + members={ + "AudioChunk": { + "target": AUDIO_CHUNK, + "traits": [ + Trait.new(id=ShapeID("smithy.api#eventPayload")), + Trait.new(id=ShapeID("smithy.api#required")), + ], + } + }, +) + +PRONOUNS = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#Pronouns"), + shape_type=ShapeType.ENUM, + traits=[Trait.new(id=ShapeID("smithy.api#sensitive"))], + members={ + "HE_HIM": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="HE_HIM")], + }, + "SHE_HER": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="SHE_HER")], + }, + "THEY_THEM": { + "target": UNIT, + "traits": [ + Trait.new(id=ShapeID("smithy.api#enumValue"), value="THEY_THEM") + ], + }, + }, +) + +MEDICAL_SCRIBE_PATIENT_CONTEXT = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#MedicalScribePatientContext"), + members={"Pronouns": {"target": PRONOUNS}}, +) + +MEDICAL_SCRIBE_CONTEXT = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#MedicalScribeContext"), + members={"PatientContext": {"target": MEDICAL_SCRIBE_PATIENT_CONTEXT}}, +) + +MEDICAL_SCRIBE_CONFIGURATION_EVENT = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#MedicalScribeConfigurationEvent"), + members={ + "VocabularyName": {"target": VOCABULARY_NAME}, + "VocabularyFilterName": {"target": VOCABULARY_FILTER_NAME}, + "VocabularyFilterMethod": {"target": MEDICAL_SCRIBE_VOCABULARY_FILTER_METHOD}, + "ResourceAccessRoleArn": { + "target": IAM_ROLE_ARN, + "traits": [Trait.new(id=ShapeID("smithy.api#required"))], + }, + "ChannelDefinitions": {"target": MEDICAL_SCRIBE_CHANNEL_DEFINITIONS}, + "EncryptionSettings": {"target": MEDICAL_SCRIBE_ENCRYPTION_SETTINGS}, + "PostStreamAnalyticsSettings": { + "target": MEDICAL_SCRIBE_POST_STREAM_ANALYTICS_SETTINGS, + "traits": [Trait.new(id=ShapeID("smithy.api#required"))], + }, + "MedicalScribeContext": {"target": MEDICAL_SCRIBE_CONTEXT}, + }, +) + +MEDICAL_SCRIBE_SESSION_CONTROL_EVENT_TYPE = Schema.collection( + id=ShapeID( + "com.amazonaws.transcribestreaming#MedicalScribeSessionControlEventType" + ), + shape_type=ShapeType.ENUM, + members={ + "END_OF_SESSION": { + "target": UNIT, + "traits": [ + Trait.new(id=ShapeID("smithy.api#enumValue"), value="END_OF_SESSION") + ], + } + }, +) + +MEDICAL_SCRIBE_SESSION_CONTROL_EVENT = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#MedicalScribeSessionControlEvent"), + members={ + "Type": { + "target": MEDICAL_SCRIBE_SESSION_CONTROL_EVENT_TYPE, + "traits": [Trait.new(id=ShapeID("smithy.api#required"))], + } + }, +) + +MEDICAL_SCRIBE_INPUT_STREAM = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#MedicalScribeInputStream"), + shape_type=ShapeType.UNION, + traits=[Trait.new(id=ShapeID("smithy.api#streaming"))], + members={ + "AudioEvent": {"target": MEDICAL_SCRIBE_AUDIO_EVENT}, + "SessionControlEvent": {"target": MEDICAL_SCRIBE_SESSION_CONTROL_EVENT}, + "ConfigurationEvent": {"target": MEDICAL_SCRIBE_CONFIGURATION_EVENT}, + }, +) + +MEDICAL_SCRIBE_TRANSCRIPT_ITEM_TYPE = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#MedicalScribeTranscriptItemType"), + shape_type=ShapeType.ENUM, + members={ + "PRONUNCIATION": { + "target": UNIT, + "traits": [ + Trait.new(id=ShapeID("smithy.api#enumValue"), value="pronunciation") + ], + }, + "PUNCTUATION": { + "target": UNIT, + "traits": [ + Trait.new(id=ShapeID("smithy.api#enumValue"), value="punctuation") + ], + }, + }, +) + +MEDICAL_SCRIBE_TRANSCRIPT_ITEM = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#MedicalScribeTranscriptItem"), + members={ + "BeginAudioTime": { + "target": DOUBLE, + "traits": [Trait.new(id=ShapeID("smithy.api#default"), value=0)], + }, + "EndAudioTime": { + "target": DOUBLE, + "traits": [Trait.new(id=ShapeID("smithy.api#default"), value=0)], + }, + "Type": {"target": MEDICAL_SCRIBE_TRANSCRIPT_ITEM_TYPE}, + "Confidence": {"target": CONFIDENCE}, + "Content": {"target": STRING}, + "VocabularyFilterMatch": {"target": NULLABLE_BOOLEAN}, + }, +) + +MEDICAL_SCRIBE_TRANSCRIPT_ITEM_LIST = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#MedicalScribeTranscriptItemList"), + shape_type=ShapeType.LIST, + members={"member": {"target": MEDICAL_SCRIBE_TRANSCRIPT_ITEM}}, +) + +MEDICAL_SCRIBE_TRANSCRIPT_SEGMENT = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#MedicalScribeTranscriptSegment"), + members={ + "SegmentId": {"target": STRING}, + "BeginAudioTime": { + "target": DOUBLE, + "traits": [Trait.new(id=ShapeID("smithy.api#default"), value=0)], + }, + "EndAudioTime": { + "target": DOUBLE, + "traits": [Trait.new(id=ShapeID("smithy.api#default"), value=0)], + }, + "Content": {"target": STRING}, + "Items": {"target": MEDICAL_SCRIBE_TRANSCRIPT_ITEM_LIST}, + "IsPartial": { + "target": BOOLEAN, + "traits": [Trait.new(id=ShapeID("smithy.api#default"), value=False)], + }, + "ChannelId": {"target": STRING}, + }, +) + +MEDICAL_SCRIBE_TRANSCRIPT_EVENT = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#MedicalScribeTranscriptEvent"), + members={"TranscriptSegment": {"target": MEDICAL_SCRIBE_TRANSCRIPT_SEGMENT}}, +) + +MEDICAL_SCRIBE_RESULT_STREAM = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#MedicalScribeResultStream"), + shape_type=ShapeType.UNION, + traits=[Trait.new(id=ShapeID("smithy.api#streaming"))], + members={ + "TranscriptEvent": {"target": MEDICAL_SCRIBE_TRANSCRIPT_EVENT}, + "BadRequestException": {"target": BAD_REQUEST_EXCEPTION}, + "LimitExceededException": {"target": LIMIT_EXCEEDED_EXCEPTION}, + "InternalFailureException": {"target": INTERNAL_FAILURE_EXCEPTION}, + "ConflictException": {"target": CONFLICT_EXCEPTION}, + "ServiceUnavailableException": {"target": SERVICE_UNAVAILABLE_EXCEPTION}, + }, +) + +MEDICAL_TRANSCRIPT = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#MedicalTranscript"), + members={"Results": {"target": MEDICAL_RESULT_LIST}}, +) + +MEDICAL_TRANSCRIPT_EVENT = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#MedicalTranscriptEvent"), + members={"Transcript": {"target": MEDICAL_TRANSCRIPT}}, +) + +MEDICAL_TRANSCRIPT_RESULT_STREAM = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#MedicalTranscriptResultStream"), + shape_type=ShapeType.UNION, + traits=[Trait.new(id=ShapeID("smithy.api#streaming"))], + members={ + "TranscriptEvent": {"target": MEDICAL_TRANSCRIPT_EVENT}, + "BadRequestException": {"target": BAD_REQUEST_EXCEPTION}, + "LimitExceededException": {"target": LIMIT_EXCEEDED_EXCEPTION}, + "InternalFailureException": {"target": INTERNAL_FAILURE_EXCEPTION}, + "ConflictException": {"target": CONFLICT_EXCEPTION}, + "ServiceUnavailableException": {"target": SERVICE_UNAVAILABLE_EXCEPTION}, + }, +) + +MODEL_NAME = Schema( + id=ShapeID("com.amazonaws.transcribestreaming#ModelName"), + shape_type=ShapeType.STRING, + traits=[ + Trait.new( + id=ShapeID("smithy.api#length"), + value=MappingProxyType({"min": 1, "max": 200}), + ), + Trait.new(id=ShapeID("smithy.api#pattern"), value="^[0-9a-zA-Z._-]+$"), + ], +) + +NUMBER_OF_CHANNELS = Schema( + id=ShapeID("com.amazonaws.transcribestreaming#NumberOfChannels"), + shape_type=ShapeType.INTEGER, + traits=[ + Trait.new(id=ShapeID("smithy.api#box")), + Trait.new(id=ShapeID("smithy.api#range"), value=MappingProxyType({"min": 2})), + ], +) + +PARTIAL_RESULTS_STABILITY = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#PartialResultsStability"), + shape_type=ShapeType.ENUM, + members={ + "HIGH": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="high")], + }, + "MEDIUM": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="medium")], + }, + "LOW": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="low")], + }, + }, +) + +PII_ENTITY_TYPES = Schema( + id=ShapeID("com.amazonaws.transcribestreaming#PiiEntityTypes"), + shape_type=ShapeType.STRING, + traits=[ + Trait.new( + id=ShapeID("smithy.api#length"), + value=MappingProxyType({"min": 1, "max": 300}), + ), + Trait.new(id=ShapeID("smithy.api#pattern"), value="^[A-Z_, ]+$"), + ], +) + +REQUEST_ID = Schema( + id=ShapeID("com.amazonaws.transcribestreaming#RequestId"), + shape_type=ShapeType.STRING, +) + +RESULT = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#Result"), + members={ + "ResultId": {"target": STRING}, + "StartTime": { + "target": DOUBLE, + "traits": [Trait.new(id=ShapeID("smithy.api#default"), value=0)], + }, + "EndTime": { + "target": DOUBLE, + "traits": [Trait.new(id=ShapeID("smithy.api#default"), value=0)], + }, + "IsPartial": { + "target": BOOLEAN, + "traits": [Trait.new(id=ShapeID("smithy.api#default"), value=False)], + }, + "Alternatives": {"target": ALTERNATIVE_LIST}, + "ChannelId": {"target": STRING}, + "LanguageCode": {"target": LANGUAGE_CODE}, + "LanguageIdentification": {"target": LANGUAGE_IDENTIFICATION}, + }, +) + +RESULT_LIST = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#ResultList"), + shape_type=ShapeType.LIST, + members={"member": {"target": RESULT}}, +) + +SPECIALTY = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#Specialty"), + shape_type=ShapeType.ENUM, + members={ + "PRIMARYCARE": { + "target": UNIT, + "traits": [ + Trait.new(id=ShapeID("smithy.api#enumValue"), value="PRIMARYCARE") + ], + }, + "CARDIOLOGY": { + "target": UNIT, + "traits": [ + Trait.new(id=ShapeID("smithy.api#enumValue"), value="CARDIOLOGY") + ], + }, + "NEUROLOGY": { + "target": UNIT, + "traits": [ + Trait.new(id=ShapeID("smithy.api#enumValue"), value="NEUROLOGY") + ], + }, + "ONCOLOGY": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="ONCOLOGY")], + }, + "RADIOLOGY": { + "target": UNIT, + "traits": [ + Trait.new(id=ShapeID("smithy.api#enumValue"), value="RADIOLOGY") + ], + }, + "UROLOGY": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="UROLOGY")], + }, + }, +) + +VOCABULARY_FILTER_METHOD = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#VocabularyFilterMethod"), + shape_type=ShapeType.ENUM, + members={ + "REMOVE": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="remove")], + }, + "MASK": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="mask")], + }, + "TAG": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="tag")], + }, + }, +) + +VOCABULARY_FILTER_NAMES = Schema( + id=ShapeID("com.amazonaws.transcribestreaming#VocabularyFilterNames"), + shape_type=ShapeType.STRING, + traits=[ + Trait.new( + id=ShapeID("smithy.api#length"), + value=MappingProxyType({"min": 1, "max": 3000}), + ), + Trait.new(id=ShapeID("smithy.api#pattern"), value="^[a-zA-Z0-9,-._]+$"), + ], +) + +VOCABULARY_NAMES = Schema( + id=ShapeID("com.amazonaws.transcribestreaming#VocabularyNames"), + shape_type=ShapeType.STRING, + traits=[ + Trait.new( + id=ShapeID("smithy.api#length"), + value=MappingProxyType({"min": 1, "max": 3000}), + ), + Trait.new(id=ShapeID("smithy.api#pattern"), value="^[a-zA-Z0-9,-._]+$"), + ], +) + +START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_INPUT = Schema.collection( + id=ShapeID( + "com.amazonaws.transcribestreaming#StartCallAnalyticsStreamTranscriptionInput" + ), + traits=[ + Trait.new( + id=ShapeID("smithy.synthetic#originalShapeId"), + value="com.amazonaws.transcribestreaming#StartCallAnalyticsStreamTranscriptionRequest", + ), + Trait.new(id=ShapeID("smithy.api#input")), + ], + members={ + "LanguageCode": { + "target": CALL_ANALYTICS_LANGUAGE_CODE, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-language-code", + ) + ], + }, + "MediaSampleRateHertz": { + "target": MEDIA_SAMPLE_RATE_HERTZ, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-sample-rate", + ), + Trait.new(id=ShapeID("smithy.api#required")), + ], + }, + "MediaEncoding": { + "target": MEDIA_ENCODING, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-media-encoding", + ), + Trait.new(id=ShapeID("smithy.api#required")), + ], + }, + "VocabularyName": { + "target": VOCABULARY_NAME, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-vocabulary-name", + ) + ], + }, + "SessionId": { + "target": SESSION_ID, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-session-id", + ) + ], + }, + "AudioStream": { + "target": AUDIO_STREAM, + "traits": [ + Trait.new(id=ShapeID("smithy.api#required")), + Trait.new(id=ShapeID("smithy.api#httpPayload")), + ], + }, + "VocabularyFilterName": { + "target": VOCABULARY_FILTER_NAME, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-vocabulary-filter-name", + ) + ], + }, + "VocabularyFilterMethod": { + "target": VOCABULARY_FILTER_METHOD, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-vocabulary-filter-method", + ) + ], + }, + "LanguageModelName": { + "target": MODEL_NAME, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-language-model-name", + ) + ], + }, + "IdentifyLanguage": { + "target": BOOLEAN, + "traits": [ + Trait.new(id=ShapeID("smithy.api#default"), value=False), + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-identify-language", + ), + ], + }, + "LanguageOptions": { + "target": LANGUAGE_OPTIONS, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-language-options", + ) + ], + }, + "PreferredLanguage": { + "target": CALL_ANALYTICS_LANGUAGE_CODE, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-preferred-language", + ) + ], + }, + "VocabularyNames": { + "target": VOCABULARY_NAMES, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-vocabulary-names", + ) + ], + }, + "VocabularyFilterNames": { + "target": VOCABULARY_FILTER_NAMES, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-vocabulary-filter-names", + ) + ], + }, + "EnablePartialResultsStabilization": { + "target": BOOLEAN, + "traits": [ + Trait.new(id=ShapeID("smithy.api#default"), value=False), + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-enable-partial-results-stabilization", + ), + ], + }, + "PartialResultsStability": { + "target": PARTIAL_RESULTS_STABILITY, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-partial-results-stability", + ) + ], + }, + "ContentIdentificationType": { + "target": CONTENT_IDENTIFICATION_TYPE, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-content-identification-type", + ) + ], + }, + "ContentRedactionType": { + "target": CONTENT_REDACTION_TYPE, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-content-redaction-type", + ) + ], + }, + "PiiEntityTypes": { + "target": PII_ENTITY_TYPES, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-pii-entity-types", + ) + ], + }, + }, +) + +START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_OUTPUT = Schema.collection( + id=ShapeID( + "com.amazonaws.transcribestreaming#StartCallAnalyticsStreamTranscriptionOutput" + ), + traits=[ + Trait.new( + id=ShapeID("smithy.synthetic#originalShapeId"), + value="com.amazonaws.transcribestreaming#StartCallAnalyticsStreamTranscriptionResponse", + ), + Trait.new(id=ShapeID("smithy.api#output")), + ], + members={ + "RequestId": { + "target": REQUEST_ID, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), value="x-amzn-request-id" + ) + ], + }, + "LanguageCode": { + "target": CALL_ANALYTICS_LANGUAGE_CODE, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-language-code", + ) + ], + }, + "MediaSampleRateHertz": { + "target": MEDIA_SAMPLE_RATE_HERTZ, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-sample-rate", + ) + ], + }, + "MediaEncoding": { + "target": MEDIA_ENCODING, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-media-encoding", + ) + ], + }, + "VocabularyName": { + "target": VOCABULARY_NAME, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-vocabulary-name", + ) + ], + }, + "SessionId": { + "target": SESSION_ID, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-session-id", + ) + ], + }, + "CallAnalyticsTranscriptResultStream": { + "target": CALL_ANALYTICS_TRANSCRIPT_RESULT_STREAM, + "traits": [Trait.new(id=ShapeID("smithy.api#httpPayload"))], + }, + "VocabularyFilterName": { + "target": VOCABULARY_FILTER_NAME, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-vocabulary-filter-name", + ) + ], + }, + "VocabularyFilterMethod": { + "target": VOCABULARY_FILTER_METHOD, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-vocabulary-filter-method", + ) + ], + }, + "LanguageModelName": { + "target": MODEL_NAME, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-language-model-name", + ) + ], + }, + "IdentifyLanguage": { + "target": BOOLEAN, + "traits": [ + Trait.new(id=ShapeID("smithy.api#default"), value=False), + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-identify-language", + ), + ], + }, + "LanguageOptions": { + "target": LANGUAGE_OPTIONS, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-language-options", + ) + ], + }, + "PreferredLanguage": { + "target": CALL_ANALYTICS_LANGUAGE_CODE, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-preferred-language", + ) + ], + }, + "VocabularyNames": { + "target": VOCABULARY_NAMES, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-vocabulary-names", + ) + ], + }, + "VocabularyFilterNames": { + "target": VOCABULARY_FILTER_NAMES, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-vocabulary-filter-names", + ) + ], + }, + "EnablePartialResultsStabilization": { + "target": BOOLEAN, + "traits": [ + Trait.new(id=ShapeID("smithy.api#default"), value=False), + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-enable-partial-results-stabilization", + ), + ], + }, + "PartialResultsStability": { + "target": PARTIAL_RESULTS_STABILITY, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-partial-results-stability", + ) + ], + }, + "ContentIdentificationType": { + "target": CONTENT_IDENTIFICATION_TYPE, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-content-identification-type", + ) + ], + }, + "ContentRedactionType": { + "target": CONTENT_REDACTION_TYPE, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-content-redaction-type", + ) + ], + }, + "PiiEntityTypes": { + "target": PII_ENTITY_TYPES, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-pii-entity-types", + ) + ], + }, + }, +) + +START_CALL_ANALYTICS_STREAM_TRANSCRIPTION = Schema( + id=ShapeID( + "com.amazonaws.transcribestreaming#StartCallAnalyticsStreamTranscription" + ), + shape_type=ShapeType.OPERATION, + traits=[ + Trait.new( + id=ShapeID("smithy.api#http"), + value=MappingProxyType( + { + "method": "POST", + "uri": "/call-analytics-stream-transcription", + "code": 200, + } + ), + ) + ], +) + +START_MEDICAL_SCRIBE_STREAM_INPUT = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#StartMedicalScribeStreamInput"), + traits=[ + Trait.new( + id=ShapeID("smithy.synthetic#originalShapeId"), + value="com.amazonaws.transcribestreaming#StartMedicalScribeStreamRequest", + ), + Trait.new(id=ShapeID("smithy.api#input")), + ], + members={ + "SessionId": { + "target": SESSION_ID, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-session-id", + ) + ], + }, + "LanguageCode": { + "target": MEDICAL_SCRIBE_LANGUAGE_CODE, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-language-code", + ), + Trait.new(id=ShapeID("smithy.api#required")), + ], + }, + "MediaSampleRateHertz": { + "target": MEDICAL_SCRIBE_MEDIA_SAMPLE_RATE_HERTZ, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-sample-rate", + ), + Trait.new(id=ShapeID("smithy.api#required")), + ], + }, + "MediaEncoding": { + "target": MEDICAL_SCRIBE_MEDIA_ENCODING, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-media-encoding", + ), + Trait.new(id=ShapeID("smithy.api#required")), + ], + }, + "InputStream": { + "target": MEDICAL_SCRIBE_INPUT_STREAM, + "traits": [ + Trait.new(id=ShapeID("smithy.api#required")), + Trait.new(id=ShapeID("smithy.api#httpPayload")), + ], + }, + }, +) + +START_MEDICAL_SCRIBE_STREAM_OUTPUT = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#StartMedicalScribeStreamOutput"), + traits=[ + Trait.new( + id=ShapeID("smithy.synthetic#originalShapeId"), + value="com.amazonaws.transcribestreaming#StartMedicalScribeStreamResponse", + ), + Trait.new(id=ShapeID("smithy.api#output")), + ], + members={ + "SessionId": { + "target": SESSION_ID, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-session-id", + ) + ], + }, + "RequestId": { + "target": REQUEST_ID, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), value="x-amzn-request-id" + ) + ], + }, + "LanguageCode": { + "target": MEDICAL_SCRIBE_LANGUAGE_CODE, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-language-code", + ) + ], + }, + "MediaSampleRateHertz": { + "target": MEDICAL_SCRIBE_MEDIA_SAMPLE_RATE_HERTZ, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-sample-rate", + ) + ], + }, + "MediaEncoding": { + "target": MEDICAL_SCRIBE_MEDIA_ENCODING, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-media-encoding", + ) + ], + }, + "ResultStream": { + "target": MEDICAL_SCRIBE_RESULT_STREAM, + "traits": [Trait.new(id=ShapeID("smithy.api#httpPayload"))], + }, + }, +) + +START_MEDICAL_SCRIBE_STREAM = Schema( + id=ShapeID("com.amazonaws.transcribestreaming#StartMedicalScribeStream"), + shape_type=ShapeType.OPERATION, + traits=[ + Trait.new( + id=ShapeID("smithy.api#http"), + value=MappingProxyType( + {"method": "POST", "uri": "/medical-scribe-stream", "code": 200} + ), + ) + ], +) + +TYPE = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#Type"), + shape_type=ShapeType.ENUM, + members={ + "CONVERSATION": { + "target": UNIT, + "traits": [ + Trait.new(id=ShapeID("smithy.api#enumValue"), value="CONVERSATION") + ], + }, + "DICTATION": { + "target": UNIT, + "traits": [ + Trait.new(id=ShapeID("smithy.api#enumValue"), value="DICTATION") + ], + }, + }, +) + +START_MEDICAL_STREAM_TRANSCRIPTION_INPUT = Schema.collection( + id=ShapeID( + "com.amazonaws.transcribestreaming#StartMedicalStreamTranscriptionInput" + ), + traits=[ + Trait.new( + id=ShapeID("smithy.synthetic#originalShapeId"), + value="com.amazonaws.transcribestreaming#StartMedicalStreamTranscriptionRequest", + ), + Trait.new(id=ShapeID("smithy.api#input")), + ], + members={ + "LanguageCode": { + "target": LANGUAGE_CODE, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-language-code", + ), + Trait.new(id=ShapeID("smithy.api#required")), + ], + }, + "MediaSampleRateHertz": { + "target": MEDIA_SAMPLE_RATE_HERTZ, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-sample-rate", + ), + Trait.new(id=ShapeID("smithy.api#required")), + ], + }, + "MediaEncoding": { + "target": MEDIA_ENCODING, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-media-encoding", + ), + Trait.new(id=ShapeID("smithy.api#required")), + ], + }, + "VocabularyName": { + "target": VOCABULARY_NAME, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-vocabulary-name", + ) + ], + }, + "Specialty": { + "target": SPECIALTY, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-specialty", + ), + Trait.new(id=ShapeID("smithy.api#required")), + ], + }, + "Type": { + "target": TYPE, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), value="x-amzn-transcribe-type" + ), + Trait.new(id=ShapeID("smithy.api#required")), + ], + }, + "ShowSpeakerLabel": { + "target": BOOLEAN, + "traits": [ + Trait.new(id=ShapeID("smithy.api#default"), value=False), + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-show-speaker-label", + ), + ], + }, + "SessionId": { + "target": SESSION_ID, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-session-id", + ) + ], + }, + "AudioStream": { + "target": AUDIO_STREAM, + "traits": [ + Trait.new(id=ShapeID("smithy.api#required")), + Trait.new(id=ShapeID("smithy.api#httpPayload")), + ], + }, + "EnableChannelIdentification": { + "target": BOOLEAN, + "traits": [ + Trait.new(id=ShapeID("smithy.api#default"), value=False), + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-enable-channel-identification", + ), + ], + }, + "NumberOfChannels": { + "target": NUMBER_OF_CHANNELS, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-number-of-channels", + ) + ], + }, + "ContentIdentificationType": { + "target": MEDICAL_CONTENT_IDENTIFICATION_TYPE, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-content-identification-type", + ) + ], + }, + }, +) + +START_MEDICAL_STREAM_TRANSCRIPTION_OUTPUT = Schema.collection( + id=ShapeID( + "com.amazonaws.transcribestreaming#StartMedicalStreamTranscriptionOutput" + ), + traits=[ + Trait.new( + id=ShapeID("smithy.synthetic#originalShapeId"), + value="com.amazonaws.transcribestreaming#StartMedicalStreamTranscriptionResponse", + ), + Trait.new(id=ShapeID("smithy.api#output")), + ], + members={ + "RequestId": { + "target": REQUEST_ID, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), value="x-amzn-request-id" + ) + ], + }, + "LanguageCode": { + "target": LANGUAGE_CODE, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-language-code", + ) + ], + }, + "MediaSampleRateHertz": { + "target": MEDIA_SAMPLE_RATE_HERTZ, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-sample-rate", + ) + ], + }, + "MediaEncoding": { + "target": MEDIA_ENCODING, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-media-encoding", + ) + ], + }, + "VocabularyName": { + "target": VOCABULARY_NAME, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-vocabulary-name", + ) + ], + }, + "Specialty": { + "target": SPECIALTY, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-specialty", + ) + ], + }, + "Type": { + "target": TYPE, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), value="x-amzn-transcribe-type" + ) + ], + }, + "ShowSpeakerLabel": { + "target": BOOLEAN, + "traits": [ + Trait.new(id=ShapeID("smithy.api#default"), value=False), + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-show-speaker-label", + ), + ], + }, + "SessionId": { + "target": SESSION_ID, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-session-id", + ) + ], + }, + "TranscriptResultStream": { + "target": MEDICAL_TRANSCRIPT_RESULT_STREAM, + "traits": [Trait.new(id=ShapeID("smithy.api#httpPayload"))], + }, + "EnableChannelIdentification": { + "target": BOOLEAN, + "traits": [ + Trait.new(id=ShapeID("smithy.api#default"), value=False), + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-enable-channel-identification", + ), + ], + }, + "NumberOfChannels": { + "target": NUMBER_OF_CHANNELS, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-number-of-channels", + ) + ], + }, + "ContentIdentificationType": { + "target": MEDICAL_CONTENT_IDENTIFICATION_TYPE, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-content-identification-type", + ) + ], + }, + }, +) + +START_MEDICAL_STREAM_TRANSCRIPTION = Schema( + id=ShapeID("com.amazonaws.transcribestreaming#StartMedicalStreamTranscription"), + shape_type=ShapeType.OPERATION, + traits=[ + Trait.new( + id=ShapeID("smithy.api#http"), + value=MappingProxyType( + {"method": "POST", "uri": "/medical-stream-transcription", "code": 200} + ), + ) + ], +) + +START_STREAM_TRANSCRIPTION_INPUT = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#StartStreamTranscriptionInput"), + traits=[ + Trait.new( + id=ShapeID("smithy.synthetic#originalShapeId"), + value="com.amazonaws.transcribestreaming#StartStreamTranscriptionRequest", + ), + Trait.new(id=ShapeID("smithy.api#input")), + ], + members={ + "LanguageCode": { + "target": LANGUAGE_CODE, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-language-code", + ) + ], + }, + "MediaSampleRateHertz": { + "target": MEDIA_SAMPLE_RATE_HERTZ, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-sample-rate", + ), + Trait.new(id=ShapeID("smithy.api#required")), + ], + }, + "MediaEncoding": { + "target": MEDIA_ENCODING, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-media-encoding", + ), + Trait.new(id=ShapeID("smithy.api#required")), + ], + }, + "VocabularyName": { + "target": VOCABULARY_NAME, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-vocabulary-name", + ) + ], + }, + "SessionId": { + "target": SESSION_ID, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-session-id", + ) + ], + }, + "AudioStream": { + "target": AUDIO_STREAM, + "traits": [ + Trait.new(id=ShapeID("smithy.api#required")), + Trait.new(id=ShapeID("smithy.api#httpPayload")), + ], + }, + "VocabularyFilterName": { + "target": VOCABULARY_FILTER_NAME, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-vocabulary-filter-name", + ) + ], + }, + "VocabularyFilterMethod": { + "target": VOCABULARY_FILTER_METHOD, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-vocabulary-filter-method", + ) + ], + }, + "ShowSpeakerLabel": { + "target": BOOLEAN, + "traits": [ + Trait.new(id=ShapeID("smithy.api#default"), value=False), + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-show-speaker-label", + ), + ], + }, + "EnableChannelIdentification": { + "target": BOOLEAN, + "traits": [ + Trait.new(id=ShapeID("smithy.api#default"), value=False), + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-enable-channel-identification", + ), + ], + }, + "NumberOfChannels": { + "target": NUMBER_OF_CHANNELS, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-number-of-channels", + ) + ], + }, + "EnablePartialResultsStabilization": { + "target": BOOLEAN, + "traits": [ + Trait.new(id=ShapeID("smithy.api#default"), value=False), + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-enable-partial-results-stabilization", + ), + ], + }, + "PartialResultsStability": { + "target": PARTIAL_RESULTS_STABILITY, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-partial-results-stability", + ) + ], + }, + "ContentIdentificationType": { + "target": CONTENT_IDENTIFICATION_TYPE, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-content-identification-type", + ) + ], + }, + "ContentRedactionType": { + "target": CONTENT_REDACTION_TYPE, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-content-redaction-type", + ) + ], + }, + "PiiEntityTypes": { + "target": PII_ENTITY_TYPES, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-pii-entity-types", + ) + ], + }, + "LanguageModelName": { + "target": MODEL_NAME, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-language-model-name", + ) + ], + }, + "IdentifyLanguage": { + "target": BOOLEAN, + "traits": [ + Trait.new(id=ShapeID("smithy.api#default"), value=False), + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-identify-language", + ), + ], + }, + "LanguageOptions": { + "target": LANGUAGE_OPTIONS, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-language-options", + ) + ], + }, + "PreferredLanguage": { + "target": LANGUAGE_CODE, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-preferred-language", + ) + ], + }, + "IdentifyMultipleLanguages": { + "target": BOOLEAN, + "traits": [ + Trait.new(id=ShapeID("smithy.api#default"), value=False), + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-identify-multiple-languages", + ), + ], + }, + "VocabularyNames": { + "target": VOCABULARY_NAMES, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-vocabulary-names", + ) + ], + }, + "VocabularyFilterNames": { + "target": VOCABULARY_FILTER_NAMES, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-vocabulary-filter-names", + ) + ], + }, + }, +) + +TRANSCRIPT = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#Transcript"), + members={"Results": {"target": RESULT_LIST}}, +) + +TRANSCRIPT_EVENT = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#TranscriptEvent"), + members={"Transcript": {"target": TRANSCRIPT}}, +) + +TRANSCRIPT_RESULT_STREAM = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#TranscriptResultStream"), + shape_type=ShapeType.UNION, + traits=[Trait.new(id=ShapeID("smithy.api#streaming"))], + members={ + "TranscriptEvent": {"target": TRANSCRIPT_EVENT}, + "BadRequestException": {"target": BAD_REQUEST_EXCEPTION}, + "LimitExceededException": {"target": LIMIT_EXCEEDED_EXCEPTION}, + "InternalFailureException": {"target": INTERNAL_FAILURE_EXCEPTION}, + "ConflictException": {"target": CONFLICT_EXCEPTION}, + "ServiceUnavailableException": {"target": SERVICE_UNAVAILABLE_EXCEPTION}, + }, +) + +START_STREAM_TRANSCRIPTION_OUTPUT = Schema.collection( + id=ShapeID("com.amazonaws.transcribestreaming#StartStreamTranscriptionOutput"), + traits=[ + Trait.new( + id=ShapeID("smithy.synthetic#originalShapeId"), + value="com.amazonaws.transcribestreaming#StartStreamTranscriptionResponse", + ), + Trait.new(id=ShapeID("smithy.api#output")), + ], + members={ + "RequestId": { + "target": REQUEST_ID, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), value="x-amzn-request-id" + ) + ], + }, + "LanguageCode": { + "target": LANGUAGE_CODE, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-language-code", + ) + ], + }, + "MediaSampleRateHertz": { + "target": MEDIA_SAMPLE_RATE_HERTZ, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-sample-rate", + ) + ], + }, + "MediaEncoding": { + "target": MEDIA_ENCODING, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-media-encoding", + ) + ], + }, + "VocabularyName": { + "target": VOCABULARY_NAME, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-vocabulary-name", + ) + ], + }, + "SessionId": { + "target": SESSION_ID, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-session-id", + ) + ], + }, + "TranscriptResultStream": { + "target": TRANSCRIPT_RESULT_STREAM, + "traits": [Trait.new(id=ShapeID("smithy.api#httpPayload"))], + }, + "VocabularyFilterName": { + "target": VOCABULARY_FILTER_NAME, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-vocabulary-filter-name", + ) + ], + }, + "VocabularyFilterMethod": { + "target": VOCABULARY_FILTER_METHOD, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-vocabulary-filter-method", + ) + ], + }, + "ShowSpeakerLabel": { + "target": BOOLEAN, + "traits": [ + Trait.new(id=ShapeID("smithy.api#default"), value=False), + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-show-speaker-label", + ), + ], + }, + "EnableChannelIdentification": { + "target": BOOLEAN, + "traits": [ + Trait.new(id=ShapeID("smithy.api#default"), value=False), + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-enable-channel-identification", + ), + ], + }, + "NumberOfChannels": { + "target": NUMBER_OF_CHANNELS, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-number-of-channels", + ) + ], + }, + "EnablePartialResultsStabilization": { + "target": BOOLEAN, + "traits": [ + Trait.new(id=ShapeID("smithy.api#default"), value=False), + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-enable-partial-results-stabilization", + ), + ], + }, + "PartialResultsStability": { + "target": PARTIAL_RESULTS_STABILITY, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-partial-results-stability", + ) + ], + }, + "ContentIdentificationType": { + "target": CONTENT_IDENTIFICATION_TYPE, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-content-identification-type", + ) + ], + }, + "ContentRedactionType": { + "target": CONTENT_REDACTION_TYPE, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-content-redaction-type", + ) + ], + }, + "PiiEntityTypes": { + "target": PII_ENTITY_TYPES, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-pii-entity-types", + ) + ], + }, + "LanguageModelName": { + "target": MODEL_NAME, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-language-model-name", + ) + ], + }, + "IdentifyLanguage": { + "target": BOOLEAN, + "traits": [ + Trait.new(id=ShapeID("smithy.api#default"), value=False), + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-identify-language", + ), + ], + }, + "LanguageOptions": { + "target": LANGUAGE_OPTIONS, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-language-options", + ) + ], + }, + "PreferredLanguage": { + "target": LANGUAGE_CODE, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-preferred-language", + ) + ], + }, + "IdentifyMultipleLanguages": { + "target": BOOLEAN, + "traits": [ + Trait.new(id=ShapeID("smithy.api#default"), value=False), + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-identify-multiple-languages", + ), + ], + }, + "VocabularyNames": { + "target": VOCABULARY_NAMES, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-vocabulary-names", + ) + ], + }, + "VocabularyFilterNames": { + "target": VOCABULARY_FILTER_NAMES, + "traits": [ + Trait.new( + id=ShapeID("smithy.api#httpHeader"), + value="x-amzn-transcribe-vocabulary-filter-names", + ) + ], + }, + }, +) + +START_STREAM_TRANSCRIPTION = Schema( + id=ShapeID("com.amazonaws.transcribestreaming#StartStreamTranscription"), + shape_type=ShapeType.OPERATION, + traits=[ + Trait.new( + id=ShapeID("smithy.api#http"), + value=MappingProxyType( + {"method": "POST", "uri": "/stream-transcription", "code": 200} + ), + ) + ], +) + +TRANSCRIBE = Schema( + id=ShapeID("com.amazonaws.transcribestreaming#Transcribe"), + shape_type=ShapeType.SERVICE, + traits=[ + Trait.new( + id=ShapeID("aws.auth#sigv4"), value=MappingProxyType({"name": "transcribe"}) + ), + Trait.new( + id=ShapeID("smithy.api#title"), value="Amazon Transcribe Streaming Service" + ), + Trait.new( + id=ShapeID("smithy.rules#endpointTests"), + value=MappingProxyType( + { + "testCases": ( + MappingProxyType( + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": MappingProxyType( + { + "endpoint": MappingProxyType( + { + "url": "https://transcribestreaming.ap-northeast-1.amazonaws.com" + } + ) + } + ), + "params": MappingProxyType( + { + "Region": "ap-northeast-1", + "UseFIPS": False, + "UseDualStack": False, + } + ), + } + ), + MappingProxyType( + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": MappingProxyType( + { + "endpoint": MappingProxyType( + { + "url": "https://transcribestreaming.ap-northeast-2.amazonaws.com" + } + ) + } + ), + "params": MappingProxyType( + { + "Region": "ap-northeast-2", + "UseFIPS": False, + "UseDualStack": False, + } + ), + } + ), + MappingProxyType( + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": MappingProxyType( + { + "endpoint": MappingProxyType( + { + "url": "https://transcribestreaming.ap-southeast-2.amazonaws.com" + } + ) + } + ), + "params": MappingProxyType( + { + "Region": "ap-southeast-2", + "UseFIPS": False, + "UseDualStack": False, + } + ), + } + ), + MappingProxyType( + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": MappingProxyType( + { + "endpoint": MappingProxyType( + { + "url": "https://transcribestreaming.ca-central-1.amazonaws.com" + } + ) + } + ), + "params": MappingProxyType( + { + "Region": "ca-central-1", + "UseFIPS": False, + "UseDualStack": False, + } + ), + } + ), + MappingProxyType( + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": MappingProxyType( + { + "endpoint": MappingProxyType( + { + "url": "https://transcribestreaming.eu-central-1.amazonaws.com" + } + ) + } + ), + "params": MappingProxyType( + { + "Region": "eu-central-1", + "UseFIPS": False, + "UseDualStack": False, + } + ), + } + ), + MappingProxyType( + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": MappingProxyType( + { + "endpoint": MappingProxyType( + { + "url": "https://transcribestreaming.eu-west-1.amazonaws.com" + } + ) + } + ), + "params": MappingProxyType( + { + "Region": "eu-west-1", + "UseFIPS": False, + "UseDualStack": False, + } + ), + } + ), + MappingProxyType( + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": MappingProxyType( + { + "endpoint": MappingProxyType( + { + "url": "https://transcribestreaming.eu-west-2.amazonaws.com" + } + ) + } + ), + "params": MappingProxyType( + { + "Region": "eu-west-2", + "UseFIPS": False, + "UseDualStack": False, + } + ), + } + ), + MappingProxyType( + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": MappingProxyType( + { + "endpoint": MappingProxyType( + { + "url": "https://transcribestreaming.sa-east-1.amazonaws.com" + } + ) + } + ), + "params": MappingProxyType( + { + "Region": "sa-east-1", + "UseFIPS": False, + "UseDualStack": False, + } + ), + } + ), + MappingProxyType( + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": MappingProxyType( + { + "endpoint": MappingProxyType( + { + "url": "https://transcribestreaming.us-east-1.amazonaws.com" + } + ) + } + ), + "params": MappingProxyType( + { + "Region": "us-east-1", + "UseFIPS": False, + "UseDualStack": False, + } + ), + } + ), + MappingProxyType( + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": MappingProxyType( + { + "endpoint": MappingProxyType( + { + "url": "https://transcribestreaming.us-east-2.amazonaws.com" + } + ) + } + ), + "params": MappingProxyType( + { + "Region": "us-east-2", + "UseFIPS": False, + "UseDualStack": False, + } + ), + } + ), + MappingProxyType( + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": MappingProxyType( + { + "endpoint": MappingProxyType( + { + "url": "https://transcribestreaming.us-west-2.amazonaws.com" + } + ) + } + ), + "params": MappingProxyType( + { + "Region": "us-west-2", + "UseFIPS": False, + "UseDualStack": False, + } + ), + } + ), + MappingProxyType( + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": MappingProxyType( + { + "endpoint": MappingProxyType( + { + "url": "https://transcribestreaming-fips.us-east-1.api.aws" + } + ) + } + ), + "params": MappingProxyType( + { + "Region": "us-east-1", + "UseFIPS": True, + "UseDualStack": True, + } + ), + } + ), + MappingProxyType( + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": MappingProxyType( + { + "endpoint": MappingProxyType( + { + "url": "https://transcribestreaming-fips.us-east-1.amazonaws.com" + } + ) + } + ), + "params": MappingProxyType( + { + "Region": "us-east-1", + "UseFIPS": True, + "UseDualStack": False, + } + ), + } + ), + MappingProxyType( + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": MappingProxyType( + { + "endpoint": MappingProxyType( + { + "url": "https://transcribestreaming.us-east-1.api.aws" + } + ) + } + ), + "params": MappingProxyType( + { + "Region": "us-east-1", + "UseFIPS": False, + "UseDualStack": True, + } + ), + } + ), + MappingProxyType( + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": MappingProxyType( + { + "endpoint": MappingProxyType( + { + "url": "https://transcribestreaming.cn-north-1.amazonaws.com.cn" + } + ) + } + ), + "params": MappingProxyType( + { + "Region": "cn-north-1", + "UseFIPS": False, + "UseDualStack": False, + } + ), + } + ), + MappingProxyType( + { + "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack disabled", + "expect": MappingProxyType( + { + "endpoint": MappingProxyType( + { + "url": "https://transcribestreaming.cn-northwest-1.amazonaws.com.cn" + } + ) + } + ), + "params": MappingProxyType( + { + "Region": "cn-northwest-1", + "UseFIPS": False, + "UseDualStack": False, + } + ), + } + ), + MappingProxyType( + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": MappingProxyType( + { + "endpoint": MappingProxyType( + { + "url": "https://transcribestreaming-fips.cn-north-1.api.amazonwebservices.com.cn" + } + ) + } + ), + "params": MappingProxyType( + { + "Region": "cn-north-1", + "UseFIPS": True, + "UseDualStack": True, + } + ), + } + ), + MappingProxyType( + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": MappingProxyType( + { + "endpoint": MappingProxyType( + { + "url": "https://transcribestreaming-fips.cn-north-1.amazonaws.com.cn" + } + ) + } + ), + "params": MappingProxyType( + { + "Region": "cn-north-1", + "UseFIPS": True, + "UseDualStack": False, + } + ), + } + ), + MappingProxyType( + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": MappingProxyType( + { + "endpoint": MappingProxyType( + { + "url": "https://transcribestreaming.cn-north-1.api.amazonwebservices.com.cn" + } + ) + } + ), + "params": MappingProxyType( + { + "Region": "cn-north-1", + "UseFIPS": False, + "UseDualStack": True, + } + ), + } + ), + MappingProxyType( + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": MappingProxyType( + { + "endpoint": MappingProxyType( + { + "url": "https://transcribestreaming.us-gov-east-1.amazonaws.com" + } + ) + } + ), + "params": MappingProxyType( + { + "Region": "us-gov-east-1", + "UseFIPS": False, + "UseDualStack": False, + } + ), + } + ), + MappingProxyType( + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": MappingProxyType( + { + "endpoint": MappingProxyType( + { + "url": "https://transcribestreaming.us-gov-west-1.amazonaws.com" + } + ) + } + ), + "params": MappingProxyType( + { + "Region": "us-gov-west-1", + "UseFIPS": False, + "UseDualStack": False, + } + ), + } + ), + MappingProxyType( + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": MappingProxyType( + { + "endpoint": MappingProxyType( + { + "url": "https://transcribestreaming-fips.us-gov-east-1.api.aws" + } + ) + } + ), + "params": MappingProxyType( + { + "Region": "us-gov-east-1", + "UseFIPS": True, + "UseDualStack": True, + } + ), + } + ), + MappingProxyType( + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": MappingProxyType( + { + "endpoint": MappingProxyType( + { + "url": "https://transcribestreaming-fips.us-gov-east-1.amazonaws.com" + } + ) + } + ), + "params": MappingProxyType( + { + "Region": "us-gov-east-1", + "UseFIPS": True, + "UseDualStack": False, + } + ), + } + ), + MappingProxyType( + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": MappingProxyType( + { + "endpoint": MappingProxyType( + { + "url": "https://transcribestreaming.us-gov-east-1.api.aws" + } + ) + } + ), + "params": MappingProxyType( + { + "Region": "us-gov-east-1", + "UseFIPS": False, + "UseDualStack": True, + } + ), + } + ), + MappingProxyType( + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": MappingProxyType( + { + "endpoint": MappingProxyType( + { + "url": "https://transcribestreaming.us-iso-east-1.c2s.ic.gov" + } + ) + } + ), + "params": MappingProxyType( + { + "Region": "us-iso-east-1", + "UseFIPS": False, + "UseDualStack": False, + } + ), + } + ), + MappingProxyType( + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": MappingProxyType( + { + "endpoint": MappingProxyType( + { + "url": "https://transcribestreaming-fips.us-iso-east-1.c2s.ic.gov" + } + ) + } + ), + "params": MappingProxyType( + { + "Region": "us-iso-east-1", + "UseFIPS": True, + "UseDualStack": False, + } + ), + } + ), + MappingProxyType( + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": MappingProxyType( + { + "endpoint": MappingProxyType( + { + "url": "https://transcribestreaming-fips.us-isob-east-1.sc2s.sgov.gov" + } + ) + } + ), + "params": MappingProxyType( + { + "Region": "us-isob-east-1", + "UseFIPS": True, + "UseDualStack": False, + } + ), + } + ), + MappingProxyType( + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": MappingProxyType( + { + "endpoint": MappingProxyType( + { + "url": "https://transcribestreaming.us-isob-east-1.sc2s.sgov.gov" + } + ) + } + ), + "params": MappingProxyType( + { + "Region": "us-isob-east-1", + "UseFIPS": False, + "UseDualStack": False, + } + ), + } + ), + MappingProxyType( + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": MappingProxyType( + { + "endpoint": MappingProxyType( + {"url": "https://example.com"} + ) + } + ), + "params": MappingProxyType( + { + "Region": "us-east-1", + "UseFIPS": False, + "UseDualStack": False, + "Endpoint": "https://example.com", + } + ), + } + ), + MappingProxyType( + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": MappingProxyType( + { + "endpoint": MappingProxyType( + {"url": "https://example.com"} + ) + } + ), + "params": MappingProxyType( + { + "UseFIPS": False, + "UseDualStack": False, + "Endpoint": "https://example.com", + } + ), + } + ), + MappingProxyType( + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": MappingProxyType( + { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + } + ), + "params": MappingProxyType( + { + "Region": "us-east-1", + "UseFIPS": True, + "UseDualStack": False, + "Endpoint": "https://example.com", + } + ), + } + ), + MappingProxyType( + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": MappingProxyType( + { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + } + ), + "params": MappingProxyType( + { + "Region": "us-east-1", + "UseFIPS": False, + "UseDualStack": True, + "Endpoint": "https://example.com", + } + ), + } + ), + MappingProxyType( + { + "documentation": "Missing region", + "expect": MappingProxyType( + {"error": "Invalid Configuration: Missing Region"} + ), + } + ), + ), + "version": "1.0", + } + ), + ), + Trait.new( + id=ShapeID("smithy.rules#endpointRuleSet"), + value=MappingProxyType( + { + "version": "1.0", + "parameters": MappingProxyType( + { + "Region": MappingProxyType( + { + "builtIn": "AWS::Region", + "required": False, + "documentation": "The AWS region used to dispatch the request.", + "type": "string", + } + ), + "UseDualStack": MappingProxyType( + { + "builtIn": "AWS::UseDualStack", + "required": True, + "default": False, + "documentation": "When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.", + "type": "boolean", + } + ), + "UseFIPS": MappingProxyType( + { + "builtIn": "AWS::UseFIPS", + "required": True, + "default": False, + "documentation": "When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.", + "type": "boolean", + } + ), + "Endpoint": MappingProxyType( + { + "builtIn": "SDK::Endpoint", + "required": False, + "documentation": "Override the endpoint used to send this request", + "type": "string", + } + ), + } + ), + "rules": ( + MappingProxyType( + { + "conditions": ( + MappingProxyType( + { + "fn": "isSet", + "argv": ( + MappingProxyType({"ref": "Endpoint"}), + ), + } + ), + ), + "rules": ( + MappingProxyType( + { + "conditions": ( + MappingProxyType( + { + "fn": "booleanEquals", + "argv": ( + MappingProxyType( + {"ref": "UseFIPS"} + ), + True, + ), + } + ), + ), + "error": "Invalid Configuration: FIPS and custom endpoint are not supported", + "type": "error", + } + ), + MappingProxyType( + { + "conditions": ( + MappingProxyType( + { + "fn": "booleanEquals", + "argv": ( + MappingProxyType( + {"ref": "UseDualStack"} + ), + True, + ), + } + ), + ), + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error", + } + ), + MappingProxyType( + { + "conditions": (), + "endpoint": MappingProxyType( + { + "url": MappingProxyType( + {"ref": "Endpoint"} + ), + "properties": MappingProxyType({}), + "headers": MappingProxyType({}), + } + ), + "type": "endpoint", + } + ), + ), + "type": "tree", + } + ), + MappingProxyType( + { + "conditions": ( + MappingProxyType( + { + "fn": "isSet", + "argv": ( + MappingProxyType({"ref": "Region"}), + ), + } + ), + ), + "rules": ( + MappingProxyType( + { + "conditions": ( + MappingProxyType( + { + "fn": "aws.partition", + "argv": ( + MappingProxyType( + {"ref": "Region"} + ), + ), + "assign": "PartitionResult", + } + ), + ), + "rules": ( + MappingProxyType( + { + "conditions": ( + MappingProxyType( + { + "fn": "booleanEquals", + "argv": ( + MappingProxyType( + { + "ref": "UseFIPS" + } + ), + True, + ), + } + ), + MappingProxyType( + { + "fn": "booleanEquals", + "argv": ( + MappingProxyType( + { + "ref": "UseDualStack" + } + ), + True, + ), + } + ), + ), + "rules": ( + MappingProxyType( + { + "conditions": ( + MappingProxyType( + { + "fn": "booleanEquals", + "argv": ( + True, + MappingProxyType( + { + "fn": "getAttr", + "argv": ( + MappingProxyType( + { + "ref": "PartitionResult" + } + ), + "supportsFIPS", + ), + } + ), + ), + } + ), + MappingProxyType( + { + "fn": "booleanEquals", + "argv": ( + True, + MappingProxyType( + { + "fn": "getAttr", + "argv": ( + MappingProxyType( + { + "ref": "PartitionResult" + } + ), + "supportsDualStack", + ), + } + ), + ), + } + ), + ), + "rules": ( + MappingProxyType( + { + "conditions": (), + "endpoint": MappingProxyType( + { + "url": "https://transcribestreaming-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": MappingProxyType( + {} + ), + "headers": MappingProxyType( + {} + ), + } + ), + "type": "endpoint", + } + ), + ), + "type": "tree", + } + ), + MappingProxyType( + { + "conditions": (), + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error", + } + ), + ), + "type": "tree", + } + ), + MappingProxyType( + { + "conditions": ( + MappingProxyType( + { + "fn": "booleanEquals", + "argv": ( + MappingProxyType( + { + "ref": "UseFIPS" + } + ), + True, + ), + } + ), + ), + "rules": ( + MappingProxyType( + { + "conditions": ( + MappingProxyType( + { + "fn": "booleanEquals", + "argv": ( + MappingProxyType( + { + "fn": "getAttr", + "argv": ( + MappingProxyType( + { + "ref": "PartitionResult" + } + ), + "supportsFIPS", + ), + } + ), + True, + ), + } + ), + ), + "rules": ( + MappingProxyType( + { + "conditions": (), + "endpoint": MappingProxyType( + { + "url": "https://transcribestreaming-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": MappingProxyType( + {} + ), + "headers": MappingProxyType( + {} + ), + } + ), + "type": "endpoint", + } + ), + ), + "type": "tree", + } + ), + MappingProxyType( + { + "conditions": (), + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error", + } + ), + ), + "type": "tree", + } + ), + MappingProxyType( + { + "conditions": ( + MappingProxyType( + { + "fn": "booleanEquals", + "argv": ( + MappingProxyType( + { + "ref": "UseDualStack" + } + ), + True, + ), + } + ), + ), + "rules": ( + MappingProxyType( + { + "conditions": ( + MappingProxyType( + { + "fn": "booleanEquals", + "argv": ( + True, + MappingProxyType( + { + "fn": "getAttr", + "argv": ( + MappingProxyType( + { + "ref": "PartitionResult" + } + ), + "supportsDualStack", + ), + } + ), + ), + } + ), + ), + "rules": ( + MappingProxyType( + { + "conditions": (), + "endpoint": MappingProxyType( + { + "url": "https://transcribestreaming.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": MappingProxyType( + {} + ), + "headers": MappingProxyType( + {} + ), + } + ), + "type": "endpoint", + } + ), + ), + "type": "tree", + } + ), + MappingProxyType( + { + "conditions": (), + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error", + } + ), + ), + "type": "tree", + } + ), + MappingProxyType( + { + "conditions": (), + "endpoint": MappingProxyType( + { + "url": "https://transcribestreaming.{Region}.{PartitionResult#dnsSuffix}", + "properties": MappingProxyType( + {} + ), + "headers": MappingProxyType( + {} + ), + } + ), + "type": "endpoint", + } + ), + ), + "type": "tree", + } + ), + ), + "type": "tree", + } + ), + MappingProxyType( + { + "conditions": (), + "error": "Invalid Configuration: Missing Region", + "type": "error", + } + ), + ), + } + ), + ), + Trait.new( + id=ShapeID("aws.api#service"), + value=MappingProxyType( + { + "sdkId": "Transcribe Streaming", + "arnNamespace": "transcribe", + "cloudFormationName": "TranscribeStreaming", + "cloudTrailEventSource": "transcribestreaming.amazonaws.com", + "endpointPrefix": "transcribestreaming", + } + ), + ), + Trait.new( + id=ShapeID("aws.protocols#restJson1"), + value=MappingProxyType( + {"http": ("http/1.1", "h2"), "eventStreamHttp": ("h2",)} + ), + ), + ], +) diff --git a/clients/aws-sdk-transcribe-streaming/src/aws_sdk_transcribe_streaming/auth.py b/clients/aws-sdk-transcribe-streaming/src/aws_sdk_transcribe_streaming/auth.py new file mode 100644 index 0000000..fcc4043 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/src/aws_sdk_transcribe_streaming/auth.py @@ -0,0 +1,29 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +from typing import Any + +from smithy_core.auth import AuthOption, AuthParams +from smithy_core.interfaces.auth import AuthOption as AuthOptionProtocol +from smithy_core.shapes import ShapeID + + +class HTTPAuthSchemeResolver: + def resolve_auth_scheme( + self, auth_parameters: AuthParams[Any, Any] + ) -> list[AuthOptionProtocol]: + auth_options: list[AuthOptionProtocol] = [] + + if (option := _generate_sigv4_option(auth_parameters)) is not None: + auth_options.append(option) + + return auth_options + + +def _generate_sigv4_option( + auth_params: AuthParams[Any, Any], +) -> AuthOptionProtocol | None: + return AuthOption( + scheme_id=ShapeID("aws.auth#sigv4"), + identity_properties={}, # type: ignore + signer_properties={}, # type: ignore + ) diff --git a/clients/aws-sdk-transcribe-streaming/src/aws_sdk_transcribe_streaming/client.py b/clients/aws-sdk-transcribe-streaming/src/aws_sdk_transcribe_streaming/client.py new file mode 100644 index 0000000..425e9fe --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/src/aws_sdk_transcribe_streaming/client.py @@ -0,0 +1,378 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +from copy import deepcopy +import logging + +from smithy_core.aio.client import ClientCall, RequestPipeline +from smithy_core.aio.eventstream import DuplexEventStream +from smithy_core.exceptions import ExpectationNotMetError +from smithy_core.interceptors import InterceptorChain +from smithy_core.types import TypedProperties +from smithy_http.plugins import user_agent_plugin + +from .config import Config, Plugin +from .models import ( + AudioStream, + CallAnalyticsTranscriptResultStream, + GET_MEDICAL_SCRIBE_STREAM, + GetMedicalScribeStreamInput, + GetMedicalScribeStreamOutput, + MedicalScribeInputStream, + MedicalScribeResultStream, + MedicalTranscriptResultStream, + START_CALL_ANALYTICS_STREAM_TRANSCRIPTION, + START_MEDICAL_SCRIBE_STREAM, + START_MEDICAL_STREAM_TRANSCRIPTION, + START_STREAM_TRANSCRIPTION, + StartCallAnalyticsStreamTranscriptionInput, + StartCallAnalyticsStreamTranscriptionOutput, + StartMedicalScribeStreamInput, + StartMedicalScribeStreamOutput, + StartMedicalStreamTranscriptionInput, + StartMedicalStreamTranscriptionOutput, + StartStreamTranscriptionInput, + StartStreamTranscriptionOutput, + TranscriptResultStream, + _CallAnalyticsTranscriptResultStreamDeserializer, + _MedicalScribeResultStreamDeserializer, + _MedicalTranscriptResultStreamDeserializer, + _TranscriptResultStreamDeserializer, +) +from .user_agent import aws_user_agent_plugin + + +logger = logging.getLogger(__name__) + + +class TranscribeStreamingClient: + """ + Amazon Transcribe streaming offers four main types of real-time transcription: **Standard**, **Medical**, **Call Analytics**, and **Health Scribe**. + + * **Standard transcriptions** are the most common option. Refer to for details. + + * **Medical transcriptions** are tailored to medical professionals and incorporate medical terms. A common use case for this service is transcribing doctor-patient dialogue in real time, so doctors can focus on their patient instead of taking notes. Refer to for details. + + * **Call Analytics transcriptions** are designed for use with call center audio on two different channels; if you're looking for insight into customer service calls, use this option. Refer to for details. + + * **HealthScribe transcriptions** are designed to automatically create clinical notes from patient-clinician conversations using generative AI. Refer to [here] for details. + + :param config: Optional configuration for the client. Here you can set things like the + endpoint for HTTP services or auth credentials. + + :param plugins: A list of callables that modify the configuration dynamically. These + can be used to set defaults, for example. + """ + + def __init__( + self, config: Config | None = None, plugins: list[Plugin] | None = None + ): + self._config = config or Config() + + client_plugins: list[Plugin] = [aws_user_agent_plugin, user_agent_plugin] + if plugins: + client_plugins.extend(plugins) + + for plugin in client_plugins: + plugin(self._config) + + async def get_medical_scribe_stream( + self, input: GetMedicalScribeStreamInput, plugins: list[Plugin] | None = None + ) -> GetMedicalScribeStreamOutput: + """ + Provides details about the specified Amazon Web Services HealthScribe streaming + session. To view the status of the streaming session, check the ``StreamStatus`` + field in the response. To get the details of post-stream analytics, including + its status, check the ``PostStreamAnalyticsResult`` field in the response. + + :param input: The operation's input. + + :param plugins: A list of callables that modify the configuration dynamically. + Changes made by these plugins only apply for the duration of the operation + execution and will not affect any other operation invocations. + + """ + operation_plugins: list[Plugin] = [] + if plugins: + operation_plugins.extend(plugins) + config = deepcopy(self._config) + for plugin in operation_plugins: + plugin(config) + if config.protocol is None or config.transport is None: + raise ExpectationNotMetError( + "protocol and transport MUST be set on the config to make calls." + ) + pipeline = RequestPipeline(protocol=config.protocol, transport=config.transport) + call = ClientCall( + input=input, + operation=GET_MEDICAL_SCRIBE_STREAM, + context=TypedProperties({"config": config}), + interceptor=InterceptorChain(config.interceptors), + auth_scheme_resolver=config.auth_scheme_resolver, + supported_auth_schemes=config.auth_schemes, + endpoint_resolver=config.endpoint_resolver, + retry_strategy=config.retry_strategy, + ) + + return await pipeline(call) + + async def start_call_analytics_stream_transcription( + self, + input: StartCallAnalyticsStreamTranscriptionInput, + plugins: list[Plugin] | None = None, + ) -> DuplexEventStream[ + AudioStream, + CallAnalyticsTranscriptResultStream, + StartCallAnalyticsStreamTranscriptionOutput, + ]: + """ + Starts a bidirectional HTTP/2 or WebSocket stream where audio is streamed to + Amazon Transcribe and the transcription results are streamed to your + application. Use this operation for `Call Analytics `_ + transcriptions. + + The following parameters are required: + + * ``language-code`` or ``identify-language`` + + * ``media-encoding`` + + * ``sample-rate`` + + For more information on streaming with Amazon Transcribe, see `Transcribing streaming audio `_ + . + + :param input: The operation's input. + + :param plugins: A list of callables that modify the configuration dynamically. + Changes made by these plugins only apply for the duration of the operation + execution and will not affect any other operation invocations. + + """ + operation_plugins: list[Plugin] = [] + if plugins: + operation_plugins.extend(plugins) + config = deepcopy(self._config) + for plugin in operation_plugins: + plugin(config) + if config.protocol is None or config.transport is None: + raise ExpectationNotMetError( + "protocol and transport MUST be set on the config to make calls." + ) + pipeline = RequestPipeline(protocol=config.protocol, transport=config.transport) + call = ClientCall( + input=input, + operation=START_CALL_ANALYTICS_STREAM_TRANSCRIPTION, + context=TypedProperties({"config": config}), + interceptor=InterceptorChain(config.interceptors), + auth_scheme_resolver=config.auth_scheme_resolver, + supported_auth_schemes=config.auth_schemes, + endpoint_resolver=config.endpoint_resolver, + retry_strategy=config.retry_strategy, + ) + + return await pipeline.duplex_stream( + call, + AudioStream, + CallAnalyticsTranscriptResultStream, + _CallAnalyticsTranscriptResultStreamDeserializer().deserialize, + ) + + async def start_medical_scribe_stream( + self, input: StartMedicalScribeStreamInput, plugins: list[Plugin] | None = None + ) -> DuplexEventStream[ + MedicalScribeInputStream, + MedicalScribeResultStream, + StartMedicalScribeStreamOutput, + ]: + """ + Starts a bidirectional HTTP/2 stream, where audio is streamed to Amazon Web + Services HealthScribe and the transcription results are streamed to your + application. + + When you start a stream, you first specify the stream configuration in a + ``MedicalScribeConfigurationEvent``. This event includes channel definitions, + encryption settings, medical scribe context, and post-stream analytics settings, + such as the output configuration for aggregated transcript and clinical note + generation. These are additional streaming session configurations beyond those + provided in your initial start request headers. Whether you are starting a new + session or resuming an existing session, your first event must be a + ``MedicalScribeConfigurationEvent``. + + After you send a ``MedicalScribeConfigurationEvent``, you start ``AudioEvents`` + and Amazon Web Services HealthScribe responds with real-time transcription + results. When you are finished, to start processing the results with the + post-stream analytics, send a ``MedicalScribeSessionControlEvent`` with a + ``Type`` of ``END_OF_SESSION`` and Amazon Web Services HealthScribe starts the + analytics. + + You can pause or resume streaming. To pause streaming, complete the input stream + without sending the ``MedicalScribeSessionControlEvent``. To resume streaming, + call the ``StartMedicalScribeStream`` and specify the same SessionId you used to + start the stream. + + The following parameters are required: + + * ``language-code`` + + * ``media-encoding`` + + * ``media-sample-rate-hertz`` + + For more information on streaming with Amazon Web Services HealthScribe, see + `Amazon Web Services HealthScribe `_ + . + + :param input: The operation's input. + + :param plugins: A list of callables that modify the configuration dynamically. + Changes made by these plugins only apply for the duration of the operation + execution and will not affect any other operation invocations. + + """ + operation_plugins: list[Plugin] = [] + if plugins: + operation_plugins.extend(plugins) + config = deepcopy(self._config) + for plugin in operation_plugins: + plugin(config) + if config.protocol is None or config.transport is None: + raise ExpectationNotMetError( + "protocol and transport MUST be set on the config to make calls." + ) + pipeline = RequestPipeline(protocol=config.protocol, transport=config.transport) + call = ClientCall( + input=input, + operation=START_MEDICAL_SCRIBE_STREAM, + context=TypedProperties({"config": config}), + interceptor=InterceptorChain(config.interceptors), + auth_scheme_resolver=config.auth_scheme_resolver, + supported_auth_schemes=config.auth_schemes, + endpoint_resolver=config.endpoint_resolver, + retry_strategy=config.retry_strategy, + ) + + return await pipeline.duplex_stream( + call, + MedicalScribeInputStream, + MedicalScribeResultStream, + _MedicalScribeResultStreamDeserializer().deserialize, + ) + + async def start_medical_stream_transcription( + self, + input: StartMedicalStreamTranscriptionInput, + plugins: list[Plugin] | None = None, + ) -> DuplexEventStream[ + AudioStream, + MedicalTranscriptResultStream, + StartMedicalStreamTranscriptionOutput, + ]: + """ + Starts a bidirectional HTTP/2 or WebSocket stream where audio is streamed to + Amazon Transcribe Medical and the transcription results are streamed to your + application. + + The following parameters are required: + + * ``language-code`` + + * ``media-encoding`` + + * ``sample-rate`` + + For more information on streaming with Amazon Transcribe Medical, see + `Transcribing streaming audio `_ + . + + :param input: The operation's input. + + :param plugins: A list of callables that modify the configuration dynamically. + Changes made by these plugins only apply for the duration of the operation + execution and will not affect any other operation invocations. + + """ + operation_plugins: list[Plugin] = [] + if plugins: + operation_plugins.extend(plugins) + config = deepcopy(self._config) + for plugin in operation_plugins: + plugin(config) + if config.protocol is None or config.transport is None: + raise ExpectationNotMetError( + "protocol and transport MUST be set on the config to make calls." + ) + pipeline = RequestPipeline(protocol=config.protocol, transport=config.transport) + call = ClientCall( + input=input, + operation=START_MEDICAL_STREAM_TRANSCRIPTION, + context=TypedProperties({"config": config}), + interceptor=InterceptorChain(config.interceptors), + auth_scheme_resolver=config.auth_scheme_resolver, + supported_auth_schemes=config.auth_schemes, + endpoint_resolver=config.endpoint_resolver, + retry_strategy=config.retry_strategy, + ) + + return await pipeline.duplex_stream( + call, + AudioStream, + MedicalTranscriptResultStream, + _MedicalTranscriptResultStreamDeserializer().deserialize, + ) + + async def start_stream_transcription( + self, input: StartStreamTranscriptionInput, plugins: list[Plugin] | None = None + ) -> DuplexEventStream[ + AudioStream, TranscriptResultStream, StartStreamTranscriptionOutput + ]: + """ + Starts a bidirectional HTTP/2 or WebSocket stream where audio is streamed to + Amazon Transcribe and the transcription results are streamed to your + application. + + The following parameters are required: + + * ``language-code`` or ``identify-language`` or ``identify-multiple-language`` + + * ``media-encoding`` + + * ``sample-rate`` + + For more information on streaming with Amazon Transcribe, see `Transcribing streaming audio `_ + . + + :param input: The operation's input. + + :param plugins: A list of callables that modify the configuration dynamically. + Changes made by these plugins only apply for the duration of the operation + execution and will not affect any other operation invocations. + + """ + operation_plugins: list[Plugin] = [] + if plugins: + operation_plugins.extend(plugins) + config = deepcopy(self._config) + for plugin in operation_plugins: + plugin(config) + if config.protocol is None or config.transport is None: + raise ExpectationNotMetError( + "protocol and transport MUST be set on the config to make calls." + ) + pipeline = RequestPipeline(protocol=config.protocol, transport=config.transport) + call = ClientCall( + input=input, + operation=START_STREAM_TRANSCRIPTION, + context=TypedProperties({"config": config}), + interceptor=InterceptorChain(config.interceptors), + auth_scheme_resolver=config.auth_scheme_resolver, + supported_auth_schemes=config.auth_schemes, + endpoint_resolver=config.endpoint_resolver, + retry_strategy=config.retry_strategy, + ) + + return await pipeline.duplex_stream( + call, + AudioStream, + TranscriptResultStream, + _TranscriptResultStreamDeserializer().deserialize, + ) diff --git a/clients/aws-sdk-transcribe-streaming/src/aws_sdk_transcribe_streaming/config.py b/clients/aws-sdk-transcribe-streaming/src/aws_sdk_transcribe_streaming/config.py new file mode 100644 index 0000000..0ea6fe7 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/src/aws_sdk_transcribe_streaming/config.py @@ -0,0 +1,200 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +from dataclasses import dataclass +from typing import Any, Callable, TypeAlias, Union + +from smithy_aws_core.aio.protocols import RestJsonClientProtocol +from smithy_aws_core.auth import SigV4AuthScheme +from smithy_aws_core.endpoints.standard_regional import ( + StandardRegionalEndpointsResolver as _RegionalResolver, +) +from smithy_aws_core.identity import AWSCredentialsIdentity, AWSIdentityProperties +from smithy_core.aio.interfaces import ( + ClientProtocol, + ClientTransport, + EndpointResolver as _EndpointResolver, +) +from smithy_core.aio.interfaces.auth import AuthScheme +from smithy_core.aio.interfaces.identity import IdentityResolver +from smithy_core.interceptors import Interceptor +from smithy_core.interfaces import URI +from smithy_core.interfaces.retries import RetryStrategy +from smithy_core.retries import SimpleRetryStrategy +from smithy_core.shapes import ShapeID +from smithy_http.aio.crt import AWSCRTHTTPClient +from smithy_http.interfaces import HTTPRequestConfiguration + +from ._private.schemas import TRANSCRIBE as _SCHEMA_TRANSCRIBE +from .auth import HTTPAuthSchemeResolver +from .models import ( + GetMedicalScribeStreamInput, + GetMedicalScribeStreamOutput, + StartCallAnalyticsStreamTranscriptionInput, + StartCallAnalyticsStreamTranscriptionOutput, + StartMedicalScribeStreamInput, + StartMedicalScribeStreamOutput, + StartMedicalStreamTranscriptionInput, + StartMedicalStreamTranscriptionOutput, + StartStreamTranscriptionInput, + StartStreamTranscriptionOutput, +) + + +_ServiceInterceptor = Union[ + Interceptor[GetMedicalScribeStreamInput, GetMedicalScribeStreamOutput, Any, Any], + Interceptor[ + StartCallAnalyticsStreamTranscriptionInput, + StartCallAnalyticsStreamTranscriptionOutput, + Any, + Any, + ], + Interceptor[ + StartMedicalScribeStreamInput, StartMedicalScribeStreamOutput, Any, Any + ], + Interceptor[ + StartMedicalStreamTranscriptionInput, + StartMedicalStreamTranscriptionOutput, + Any, + Any, + ], + Interceptor[ + StartStreamTranscriptionInput, StartStreamTranscriptionOutput, Any, Any + ], +] + + +@dataclass(init=False) +class Config: + """Configuration for Transcribe.""" + + auth_scheme_resolver: HTTPAuthSchemeResolver + auth_schemes: dict[ShapeID, AuthScheme[Any, Any, Any, Any]] + aws_access_key_id: str | None + aws_credentials_identity_resolver: ( + IdentityResolver[AWSCredentialsIdentity, AWSIdentityProperties] | None + ) + aws_secret_access_key: str | None + aws_session_token: str | None + endpoint_resolver: _EndpointResolver + endpoint_uri: str | URI | None + http_request_config: HTTPRequestConfiguration | None + interceptors: list[_ServiceInterceptor] + protocol: ClientProtocol[Any, Any] | None + region: str | None + retry_strategy: RetryStrategy + sdk_ua_app_id: str | None + transport: ClientTransport[Any, Any] | None + user_agent_extra: str | None + + def __init__( + self, + *, + auth_scheme_resolver: HTTPAuthSchemeResolver | None = None, + auth_schemes: dict[ShapeID, AuthScheme[Any, Any, Any, Any]] | None = None, + aws_access_key_id: str | None = None, + aws_credentials_identity_resolver: IdentityResolver[ + AWSCredentialsIdentity, AWSIdentityProperties + ] + | None = None, + aws_secret_access_key: str | None = None, + aws_session_token: str | None = None, + endpoint_resolver: _EndpointResolver | None = None, + endpoint_uri: str | URI | None = None, + http_request_config: HTTPRequestConfiguration | None = None, + interceptors: list[_ServiceInterceptor] | None = None, + protocol: ClientProtocol[Any, Any] | None = None, + region: str | None = None, + retry_strategy: RetryStrategy | None = None, + sdk_ua_app_id: str | None = None, + transport: ClientTransport[Any, Any] | None = None, + user_agent_extra: str | None = None, + ): + """Constructor. + + :param auth_scheme_resolver: + An auth scheme resolver that determines the auth scheme for each operation. + + :param auth_schemes: + A map of auth scheme ids to auth schemes. + + :param aws_access_key_id: + The identifier for a secret access key. + + :param aws_credentials_identity_resolver: + Resolves AWS Credentials. Required for operations that use Sigv4 Auth. + + :param aws_secret_access_key: + A secret access key that can be used to sign requests. + + :param aws_session_token: + An access key ID that identifies temporary security credentials. + + :param endpoint_resolver: + The endpoint resolver used to resolve the final endpoint per-operation based on + the configuration. + + :param endpoint_uri: + A static URI to route requests to. + + :param http_request_config: + Configuration for individual HTTP requests. + + :param interceptors: + The list of interceptors, which are hooks that are called during the execution + of a request. + + :param protocol: + The protocol to serialize and deserialize requests with. + + :param region: + The AWS region to connect to. The configured region is used to determine the + service endpoint. + + :param retry_strategy: + The retry strategy for issuing retry tokens and computing retry delays. + + :param sdk_ua_app_id: + A unique and opaque application ID that is appended to the User-Agent header. + + :param transport: + The transport to use to send requests (e.g. an HTTP client). + + :param user_agent_extra: + Additional suffix to be added to the User-Agent header. + + """ + self.auth_scheme_resolver = auth_scheme_resolver or HTTPAuthSchemeResolver() + self.auth_schemes = auth_schemes or { + ShapeID("aws.auth#sigv4"): SigV4AuthScheme(service="transcribe") + } + self.aws_access_key_id = aws_access_key_id + self.aws_credentials_identity_resolver = aws_credentials_identity_resolver + self.aws_secret_access_key = aws_secret_access_key + self.aws_session_token = aws_session_token + self.endpoint_resolver = endpoint_resolver or _RegionalResolver( + endpoint_prefix="transcribestreaming" + ) + self.endpoint_uri = endpoint_uri + self.http_request_config = http_request_config + self.interceptors = interceptors or [] + self.protocol = protocol or RestJsonClientProtocol(_SCHEMA_TRANSCRIBE) + self.region = region + self.retry_strategy = retry_strategy or SimpleRetryStrategy() + self.sdk_ua_app_id = sdk_ua_app_id + self.transport = transport or AWSCRTHTTPClient() + self.user_agent_extra = user_agent_extra + + def set_auth_scheme(self, scheme: AuthScheme[Any, Any, Any, Any]) -> None: + """Sets the implementation of an auth scheme. + + Using this method ensures the correct key is used. + + :param scheme: The auth scheme to add. + """ + self.auth_schemes[scheme.scheme_id] = scheme + + +# +# A callable that allows customizing the config object on each request. +# +Plugin: TypeAlias = Callable[[Config], None] diff --git a/clients/aws-sdk-transcribe-streaming/src/aws_sdk_transcribe_streaming/models.py b/clients/aws-sdk-transcribe-streaming/src/aws_sdk_transcribe_streaming/models.py new file mode 100644 index 0000000..d45ca0b --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/src/aws_sdk_transcribe_streaming/models.py @@ -0,0 +1,9112 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +from dataclasses import dataclass, field +from datetime import datetime +from enum import StrEnum +import logging +from typing import Any, Literal, Self, Union + +from smithy_core.deserializers import ShapeDeserializer +from smithy_core.documents import TypeRegistry +from smithy_core.exceptions import ModeledError, SerializationError +from smithy_core.schemas import APIOperation, Schema +from smithy_core.serializers import ShapeSerializer +from smithy_core.shapes import ShapeID + +from ._private.schemas import ( + ALTERNATIVE as _SCHEMA_ALTERNATIVE, + AUDIO_EVENT as _SCHEMA_AUDIO_EVENT, + AUDIO_STREAM as _SCHEMA_AUDIO_STREAM, + BAD_REQUEST_EXCEPTION as _SCHEMA_BAD_REQUEST_EXCEPTION, + CALL_ANALYTICS_ENTITY as _SCHEMA_CALL_ANALYTICS_ENTITY, + CALL_ANALYTICS_ITEM as _SCHEMA_CALL_ANALYTICS_ITEM, + CALL_ANALYTICS_LANGUAGE_WITH_SCORE as _SCHEMA_CALL_ANALYTICS_LANGUAGE_WITH_SCORE, + CALL_ANALYTICS_TRANSCRIPT_RESULT_STREAM as _SCHEMA_CALL_ANALYTICS_TRANSCRIPT_RESULT_STREAM, + CATEGORY_EVENT as _SCHEMA_CATEGORY_EVENT, + CHANNEL_DEFINITION as _SCHEMA_CHANNEL_DEFINITION, + CHARACTER_OFFSETS as _SCHEMA_CHARACTER_OFFSETS, + CLINICAL_NOTE_GENERATION_RESULT as _SCHEMA_CLINICAL_NOTE_GENERATION_RESULT, + CLINICAL_NOTE_GENERATION_SETTINGS as _SCHEMA_CLINICAL_NOTE_GENERATION_SETTINGS, + CONFIGURATION_EVENT as _SCHEMA_CONFIGURATION_EVENT, + CONFLICT_EXCEPTION as _SCHEMA_CONFLICT_EXCEPTION, + ENTITY as _SCHEMA_ENTITY, + GET_MEDICAL_SCRIBE_STREAM as _SCHEMA_GET_MEDICAL_SCRIBE_STREAM, + GET_MEDICAL_SCRIBE_STREAM_INPUT as _SCHEMA_GET_MEDICAL_SCRIBE_STREAM_INPUT, + GET_MEDICAL_SCRIBE_STREAM_OUTPUT as _SCHEMA_GET_MEDICAL_SCRIBE_STREAM_OUTPUT, + INTERNAL_FAILURE_EXCEPTION as _SCHEMA_INTERNAL_FAILURE_EXCEPTION, + ISSUE_DETECTED as _SCHEMA_ISSUE_DETECTED, + ITEM as _SCHEMA_ITEM, + LANGUAGE_WITH_SCORE as _SCHEMA_LANGUAGE_WITH_SCORE, + LIMIT_EXCEEDED_EXCEPTION as _SCHEMA_LIMIT_EXCEEDED_EXCEPTION, + MEDICAL_ALTERNATIVE as _SCHEMA_MEDICAL_ALTERNATIVE, + MEDICAL_ENTITY as _SCHEMA_MEDICAL_ENTITY, + MEDICAL_ITEM as _SCHEMA_MEDICAL_ITEM, + MEDICAL_RESULT as _SCHEMA_MEDICAL_RESULT, + MEDICAL_SCRIBE_AUDIO_EVENT as _SCHEMA_MEDICAL_SCRIBE_AUDIO_EVENT, + MEDICAL_SCRIBE_CHANNEL_DEFINITION as _SCHEMA_MEDICAL_SCRIBE_CHANNEL_DEFINITION, + MEDICAL_SCRIBE_CONFIGURATION_EVENT as _SCHEMA_MEDICAL_SCRIBE_CONFIGURATION_EVENT, + MEDICAL_SCRIBE_CONTEXT as _SCHEMA_MEDICAL_SCRIBE_CONTEXT, + MEDICAL_SCRIBE_ENCRYPTION_SETTINGS as _SCHEMA_MEDICAL_SCRIBE_ENCRYPTION_SETTINGS, + MEDICAL_SCRIBE_INPUT_STREAM as _SCHEMA_MEDICAL_SCRIBE_INPUT_STREAM, + MEDICAL_SCRIBE_PATIENT_CONTEXT as _SCHEMA_MEDICAL_SCRIBE_PATIENT_CONTEXT, + MEDICAL_SCRIBE_POST_STREAM_ANALYTICS_RESULT as _SCHEMA_MEDICAL_SCRIBE_POST_STREAM_ANALYTICS_RESULT, + MEDICAL_SCRIBE_POST_STREAM_ANALYTICS_SETTINGS as _SCHEMA_MEDICAL_SCRIBE_POST_STREAM_ANALYTICS_SETTINGS, + MEDICAL_SCRIBE_RESULT_STREAM as _SCHEMA_MEDICAL_SCRIBE_RESULT_STREAM, + MEDICAL_SCRIBE_SESSION_CONTROL_EVENT as _SCHEMA_MEDICAL_SCRIBE_SESSION_CONTROL_EVENT, + MEDICAL_SCRIBE_STREAM_DETAILS as _SCHEMA_MEDICAL_SCRIBE_STREAM_DETAILS, + MEDICAL_SCRIBE_TRANSCRIPT_EVENT as _SCHEMA_MEDICAL_SCRIBE_TRANSCRIPT_EVENT, + MEDICAL_SCRIBE_TRANSCRIPT_ITEM as _SCHEMA_MEDICAL_SCRIBE_TRANSCRIPT_ITEM, + MEDICAL_SCRIBE_TRANSCRIPT_SEGMENT as _SCHEMA_MEDICAL_SCRIBE_TRANSCRIPT_SEGMENT, + MEDICAL_TRANSCRIPT as _SCHEMA_MEDICAL_TRANSCRIPT, + MEDICAL_TRANSCRIPT_EVENT as _SCHEMA_MEDICAL_TRANSCRIPT_EVENT, + MEDICAL_TRANSCRIPT_RESULT_STREAM as _SCHEMA_MEDICAL_TRANSCRIPT_RESULT_STREAM, + POINTS_OF_INTEREST as _SCHEMA_POINTS_OF_INTEREST, + POST_CALL_ANALYTICS_SETTINGS as _SCHEMA_POST_CALL_ANALYTICS_SETTINGS, + RESOURCE_NOT_FOUND_EXCEPTION as _SCHEMA_RESOURCE_NOT_FOUND_EXCEPTION, + RESULT as _SCHEMA_RESULT, + SERVICE_UNAVAILABLE_EXCEPTION as _SCHEMA_SERVICE_UNAVAILABLE_EXCEPTION, + START_CALL_ANALYTICS_STREAM_TRANSCRIPTION as _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION, + START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_INPUT as _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_INPUT, + START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_OUTPUT as _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_OUTPUT, + START_MEDICAL_SCRIBE_STREAM as _SCHEMA_START_MEDICAL_SCRIBE_STREAM, + START_MEDICAL_SCRIBE_STREAM_INPUT as _SCHEMA_START_MEDICAL_SCRIBE_STREAM_INPUT, + START_MEDICAL_SCRIBE_STREAM_OUTPUT as _SCHEMA_START_MEDICAL_SCRIBE_STREAM_OUTPUT, + START_MEDICAL_STREAM_TRANSCRIPTION as _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION, + START_MEDICAL_STREAM_TRANSCRIPTION_INPUT as _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_INPUT, + START_MEDICAL_STREAM_TRANSCRIPTION_OUTPUT as _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_OUTPUT, + START_STREAM_TRANSCRIPTION as _SCHEMA_START_STREAM_TRANSCRIPTION, + START_STREAM_TRANSCRIPTION_INPUT as _SCHEMA_START_STREAM_TRANSCRIPTION_INPUT, + START_STREAM_TRANSCRIPTION_OUTPUT as _SCHEMA_START_STREAM_TRANSCRIPTION_OUTPUT, + TIMESTAMP_RANGE as _SCHEMA_TIMESTAMP_RANGE, + TRANSCRIPT as _SCHEMA_TRANSCRIPT, + TRANSCRIPT_EVENT as _SCHEMA_TRANSCRIPT_EVENT, + TRANSCRIPT_RESULT_STREAM as _SCHEMA_TRANSCRIPT_RESULT_STREAM, + UTTERANCE_EVENT as _SCHEMA_UTTERANCE_EVENT, +) + + +logger = logging.getLogger(__name__) + + +class ServiceError(ModeledError): + """Base error for all errors in the service. + + Some exceptions do not extend from this class, including + synthetic, implicit, and shared exception types. + """ + + +@dataclass(kw_only=True) +class Entity: + """ + Contains entities identified as personally identifiable information (PII) in + your transcription output, along with various associated attributes. Examples + include category, confidence score, type, stability score, and start and end + times. + + """ + + start_time: float = 0 + """ + The start time of the utterance that was identified as PII in seconds, with + millisecond precision (e.g., 1.056) + """ + end_time: float = 0 + """ + The end time of the utterance that was identified as PII in seconds, with + millisecond precision (e.g., 1.056) + """ + category: str | None = None + """ + The category of information identified. The only category is ``PII``. + """ + type: str | None = None + """ + The type of PII identified. For example, ``NAME`` or ``CREDIT_DEBIT_NUMBER``. + """ + content: str | None = None + """ + The word or words identified as PII. + """ + confidence: float | None = None + """ + The confidence score associated with the identified PII entity in your audio. + + Confidence scores are values between 0 and 1. A larger value indicates a higher + probability that the identified entity correctly matches the entity spoken in + your media. + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_ENTITY, self) + + def serialize_members(self, serializer: ShapeSerializer): + serializer.write_double(_SCHEMA_ENTITY.members["StartTime"], self.start_time) + serializer.write_double(_SCHEMA_ENTITY.members["EndTime"], self.end_time) + if self.category is not None: + serializer.write_string(_SCHEMA_ENTITY.members["Category"], self.category) + + if self.type is not None: + serializer.write_string(_SCHEMA_ENTITY.members["Type"], self.type) + + if self.content is not None: + serializer.write_string(_SCHEMA_ENTITY.members["Content"], self.content) + + if self.confidence is not None: + serializer.write_double( + _SCHEMA_ENTITY.members["Confidence"], self.confidence + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["start_time"] = de.read_double( + _SCHEMA_ENTITY.members["StartTime"] + ) + + case 1: + kwargs["end_time"] = de.read_double( + _SCHEMA_ENTITY.members["EndTime"] + ) + + case 2: + kwargs["category"] = de.read_string( + _SCHEMA_ENTITY.members["Category"] + ) + + case 3: + kwargs["type"] = de.read_string(_SCHEMA_ENTITY.members["Type"]) + + case 4: + kwargs["content"] = de.read_string( + _SCHEMA_ENTITY.members["Content"] + ) + + case 5: + kwargs["confidence"] = de.read_double( + _SCHEMA_ENTITY.members["Confidence"] + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct(_SCHEMA_ENTITY, consumer=_consumer) + return kwargs + + +def _serialize_entity_list( + serializer: ShapeSerializer, schema: Schema, value: list[Entity] +) -> None: + member_schema = schema.members["member"] + with serializer.begin_list(schema, len(value)) as ls: + for e in value: + ls.write_struct(member_schema, e) + + +def _deserialize_entity_list( + deserializer: ShapeDeserializer, schema: Schema +) -> list[Entity]: + result: list[Entity] = [] + + def _read_value(d: ShapeDeserializer): + if d.is_null(): + d.read_null() + + else: + result.append(Entity.deserialize(d)) + + deserializer.read_list(schema, _read_value) + return result + + +class ItemType(StrEnum): + PRONUNCIATION = "pronunciation" + PUNCTUATION = "punctuation" + + +@dataclass(kw_only=True) +class Item: + """ + A word, phrase, or punctuation mark in your transcription output, along with + various associated attributes, such as confidence score, type, and start and end + times. + + """ + + start_time: float = 0 + """ + The start time of the transcribed item in seconds, with millisecond precision + (e.g., 1.056) + """ + end_time: float = 0 + """ + The end time of the transcribed item in seconds, with millisecond precision + (e.g., 1.056) + """ + type: str | None = None + """ + The type of item identified. Options are: ``PRONUNCIATION`` (spoken words) and + ``PUNCTUATION``. + """ + content: str | None = None + """ + The word or punctuation that was transcribed. + """ + vocabulary_filter_match: bool = False + """ + Indicates whether the specified item matches a word in the vocabulary filter + included in your request. If ``true``, there is a vocabulary filter match. + """ + speaker: str | None = None + """ + If speaker partitioning is enabled, ``Speaker`` labels the speaker of the + specified item. + """ + confidence: float | None = None + """ + The confidence score associated with a word or phrase in your transcript. + + Confidence scores are values between 0 and 1. A larger value indicates a higher + probability that the identified item correctly matches the item spoken in your + media. + """ + stable: bool | None = None + """ + If partial result stabilization is enabled, ``Stable`` indicates whether the + specified item is stable (``true``) or if it may change when the segment is + complete (``false``). + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_ITEM, self) + + def serialize_members(self, serializer: ShapeSerializer): + serializer.write_double(_SCHEMA_ITEM.members["StartTime"], self.start_time) + serializer.write_double(_SCHEMA_ITEM.members["EndTime"], self.end_time) + if self.type is not None: + serializer.write_string(_SCHEMA_ITEM.members["Type"], self.type) + + if self.content is not None: + serializer.write_string(_SCHEMA_ITEM.members["Content"], self.content) + + serializer.write_boolean( + _SCHEMA_ITEM.members["VocabularyFilterMatch"], self.vocabulary_filter_match + ) + if self.speaker is not None: + serializer.write_string(_SCHEMA_ITEM.members["Speaker"], self.speaker) + + if self.confidence is not None: + serializer.write_double(_SCHEMA_ITEM.members["Confidence"], self.confidence) + + if self.stable is not None: + serializer.write_boolean(_SCHEMA_ITEM.members["Stable"], self.stable) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["start_time"] = de.read_double( + _SCHEMA_ITEM.members["StartTime"] + ) + + case 1: + kwargs["end_time"] = de.read_double(_SCHEMA_ITEM.members["EndTime"]) + + case 2: + kwargs["type"] = de.read_string(_SCHEMA_ITEM.members["Type"]) + + case 3: + kwargs["content"] = de.read_string(_SCHEMA_ITEM.members["Content"]) + + case 4: + kwargs["vocabulary_filter_match"] = de.read_boolean( + _SCHEMA_ITEM.members["VocabularyFilterMatch"] + ) + + case 5: + kwargs["speaker"] = de.read_string(_SCHEMA_ITEM.members["Speaker"]) + + case 6: + kwargs["confidence"] = de.read_double( + _SCHEMA_ITEM.members["Confidence"] + ) + + case 7: + kwargs["stable"] = de.read_boolean(_SCHEMA_ITEM.members["Stable"]) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct(_SCHEMA_ITEM, consumer=_consumer) + return kwargs + + +def _serialize_item_list( + serializer: ShapeSerializer, schema: Schema, value: list[Item] +) -> None: + member_schema = schema.members["member"] + with serializer.begin_list(schema, len(value)) as ls: + for e in value: + ls.write_struct(member_schema, e) + + +def _deserialize_item_list( + deserializer: ShapeDeserializer, schema: Schema +) -> list[Item]: + result: list[Item] = [] + + def _read_value(d: ShapeDeserializer): + if d.is_null(): + d.read_null() + + else: + result.append(Item.deserialize(d)) + + deserializer.read_list(schema, _read_value) + return result + + +@dataclass(kw_only=True) +class Alternative: + """ + A list of possible alternative transcriptions for the input audio. Each + alternative may contain one or more of ``Items``, ``Entities``, or + ``Transcript``. + + """ + + transcript: str | None = None + """ + Contains transcribed text. + """ + items: list[Item] | None = None + """ + Contains words, phrases, or punctuation marks in your transcription output. + """ + entities: list[Entity] | None = None + """ + Contains entities identified as personally identifiable information (PII) in + your transcription output. + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_ALTERNATIVE, self) + + def serialize_members(self, serializer: ShapeSerializer): + if self.transcript is not None: + serializer.write_string( + _SCHEMA_ALTERNATIVE.members["Transcript"], self.transcript + ) + + if self.items is not None: + _serialize_item_list( + serializer, _SCHEMA_ALTERNATIVE.members["Items"], self.items + ) + + if self.entities is not None: + _serialize_entity_list( + serializer, _SCHEMA_ALTERNATIVE.members["Entities"], self.entities + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["transcript"] = de.read_string( + _SCHEMA_ALTERNATIVE.members["Transcript"] + ) + + case 1: + kwargs["items"] = _deserialize_item_list( + de, _SCHEMA_ALTERNATIVE.members["Items"] + ) + + case 2: + kwargs["entities"] = _deserialize_entity_list( + de, _SCHEMA_ALTERNATIVE.members["Entities"] + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct(_SCHEMA_ALTERNATIVE, consumer=_consumer) + return kwargs + + +def _serialize_alternative_list( + serializer: ShapeSerializer, schema: Schema, value: list[Alternative] +) -> None: + member_schema = schema.members["member"] + with serializer.begin_list(schema, len(value)) as ls: + for e in value: + ls.write_struct(member_schema, e) + + +def _deserialize_alternative_list( + deserializer: ShapeDeserializer, schema: Schema +) -> list[Alternative]: + result: list[Alternative] = [] + + def _read_value(d: ShapeDeserializer): + if d.is_null(): + d.read_null() + + else: + result.append(Alternative.deserialize(d)) + + deserializer.read_list(schema, _read_value) + return result + + +@dataclass(kw_only=True) +class AudioEvent: + """ + A wrapper for your audio chunks. Your audio stream consists of one or more audio + events, which consist of one or more audio chunks. + + For more information, see ``Event stream encoding ``_ + . + + """ + + audio_chunk: bytes | None = None + """ + An audio blob containing the next segment of audio from your application, with a + maximum duration of 1 second. The maximum size in bytes varies based on audio + properties. + + Find recommended size in `Transcribing streaming best practices `_ + . + + Size calculation: ``Duration (s) * Sample Rate (Hz) * Number of Channels * 2 + (Bytes per Sample)`` + + For example, a 1-second chunk of 16 kHz, 2-channel, 16-bit audio would be ``1 * + 16000 * 2 * 2 = 64000 bytes``. + + For 8 kHz, 1-channel, 16-bit audio, a 1-second chunk would be ``1 * 8000 * 1 * 2 + = 16000 bytes``. + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_AUDIO_EVENT, self) + + def serialize_members(self, serializer: ShapeSerializer): + if self.audio_chunk is not None: + serializer.write_blob( + _SCHEMA_AUDIO_EVENT.members["AudioChunk"], self.audio_chunk + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["audio_chunk"] = de.read_blob( + _SCHEMA_AUDIO_EVENT.members["AudioChunk"] + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct(_SCHEMA_AUDIO_EVENT, consumer=_consumer) + return kwargs + + +class ParticipantRole(StrEnum): + AGENT = "AGENT" + CUSTOMER = "CUSTOMER" + + +@dataclass(kw_only=True) +class ChannelDefinition: + """ + Makes it possible to specify which speaker is on which audio channel. For + example, if your agent is the first participant to speak, you would set + ``ChannelId`` to ``0`` (to indicate the first channel) and ``ParticipantRole`` + to ``AGENT`` (to indicate that it's the agent speaking). + + """ + + participant_role: str + """ + Specify the speaker you want to define. Omitting this parameter is equivalent to + specifying both participants. + """ + + channel_id: int = 0 + """ + Specify the audio channel you want to define. + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_CHANNEL_DEFINITION, self) + + def serialize_members(self, serializer: ShapeSerializer): + serializer.write_integer( + _SCHEMA_CHANNEL_DEFINITION.members["ChannelId"], self.channel_id + ) + serializer.write_string( + _SCHEMA_CHANNEL_DEFINITION.members["ParticipantRole"], self.participant_role + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["channel_id"] = de.read_integer( + _SCHEMA_CHANNEL_DEFINITION.members["ChannelId"] + ) + + case 1: + kwargs["participant_role"] = de.read_string( + _SCHEMA_CHANNEL_DEFINITION.members["ParticipantRole"] + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct(_SCHEMA_CHANNEL_DEFINITION, consumer=_consumer) + return kwargs + + +def _serialize_channel_definitions( + serializer: ShapeSerializer, schema: Schema, value: list[ChannelDefinition] +) -> None: + member_schema = schema.members["member"] + with serializer.begin_list(schema, len(value)) as ls: + for e in value: + ls.write_struct(member_schema, e) + + +def _deserialize_channel_definitions( + deserializer: ShapeDeserializer, schema: Schema +) -> list[ChannelDefinition]: + result: list[ChannelDefinition] = [] + + def _read_value(d: ShapeDeserializer): + if d.is_null(): + d.read_null() + + else: + result.append(ChannelDefinition.deserialize(d)) + + deserializer.read_list(schema, _read_value) + return result + + +class ContentRedactionOutput(StrEnum): + REDACTED = "redacted" + REDACTED_AND_UNREDACTED = "redacted_and_unredacted" + + +@dataclass(kw_only=True) +class PostCallAnalyticsSettings: + """ + Allows you to specify additional settings for your Call Analytics post-call + request, including output locations for your redacted transcript, which IAM role + to use, and which encryption key to use. + + ``DataAccessRoleArn`` and ``OutputLocation`` are required fields. + + ``PostCallAnalyticsSettings`` provides you with the same insights as a Call Analytics post-call transcription. Refer to ``Post-call analytics ``_ + for more information on this feature. + + """ + + output_location: str + """ + The Amazon S3 location where you want your Call Analytics post-call + transcription output stored. You can use any of the following formats to specify + the output location: + + * s3://DOC-EXAMPLE-BUCKET + + * s3://DOC-EXAMPLE-BUCKET/my-output-folder/ + + * s3://DOC-EXAMPLE-BUCKET/my-output-folder/my-call-analytics-job.json + """ + + data_access_role_arn: str + """ + The Amazon Resource Name (ARN) of an IAM role that has permissions to access the + Amazon S3 bucket that contains your input files. If the role that you specify + doesn’t have the appropriate permissions to access the specified Amazon S3 + location, your request fails. + + IAM role ARNs have the format + ``arn:partition:iam::account:role/role-name-with-path``. For example: ``arn:aws:iam::111122223333:role/Admin``. For more information, see `IAM ARNs `_ + . + """ + + content_redaction_output: str | None = None + """ + Specify whether you want only a redacted transcript or both a redacted and an + unredacted transcript. If you choose redacted and unredacted, two JSON files are + generated and stored in the Amazon S3 output location you specify. + + Note that to include ``ContentRedactionOutput`` in your request, you must enable + content redaction (``ContentRedactionType``). + """ + output_encryption_kms_key_id: str | None = None + """ + The KMS key you want to use to encrypt your Call Analytics post-call output. + + If using a key located in the **current** Amazon Web Services account, you can + specify your KMS key in one of four ways: + + * Use the KMS key ID itself. For example, + ``1234abcd-12ab-34cd-56ef-1234567890ab``. + + * Use an alias for the KMS key ID. For example, ``alias/ExampleAlias``. + + * Use the Amazon Resource Name (ARN) for the KMS key ID. For example, + ``arn:aws:kms:region:account-ID:key/1234abcd-12ab-34cd-56ef-1234567890ab``. + + * Use the ARN for the KMS key alias. For example, + ``arn:aws:kms:region:account-ID:alias/ExampleAlias``. + + If using a key located in a **different** Amazon Web Services account than the + current Amazon Web Services account, you can specify your KMS key in one of two + ways: + + * Use the ARN for the KMS key ID. For example, + ``arn:aws:kms:region:account-ID:key/1234abcd-12ab-34cd-56ef-1234567890ab``. + + * Use the ARN for the KMS key alias. For example, + ``arn:aws:kms:region:account-ID:alias/ExampleAlias``. + + Note that the role making the request must have permission to use the specified + KMS key. + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_POST_CALL_ANALYTICS_SETTINGS, self) + + def serialize_members(self, serializer: ShapeSerializer): + serializer.write_string( + _SCHEMA_POST_CALL_ANALYTICS_SETTINGS.members["OutputLocation"], + self.output_location, + ) + serializer.write_string( + _SCHEMA_POST_CALL_ANALYTICS_SETTINGS.members["DataAccessRoleArn"], + self.data_access_role_arn, + ) + if self.content_redaction_output is not None: + serializer.write_string( + _SCHEMA_POST_CALL_ANALYTICS_SETTINGS.members["ContentRedactionOutput"], + self.content_redaction_output, + ) + + if self.output_encryption_kms_key_id is not None: + serializer.write_string( + _SCHEMA_POST_CALL_ANALYTICS_SETTINGS.members[ + "OutputEncryptionKMSKeyId" + ], + self.output_encryption_kms_key_id, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["output_location"] = de.read_string( + _SCHEMA_POST_CALL_ANALYTICS_SETTINGS.members["OutputLocation"] + ) + + case 1: + kwargs["data_access_role_arn"] = de.read_string( + _SCHEMA_POST_CALL_ANALYTICS_SETTINGS.members[ + "DataAccessRoleArn" + ] + ) + + case 2: + kwargs["content_redaction_output"] = de.read_string( + _SCHEMA_POST_CALL_ANALYTICS_SETTINGS.members[ + "ContentRedactionOutput" + ] + ) + + case 3: + kwargs["output_encryption_kms_key_id"] = de.read_string( + _SCHEMA_POST_CALL_ANALYTICS_SETTINGS.members[ + "OutputEncryptionKMSKeyId" + ] + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct( + _SCHEMA_POST_CALL_ANALYTICS_SETTINGS, consumer=_consumer + ) + return kwargs + + +@dataclass(kw_only=True) +class ConfigurationEvent: + """ + Allows you to set audio channel definitions and post-call analytics settings. + + """ + + channel_definitions: list[ChannelDefinition] | None = None + """ + Indicates which speaker is on which audio channel. + """ + post_call_analytics_settings: PostCallAnalyticsSettings | None = None + """ + Provides additional optional settings for your Call Analytics post-call request, + including encryption and output locations for your redacted transcript. + + ``PostCallAnalyticsSettings`` provides you with the same insights as a Call Analytics post-call transcription. Refer to `Post-call analytics `_ + for more information on this feature. + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_CONFIGURATION_EVENT, self) + + def serialize_members(self, serializer: ShapeSerializer): + if self.channel_definitions is not None: + _serialize_channel_definitions( + serializer, + _SCHEMA_CONFIGURATION_EVENT.members["ChannelDefinitions"], + self.channel_definitions, + ) + + if self.post_call_analytics_settings is not None: + serializer.write_struct( + _SCHEMA_CONFIGURATION_EVENT.members["PostCallAnalyticsSettings"], + self.post_call_analytics_settings, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["channel_definitions"] = _deserialize_channel_definitions( + de, _SCHEMA_CONFIGURATION_EVENT.members["ChannelDefinitions"] + ) + + case 1: + kwargs["post_call_analytics_settings"] = ( + PostCallAnalyticsSettings.deserialize(de) + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct(_SCHEMA_CONFIGURATION_EVENT, consumer=_consumer) + return kwargs + + +@dataclass +class AudioStreamAudioEvent: + """ + A blob of audio from your application. Your audio stream consists of one or more + audio events. + + For more information, see `Event stream encoding `_ + . + + """ + + value: AudioEvent + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_AUDIO_STREAM, self) + + def serialize_members(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_AUDIO_STREAM.members["AudioEvent"], self.value) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(value=AudioEvent.deserialize(deserializer)) + + +@dataclass +class AudioStreamConfigurationEvent: + """ + Contains audio channel definitions and post-call analytics settings. + + """ + + value: ConfigurationEvent + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_AUDIO_STREAM, self) + + def serialize_members(self, serializer: ShapeSerializer): + serializer.write_struct( + _SCHEMA_AUDIO_STREAM.members["ConfigurationEvent"], self.value + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(value=ConfigurationEvent.deserialize(deserializer)) + + +@dataclass +class AudioStreamUnknown: + """Represents an unknown variant. + + If you receive this value, you will need to update your library to receive the + parsed value. + + This value may not be deliberately sent. + """ + + tag: str + + def serialize(self, serializer: ShapeSerializer): + raise SerializationError("Unknown union variants may not be serialized.") + + def serialize_members(self, serializer: ShapeSerializer): + raise SerializationError("Unknown union variants may not be serialized.") + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + raise NotImplementedError() + + +AudioStream = Union[ + AudioStreamAudioEvent | AudioStreamConfigurationEvent | AudioStreamUnknown +] + +""" +An encoded stream of audio blobs. Audio streams are encoded as either HTTP/2 or +WebSocket data frames. + +For more information, see `Transcribing streaming audio `_ +. + +""" + + +class _AudioStreamDeserializer: + _result: AudioStream | None = None + + def deserialize(self, deserializer: ShapeDeserializer) -> AudioStream: + self._result = None + deserializer.read_struct(_SCHEMA_AUDIO_STREAM, self._consumer) + + if self._result is None: + raise SerializationError( + "Unions must have exactly one value, but found none." + ) + + return self._result + + def _consumer(self, schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + self._set_result(AudioStreamAudioEvent.deserialize(de)) + + case 1: + self._set_result(AudioStreamConfigurationEvent.deserialize(de)) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + def _set_result(self, value: AudioStream) -> None: + if self._result is not None: + raise SerializationError( + "Unions must have exactly one value, but found more than one." + ) + self._result = value + + +@dataclass(kw_only=True) +class BadRequestException(ServiceError): + """ + One or more arguments to the ``StartStreamTranscription``, + ``StartMedicalStreamTranscription``, or + ``StartCallAnalyticsStreamTranscription`` operation was not valid. For example, + ``MediaEncoding`` or ``LanguageCode`` used unsupported values. Check the + specified parameters and try your request again. + + """ + + fault: Literal["client", "server"] | None = "client" + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_BAD_REQUEST_EXCEPTION, self) + + def serialize_members(self, serializer: ShapeSerializer): + if self.message is not None: + serializer.write_string( + _SCHEMA_BAD_REQUEST_EXCEPTION.members["Message"], self.message + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["message"] = de.read_string( + _SCHEMA_BAD_REQUEST_EXCEPTION.members["Message"] + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct(_SCHEMA_BAD_REQUEST_EXCEPTION, consumer=_consumer) + return kwargs + + +@dataclass(kw_only=True) +class CallAnalyticsEntity: + """ + Contains entities identified as personally identifiable information (PII) in + your transcription output, along with various associated attributes. Examples + include category, confidence score, content, type, and start and end times. + + """ + + begin_offset_millis: int | None = None + """ + The time, in milliseconds, from the beginning of the audio stream to the start + of the identified entity. + """ + end_offset_millis: int | None = None + """ + The time, in milliseconds, from the beginning of the audio stream to the end of + the identified entity. + """ + category: str | None = None + """ + The category of information identified. For example, ``PII``. + """ + type: str | None = None + """ + The type of PII identified. For example, ``NAME`` or ``CREDIT_DEBIT_NUMBER``. + """ + content: str | None = None + """ + The word or words that represent the identified entity. + """ + confidence: float | None = None + """ + The confidence score associated with the identification of an entity in your + transcript. + + Confidence scores are values between 0 and 1. A larger value indicates a higher + probability that the identified entity correctly matches the entity spoken in + your media. + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_CALL_ANALYTICS_ENTITY, self) + + def serialize_members(self, serializer: ShapeSerializer): + if self.begin_offset_millis is not None: + serializer.write_long( + _SCHEMA_CALL_ANALYTICS_ENTITY.members["BeginOffsetMillis"], + self.begin_offset_millis, + ) + + if self.end_offset_millis is not None: + serializer.write_long( + _SCHEMA_CALL_ANALYTICS_ENTITY.members["EndOffsetMillis"], + self.end_offset_millis, + ) + + if self.category is not None: + serializer.write_string( + _SCHEMA_CALL_ANALYTICS_ENTITY.members["Category"], self.category + ) + + if self.type is not None: + serializer.write_string( + _SCHEMA_CALL_ANALYTICS_ENTITY.members["Type"], self.type + ) + + if self.content is not None: + serializer.write_string( + _SCHEMA_CALL_ANALYTICS_ENTITY.members["Content"], self.content + ) + + if self.confidence is not None: + serializer.write_double( + _SCHEMA_CALL_ANALYTICS_ENTITY.members["Confidence"], self.confidence + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["begin_offset_millis"] = de.read_long( + _SCHEMA_CALL_ANALYTICS_ENTITY.members["BeginOffsetMillis"] + ) + + case 1: + kwargs["end_offset_millis"] = de.read_long( + _SCHEMA_CALL_ANALYTICS_ENTITY.members["EndOffsetMillis"] + ) + + case 2: + kwargs["category"] = de.read_string( + _SCHEMA_CALL_ANALYTICS_ENTITY.members["Category"] + ) + + case 3: + kwargs["type"] = de.read_string( + _SCHEMA_CALL_ANALYTICS_ENTITY.members["Type"] + ) + + case 4: + kwargs["content"] = de.read_string( + _SCHEMA_CALL_ANALYTICS_ENTITY.members["Content"] + ) + + case 5: + kwargs["confidence"] = de.read_double( + _SCHEMA_CALL_ANALYTICS_ENTITY.members["Confidence"] + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct(_SCHEMA_CALL_ANALYTICS_ENTITY, consumer=_consumer) + return kwargs + + +def _serialize_call_analytics_entity_list( + serializer: ShapeSerializer, schema: Schema, value: list[CallAnalyticsEntity] +) -> None: + member_schema = schema.members["member"] + with serializer.begin_list(schema, len(value)) as ls: + for e in value: + ls.write_struct(member_schema, e) + + +def _deserialize_call_analytics_entity_list( + deserializer: ShapeDeserializer, schema: Schema +) -> list[CallAnalyticsEntity]: + result: list[CallAnalyticsEntity] = [] + + def _read_value(d: ShapeDeserializer): + if d.is_null(): + d.read_null() + + else: + result.append(CallAnalyticsEntity.deserialize(d)) + + deserializer.read_list(schema, _read_value) + return result + + +@dataclass(kw_only=True) +class CallAnalyticsItem: + """ + A word, phrase, or punctuation mark in your Call Analytics transcription output, + along with various associated attributes, such as confidence score, type, and + start and end times. + + """ + + begin_offset_millis: int | None = None + """ + The time, in milliseconds, from the beginning of the audio stream to the start + of the identified item. + """ + end_offset_millis: int | None = None + """ + The time, in milliseconds, from the beginning of the audio stream to the end of + the identified item. + """ + type: str | None = None + """ + The type of item identified. Options are: ``PRONUNCIATION`` (spoken words) and + ``PUNCTUATION``. + """ + content: str | None = None + """ + The word or punctuation that was transcribed. + """ + confidence: float | None = None + """ + The confidence score associated with a word or phrase in your transcript. + + Confidence scores are values between 0 and 1. A larger value indicates a higher + probability that the identified item correctly matches the item spoken in your + media. + """ + vocabulary_filter_match: bool = False + """ + Indicates whether the specified item matches a word in the vocabulary filter + included in your Call Analytics request. If ``true``, there is a vocabulary + filter match. + """ + stable: bool | None = None + """ + If partial result stabilization is enabled, ``Stable`` indicates whether the + specified item is stable (``true``) or if it may change when the segment is + complete (``false``). + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_CALL_ANALYTICS_ITEM, self) + + def serialize_members(self, serializer: ShapeSerializer): + if self.begin_offset_millis is not None: + serializer.write_long( + _SCHEMA_CALL_ANALYTICS_ITEM.members["BeginOffsetMillis"], + self.begin_offset_millis, + ) + + if self.end_offset_millis is not None: + serializer.write_long( + _SCHEMA_CALL_ANALYTICS_ITEM.members["EndOffsetMillis"], + self.end_offset_millis, + ) + + if self.type is not None: + serializer.write_string( + _SCHEMA_CALL_ANALYTICS_ITEM.members["Type"], self.type + ) + + if self.content is not None: + serializer.write_string( + _SCHEMA_CALL_ANALYTICS_ITEM.members["Content"], self.content + ) + + if self.confidence is not None: + serializer.write_double( + _SCHEMA_CALL_ANALYTICS_ITEM.members["Confidence"], self.confidence + ) + + serializer.write_boolean( + _SCHEMA_CALL_ANALYTICS_ITEM.members["VocabularyFilterMatch"], + self.vocabulary_filter_match, + ) + if self.stable is not None: + serializer.write_boolean( + _SCHEMA_CALL_ANALYTICS_ITEM.members["Stable"], self.stable + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["begin_offset_millis"] = de.read_long( + _SCHEMA_CALL_ANALYTICS_ITEM.members["BeginOffsetMillis"] + ) + + case 1: + kwargs["end_offset_millis"] = de.read_long( + _SCHEMA_CALL_ANALYTICS_ITEM.members["EndOffsetMillis"] + ) + + case 2: + kwargs["type"] = de.read_string( + _SCHEMA_CALL_ANALYTICS_ITEM.members["Type"] + ) + + case 3: + kwargs["content"] = de.read_string( + _SCHEMA_CALL_ANALYTICS_ITEM.members["Content"] + ) + + case 4: + kwargs["confidence"] = de.read_double( + _SCHEMA_CALL_ANALYTICS_ITEM.members["Confidence"] + ) + + case 5: + kwargs["vocabulary_filter_match"] = de.read_boolean( + _SCHEMA_CALL_ANALYTICS_ITEM.members["VocabularyFilterMatch"] + ) + + case 6: + kwargs["stable"] = de.read_boolean( + _SCHEMA_CALL_ANALYTICS_ITEM.members["Stable"] + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct(_SCHEMA_CALL_ANALYTICS_ITEM, consumer=_consumer) + return kwargs + + +def _serialize_call_analytics_item_list( + serializer: ShapeSerializer, schema: Schema, value: list[CallAnalyticsItem] +) -> None: + member_schema = schema.members["member"] + with serializer.begin_list(schema, len(value)) as ls: + for e in value: + ls.write_struct(member_schema, e) + + +def _deserialize_call_analytics_item_list( + deserializer: ShapeDeserializer, schema: Schema +) -> list[CallAnalyticsItem]: + result: list[CallAnalyticsItem] = [] + + def _read_value(d: ShapeDeserializer): + if d.is_null(): + d.read_null() + + else: + result.append(CallAnalyticsItem.deserialize(d)) + + deserializer.read_list(schema, _read_value) + return result + + +class CallAnalyticsLanguageCode(StrEnum): + EN_US = "en-US" + EN_GB = "en-GB" + ES_US = "es-US" + FR_CA = "fr-CA" + FR_FR = "fr-FR" + EN_AU = "en-AU" + IT_IT = "it-IT" + DE_DE = "de-DE" + PT_BR = "pt-BR" + + +@dataclass(kw_only=True) +class CallAnalyticsLanguageWithScore: + """ + The language code that represents the language identified in your audio, + including the associated confidence score. + + """ + + language_code: str | None = None + """ + The language code of the identified language. + """ + score: float = 0 + """ + The confidence score associated with the identified language code. Confidence + scores are values between zero and one; larger values indicate a higher + confidence in the identified language. + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_CALL_ANALYTICS_LANGUAGE_WITH_SCORE, self) + + def serialize_members(self, serializer: ShapeSerializer): + if self.language_code is not None: + serializer.write_string( + _SCHEMA_CALL_ANALYTICS_LANGUAGE_WITH_SCORE.members["LanguageCode"], + self.language_code, + ) + + serializer.write_double( + _SCHEMA_CALL_ANALYTICS_LANGUAGE_WITH_SCORE.members["Score"], self.score + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["language_code"] = de.read_string( + _SCHEMA_CALL_ANALYTICS_LANGUAGE_WITH_SCORE.members[ + "LanguageCode" + ] + ) + + case 1: + kwargs["score"] = de.read_double( + _SCHEMA_CALL_ANALYTICS_LANGUAGE_WITH_SCORE.members["Score"] + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct( + _SCHEMA_CALL_ANALYTICS_LANGUAGE_WITH_SCORE, consumer=_consumer + ) + return kwargs + + +def _serialize_call_analytics_language_identification( + serializer: ShapeSerializer, + schema: Schema, + value: list[CallAnalyticsLanguageWithScore], +) -> None: + member_schema = schema.members["member"] + with serializer.begin_list(schema, len(value)) as ls: + for e in value: + ls.write_struct(member_schema, e) + + +def _deserialize_call_analytics_language_identification( + deserializer: ShapeDeserializer, schema: Schema +) -> list[CallAnalyticsLanguageWithScore]: + result: list[CallAnalyticsLanguageWithScore] = [] + + def _read_value(d: ShapeDeserializer): + if d.is_null(): + d.read_null() + + else: + result.append(CallAnalyticsLanguageWithScore.deserialize(d)) + + deserializer.read_list(schema, _read_value) + return result + + +def _serialize_string_list( + serializer: ShapeSerializer, schema: Schema, value: list[str] +) -> None: + member_schema = schema.members["member"] + with serializer.begin_list(schema, len(value)) as ls: + for e in value: + ls.write_string(member_schema, e) + + +def _deserialize_string_list( + deserializer: ShapeDeserializer, schema: Schema +) -> list[str]: + result: list[str] = [] + member_schema = schema.members["member"] + + def _read_value(d: ShapeDeserializer): + if d.is_null(): + d.read_null() + + else: + result.append(d.read_string(member_schema)) + + deserializer.read_list(schema, _read_value) + return result + + +@dataclass(kw_only=True) +class TimestampRange: + """ + Contains the timestamp range (start time through end time) of a matched + category. + + """ + + begin_offset_millis: int | None = None + """ + The time, in milliseconds, from the beginning of the audio stream to the start + of the category match. + """ + end_offset_millis: int | None = None + """ + The time, in milliseconds, from the beginning of the audio stream to the end of + the category match. + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_TIMESTAMP_RANGE, self) + + def serialize_members(self, serializer: ShapeSerializer): + if self.begin_offset_millis is not None: + serializer.write_long( + _SCHEMA_TIMESTAMP_RANGE.members["BeginOffsetMillis"], + self.begin_offset_millis, + ) + + if self.end_offset_millis is not None: + serializer.write_long( + _SCHEMA_TIMESTAMP_RANGE.members["EndOffsetMillis"], + self.end_offset_millis, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["begin_offset_millis"] = de.read_long( + _SCHEMA_TIMESTAMP_RANGE.members["BeginOffsetMillis"] + ) + + case 1: + kwargs["end_offset_millis"] = de.read_long( + _SCHEMA_TIMESTAMP_RANGE.members["EndOffsetMillis"] + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct(_SCHEMA_TIMESTAMP_RANGE, consumer=_consumer) + return kwargs + + +def _serialize_timestamp_ranges( + serializer: ShapeSerializer, schema: Schema, value: list[TimestampRange] +) -> None: + member_schema = schema.members["member"] + with serializer.begin_list(schema, len(value)) as ls: + for e in value: + ls.write_struct(member_schema, e) + + +def _deserialize_timestamp_ranges( + deserializer: ShapeDeserializer, schema: Schema +) -> list[TimestampRange]: + result: list[TimestampRange] = [] + + def _read_value(d: ShapeDeserializer): + if d.is_null(): + d.read_null() + + else: + result.append(TimestampRange.deserialize(d)) + + deserializer.read_list(schema, _read_value) + return result + + +@dataclass(kw_only=True) +class PointsOfInterest: + """ + Contains the timestamps of matched categories. + + """ + + timestamp_ranges: list[TimestampRange] | None = None + """ + Contains the timestamp ranges (start time through end time) of matched + categories and rules. + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_POINTS_OF_INTEREST, self) + + def serialize_members(self, serializer: ShapeSerializer): + if self.timestamp_ranges is not None: + _serialize_timestamp_ranges( + serializer, + _SCHEMA_POINTS_OF_INTEREST.members["TimestampRanges"], + self.timestamp_ranges, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["timestamp_ranges"] = _deserialize_timestamp_ranges( + de, _SCHEMA_POINTS_OF_INTEREST.members["TimestampRanges"] + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct(_SCHEMA_POINTS_OF_INTEREST, consumer=_consumer) + return kwargs + + +def _serialize_matched_category_details( + serializer: ShapeSerializer, schema: Schema, value: dict[str, PointsOfInterest] +) -> None: + with serializer.begin_map(schema, len(value)) as m: + value_schema = schema.members["value"] + for k, v in value.items(): + m.entry(k, lambda vs: vs.write_struct(value_schema, v)) + + +def _deserialize_matched_category_details( + deserializer: ShapeDeserializer, schema: Schema +) -> dict[str, PointsOfInterest]: + result: dict[str, PointsOfInterest] = {} + value_schema = schema.members["value"] + + def _read_value(k: str, d: ShapeDeserializer): + if d.is_null(): + d.read_null() + + else: + result[k] = PointsOfInterest.deserialize(d) + + deserializer.read_map(schema, _read_value) + return result + + +@dataclass(kw_only=True) +class CategoryEvent: + """ + Provides information on any ``TranscriptFilterType`` categories that matched + your transcription output. Matches are identified for each segment upon + completion of that segment. + + """ + + matched_categories: list[str] | None = None + """ + Lists the categories that were matched in your audio segment. + """ + matched_details: dict[str, PointsOfInterest] | None = None + """ + Contains information about the matched categories, including category names and + timestamps. + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_CATEGORY_EVENT, self) + + def serialize_members(self, serializer: ShapeSerializer): + if self.matched_categories is not None: + _serialize_string_list( + serializer, + _SCHEMA_CATEGORY_EVENT.members["MatchedCategories"], + self.matched_categories, + ) + + if self.matched_details is not None: + _serialize_matched_category_details( + serializer, + _SCHEMA_CATEGORY_EVENT.members["MatchedDetails"], + self.matched_details, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["matched_categories"] = _deserialize_string_list( + de, _SCHEMA_CATEGORY_EVENT.members["MatchedCategories"] + ) + + case 1: + kwargs["matched_details"] = _deserialize_matched_category_details( + de, _SCHEMA_CATEGORY_EVENT.members["MatchedDetails"] + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct(_SCHEMA_CATEGORY_EVENT, consumer=_consumer) + return kwargs + + +@dataclass(kw_only=True) +class ConflictException(ServiceError): + """ + A new stream started with the same session ID. The current stream has been + terminated. + + """ + + fault: Literal["client", "server"] | None = "client" + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_CONFLICT_EXCEPTION, self) + + def serialize_members(self, serializer: ShapeSerializer): + if self.message is not None: + serializer.write_string( + _SCHEMA_CONFLICT_EXCEPTION.members["Message"], self.message + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["message"] = de.read_string( + _SCHEMA_CONFLICT_EXCEPTION.members["Message"] + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct(_SCHEMA_CONFLICT_EXCEPTION, consumer=_consumer) + return kwargs + + +@dataclass(kw_only=True) +class InternalFailureException(ServiceError): + """ + A problem occurred while processing the audio. Amazon Transcribe terminated + processing. + + """ + + fault: Literal["client", "server"] | None = "server" + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_INTERNAL_FAILURE_EXCEPTION, self) + + def serialize_members(self, serializer: ShapeSerializer): + if self.message is not None: + serializer.write_string( + _SCHEMA_INTERNAL_FAILURE_EXCEPTION.members["Message"], self.message + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["message"] = de.read_string( + _SCHEMA_INTERNAL_FAILURE_EXCEPTION.members["Message"] + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct(_SCHEMA_INTERNAL_FAILURE_EXCEPTION, consumer=_consumer) + return kwargs + + +@dataclass(kw_only=True) +class LimitExceededException(ServiceError): + """ + Your client has exceeded one of the Amazon Transcribe limits. This is typically + the audio length limit. Break your audio stream into smaller chunks and try your + request again. + + """ + + fault: Literal["client", "server"] | None = "client" + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_LIMIT_EXCEEDED_EXCEPTION, self) + + def serialize_members(self, serializer: ShapeSerializer): + if self.message is not None: + serializer.write_string( + _SCHEMA_LIMIT_EXCEEDED_EXCEPTION.members["Message"], self.message + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["message"] = de.read_string( + _SCHEMA_LIMIT_EXCEEDED_EXCEPTION.members["Message"] + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct(_SCHEMA_LIMIT_EXCEEDED_EXCEPTION, consumer=_consumer) + return kwargs + + +@dataclass(kw_only=True) +class ServiceUnavailableException(ServiceError): + """ + The service is currently unavailable. Try your request later. + + """ + + fault: Literal["client", "server"] | None = "server" + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_SERVICE_UNAVAILABLE_EXCEPTION, self) + + def serialize_members(self, serializer: ShapeSerializer): + if self.message is not None: + serializer.write_string( + _SCHEMA_SERVICE_UNAVAILABLE_EXCEPTION.members["Message"], self.message + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["message"] = de.read_string( + _SCHEMA_SERVICE_UNAVAILABLE_EXCEPTION.members["Message"] + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct( + _SCHEMA_SERVICE_UNAVAILABLE_EXCEPTION, consumer=_consumer + ) + return kwargs + + +@dataclass(kw_only=True) +class CharacterOffsets: + """ + Provides the location, using character count, in your transcript where a match + is identified. For example, the location of an issue or a category match within + a segment. + + """ + + begin: int | None = None + """ + Provides the character count of the first character where a match is identified. + For example, the first character associated with an issue or a category match in + a segment transcript. + """ + end: int | None = None + """ + Provides the character count of the last character where a match is identified. + For example, the last character associated with an issue or a category match in + a segment transcript. + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_CHARACTER_OFFSETS, self) + + def serialize_members(self, serializer: ShapeSerializer): + if self.begin is not None: + serializer.write_integer( + _SCHEMA_CHARACTER_OFFSETS.members["Begin"], self.begin + ) + + if self.end is not None: + serializer.write_integer(_SCHEMA_CHARACTER_OFFSETS.members["End"], self.end) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["begin"] = de.read_integer( + _SCHEMA_CHARACTER_OFFSETS.members["Begin"] + ) + + case 1: + kwargs["end"] = de.read_integer( + _SCHEMA_CHARACTER_OFFSETS.members["End"] + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct(_SCHEMA_CHARACTER_OFFSETS, consumer=_consumer) + return kwargs + + +@dataclass(kw_only=True) +class IssueDetected: + """ + Lists the issues that were identified in your audio segment. + + """ + + character_offsets: CharacterOffsets | None = None + """ + Provides the timestamps that identify when in an audio segment the specified + issue occurs. + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_ISSUE_DETECTED, self) + + def serialize_members(self, serializer: ShapeSerializer): + if self.character_offsets is not None: + serializer.write_struct( + _SCHEMA_ISSUE_DETECTED.members["CharacterOffsets"], + self.character_offsets, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["character_offsets"] = CharacterOffsets.deserialize(de) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct(_SCHEMA_ISSUE_DETECTED, consumer=_consumer) + return kwargs + + +def _serialize_issues_detected( + serializer: ShapeSerializer, schema: Schema, value: list[IssueDetected] +) -> None: + member_schema = schema.members["member"] + with serializer.begin_list(schema, len(value)) as ls: + for e in value: + ls.write_struct(member_schema, e) + + +def _deserialize_issues_detected( + deserializer: ShapeDeserializer, schema: Schema +) -> list[IssueDetected]: + result: list[IssueDetected] = [] + + def _read_value(d: ShapeDeserializer): + if d.is_null(): + d.read_null() + + else: + result.append(IssueDetected.deserialize(d)) + + deserializer.read_list(schema, _read_value) + return result + + +class Sentiment(StrEnum): + POSITIVE = "POSITIVE" + NEGATIVE = "NEGATIVE" + MIXED = "MIXED" + NEUTRAL = "NEUTRAL" + + +@dataclass(kw_only=True) +class UtteranceEvent: + """ + Contains set of transcription results from one or more audio segments, along + with additional information about the parameters included in your request. For + example, channel definitions, partial result stabilization, sentiment, and issue + detection. + + """ + + utterance_id: str | None = None + """ + The unique identifier that is associated with the specified ``UtteranceEvent``. + """ + is_partial: bool = False + """ + Indicates whether the segment in the ``UtteranceEvent`` is complete (``FALSE``) + or partial (``TRUE``). + """ + participant_role: str | None = None + """ + Provides the role of the speaker for each audio channel, either ``CUSTOMER`` or + ``AGENT``. + """ + begin_offset_millis: int | None = None + """ + The time, in milliseconds, from the beginning of the audio stream to the start + of the ``UtteranceEvent``. + """ + end_offset_millis: int | None = None + """ + The time, in milliseconds, from the beginning of the audio stream to the start + of the ``UtteranceEvent``. + """ + transcript: str | None = None + """ + Contains transcribed text. + """ + items: list[CallAnalyticsItem] | None = None + """ + Contains words, phrases, or punctuation marks that are associated with the + specified ``UtteranceEvent``. + """ + entities: list[CallAnalyticsEntity] | None = None + """ + Contains entities identified as personally identifiable information (PII) in + your transcription output. + """ + sentiment: str | None = None + """ + Provides the sentiment that was detected in the specified segment. + """ + issues_detected: list[IssueDetected] | None = None + """ + Provides the issue that was detected in the specified segment. + """ + language_code: str | None = None + """ + The language code that represents the language spoken in your audio stream. + """ + language_identification: list[CallAnalyticsLanguageWithScore] | None = None + """ + The language code of the dominant language identified in your stream. + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_UTTERANCE_EVENT, self) + + def serialize_members(self, serializer: ShapeSerializer): + if self.utterance_id is not None: + serializer.write_string( + _SCHEMA_UTTERANCE_EVENT.members["UtteranceId"], self.utterance_id + ) + + serializer.write_boolean( + _SCHEMA_UTTERANCE_EVENT.members["IsPartial"], self.is_partial + ) + if self.participant_role is not None: + serializer.write_string( + _SCHEMA_UTTERANCE_EVENT.members["ParticipantRole"], + self.participant_role, + ) + + if self.begin_offset_millis is not None: + serializer.write_long( + _SCHEMA_UTTERANCE_EVENT.members["BeginOffsetMillis"], + self.begin_offset_millis, + ) + + if self.end_offset_millis is not None: + serializer.write_long( + _SCHEMA_UTTERANCE_EVENT.members["EndOffsetMillis"], + self.end_offset_millis, + ) + + if self.transcript is not None: + serializer.write_string( + _SCHEMA_UTTERANCE_EVENT.members["Transcript"], self.transcript + ) + + if self.items is not None: + _serialize_call_analytics_item_list( + serializer, _SCHEMA_UTTERANCE_EVENT.members["Items"], self.items + ) + + if self.entities is not None: + _serialize_call_analytics_entity_list( + serializer, _SCHEMA_UTTERANCE_EVENT.members["Entities"], self.entities + ) + + if self.sentiment is not None: + serializer.write_string( + _SCHEMA_UTTERANCE_EVENT.members["Sentiment"], self.sentiment + ) + + if self.issues_detected is not None: + _serialize_issues_detected( + serializer, + _SCHEMA_UTTERANCE_EVENT.members["IssuesDetected"], + self.issues_detected, + ) + + if self.language_code is not None: + serializer.write_string( + _SCHEMA_UTTERANCE_EVENT.members["LanguageCode"], self.language_code + ) + + if self.language_identification is not None: + _serialize_call_analytics_language_identification( + serializer, + _SCHEMA_UTTERANCE_EVENT.members["LanguageIdentification"], + self.language_identification, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["utterance_id"] = de.read_string( + _SCHEMA_UTTERANCE_EVENT.members["UtteranceId"] + ) + + case 1: + kwargs["is_partial"] = de.read_boolean( + _SCHEMA_UTTERANCE_EVENT.members["IsPartial"] + ) + + case 2: + kwargs["participant_role"] = de.read_string( + _SCHEMA_UTTERANCE_EVENT.members["ParticipantRole"] + ) + + case 3: + kwargs["begin_offset_millis"] = de.read_long( + _SCHEMA_UTTERANCE_EVENT.members["BeginOffsetMillis"] + ) + + case 4: + kwargs["end_offset_millis"] = de.read_long( + _SCHEMA_UTTERANCE_EVENT.members["EndOffsetMillis"] + ) + + case 5: + kwargs["transcript"] = de.read_string( + _SCHEMA_UTTERANCE_EVENT.members["Transcript"] + ) + + case 6: + kwargs["items"] = _deserialize_call_analytics_item_list( + de, _SCHEMA_UTTERANCE_EVENT.members["Items"] + ) + + case 7: + kwargs["entities"] = _deserialize_call_analytics_entity_list( + de, _SCHEMA_UTTERANCE_EVENT.members["Entities"] + ) + + case 8: + kwargs["sentiment"] = de.read_string( + _SCHEMA_UTTERANCE_EVENT.members["Sentiment"] + ) + + case 9: + kwargs["issues_detected"] = _deserialize_issues_detected( + de, _SCHEMA_UTTERANCE_EVENT.members["IssuesDetected"] + ) + + case 10: + kwargs["language_code"] = de.read_string( + _SCHEMA_UTTERANCE_EVENT.members["LanguageCode"] + ) + + case 11: + kwargs["language_identification"] = ( + _deserialize_call_analytics_language_identification( + de, + _SCHEMA_UTTERANCE_EVENT.members["LanguageIdentification"], + ) + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct(_SCHEMA_UTTERANCE_EVENT, consumer=_consumer) + return kwargs + + +@dataclass +class CallAnalyticsTranscriptResultStreamUtteranceEvent: + """ + Contains set of transcription results from one or more audio segments, along + with additional information per your request parameters. This can include + information relating to channel definitions, partial result stabilization, + sentiment, issue detection, and other transcription-related data. + + """ + + value: UtteranceEvent + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_CALL_ANALYTICS_TRANSCRIPT_RESULT_STREAM, self) + + def serialize_members(self, serializer: ShapeSerializer): + serializer.write_struct( + _SCHEMA_CALL_ANALYTICS_TRANSCRIPT_RESULT_STREAM.members["UtteranceEvent"], + self.value, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(value=UtteranceEvent.deserialize(deserializer)) + + +@dataclass +class CallAnalyticsTranscriptResultStreamCategoryEvent: + """ + Provides information on matched categories that were used to generate real-time + supervisor alerts. + + """ + + value: CategoryEvent + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_CALL_ANALYTICS_TRANSCRIPT_RESULT_STREAM, self) + + def serialize_members(self, serializer: ShapeSerializer): + serializer.write_struct( + _SCHEMA_CALL_ANALYTICS_TRANSCRIPT_RESULT_STREAM.members["CategoryEvent"], + self.value, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(value=CategoryEvent.deserialize(deserializer)) + + +@dataclass +class CallAnalyticsTranscriptResultStreamBadRequestException: + """ + One or more arguments to the ``StartStreamTranscription``, + ``StartMedicalStreamTranscription``, or + ``StartCallAnalyticsStreamTranscription`` operation was not valid. For example, + ``MediaEncoding`` or ``LanguageCode`` used unsupported values. Check the + specified parameters and try your request again. + + """ + + value: BadRequestException + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_CALL_ANALYTICS_TRANSCRIPT_RESULT_STREAM, self) + + def serialize_members(self, serializer: ShapeSerializer): + serializer.write_struct( + _SCHEMA_CALL_ANALYTICS_TRANSCRIPT_RESULT_STREAM.members[ + "BadRequestException" + ], + self.value, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(value=BadRequestException.deserialize(deserializer)) + + +@dataclass +class CallAnalyticsTranscriptResultStreamLimitExceededException: + """ + Your client has exceeded one of the Amazon Transcribe limits. This is typically + the audio length limit. Break your audio stream into smaller chunks and try your + request again. + + """ + + value: LimitExceededException + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_CALL_ANALYTICS_TRANSCRIPT_RESULT_STREAM, self) + + def serialize_members(self, serializer: ShapeSerializer): + serializer.write_struct( + _SCHEMA_CALL_ANALYTICS_TRANSCRIPT_RESULT_STREAM.members[ + "LimitExceededException" + ], + self.value, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(value=LimitExceededException.deserialize(deserializer)) + + +@dataclass +class CallAnalyticsTranscriptResultStreamInternalFailureException: + """ + A problem occurred while processing the audio. Amazon Transcribe terminated + processing. + + """ + + value: InternalFailureException + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_CALL_ANALYTICS_TRANSCRIPT_RESULT_STREAM, self) + + def serialize_members(self, serializer: ShapeSerializer): + serializer.write_struct( + _SCHEMA_CALL_ANALYTICS_TRANSCRIPT_RESULT_STREAM.members[ + "InternalFailureException" + ], + self.value, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(value=InternalFailureException.deserialize(deserializer)) + + +@dataclass +class CallAnalyticsTranscriptResultStreamConflictException: + """ + A new stream started with the same session ID. The current stream has been + terminated. + + """ + + value: ConflictException + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_CALL_ANALYTICS_TRANSCRIPT_RESULT_STREAM, self) + + def serialize_members(self, serializer: ShapeSerializer): + serializer.write_struct( + _SCHEMA_CALL_ANALYTICS_TRANSCRIPT_RESULT_STREAM.members[ + "ConflictException" + ], + self.value, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(value=ConflictException.deserialize(deserializer)) + + +@dataclass +class CallAnalyticsTranscriptResultStreamServiceUnavailableException: + """ + The service is currently unavailable. Try your request later. + + """ + + value: ServiceUnavailableException + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_CALL_ANALYTICS_TRANSCRIPT_RESULT_STREAM, self) + + def serialize_members(self, serializer: ShapeSerializer): + serializer.write_struct( + _SCHEMA_CALL_ANALYTICS_TRANSCRIPT_RESULT_STREAM.members[ + "ServiceUnavailableException" + ], + self.value, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(value=ServiceUnavailableException.deserialize(deserializer)) + + +@dataclass +class CallAnalyticsTranscriptResultStreamUnknown: + """Represents an unknown variant. + + If you receive this value, you will need to update your library to receive the + parsed value. + + This value may not be deliberately sent. + """ + + tag: str + + def serialize(self, serializer: ShapeSerializer): + raise SerializationError("Unknown union variants may not be serialized.") + + def serialize_members(self, serializer: ShapeSerializer): + raise SerializationError("Unknown union variants may not be serialized.") + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + raise NotImplementedError() + + +CallAnalyticsTranscriptResultStream = Union[ + CallAnalyticsTranscriptResultStreamUtteranceEvent + | CallAnalyticsTranscriptResultStreamCategoryEvent + | CallAnalyticsTranscriptResultStreamBadRequestException + | CallAnalyticsTranscriptResultStreamLimitExceededException + | CallAnalyticsTranscriptResultStreamInternalFailureException + | CallAnalyticsTranscriptResultStreamConflictException + | CallAnalyticsTranscriptResultStreamServiceUnavailableException + | CallAnalyticsTranscriptResultStreamUnknown +] + +""" +Contains detailed information about your real-time Call Analytics session. These +details are provided in the ``UtteranceEvent`` and ``CategoryEvent`` objects. + +""" + + +class _CallAnalyticsTranscriptResultStreamDeserializer: + _result: CallAnalyticsTranscriptResultStream | None = None + + def deserialize( + self, deserializer: ShapeDeserializer + ) -> CallAnalyticsTranscriptResultStream: + self._result = None + deserializer.read_struct( + _SCHEMA_CALL_ANALYTICS_TRANSCRIPT_RESULT_STREAM, self._consumer + ) + + if self._result is None: + raise SerializationError( + "Unions must have exactly one value, but found none." + ) + + return self._result + + def _consumer(self, schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + self._set_result( + CallAnalyticsTranscriptResultStreamUtteranceEvent.deserialize(de) + ) + + case 1: + self._set_result( + CallAnalyticsTranscriptResultStreamCategoryEvent.deserialize(de) + ) + + case 2: + self._set_result( + CallAnalyticsTranscriptResultStreamBadRequestException.deserialize( + de + ) + ) + + case 3: + self._set_result( + CallAnalyticsTranscriptResultStreamLimitExceededException.deserialize( + de + ) + ) + + case 4: + self._set_result( + CallAnalyticsTranscriptResultStreamInternalFailureException.deserialize( + de + ) + ) + + case 5: + self._set_result( + CallAnalyticsTranscriptResultStreamConflictException.deserialize(de) + ) + + case 6: + self._set_result( + CallAnalyticsTranscriptResultStreamServiceUnavailableException.deserialize( + de + ) + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + def _set_result(self, value: CallAnalyticsTranscriptResultStream) -> None: + if self._result is not None: + raise SerializationError( + "Unions must have exactly one value, but found more than one." + ) + self._result = value + + +class ClinicalNoteGenerationStatus(StrEnum): + IN_PROGRESS = "IN_PROGRESS" + FAILED = "FAILED" + COMPLETED = "COMPLETED" + + +@dataclass(kw_only=True) +class ClinicalNoteGenerationResult: + """ + The details for clinical note generation, including status, and output locations + for clinical note and aggregated transcript if the analytics completed, or + failure reason if the analytics failed. + + """ + + clinical_note_output_location: str | None = None + """ + Holds the Amazon S3 URI for the output Clinical Note. + """ + transcript_output_location: str | None = None + """ + Holds the Amazon S3 URI for the output Transcript. + """ + status: str | None = None + """ + The status of the clinical note generation. + + Possible Values: + + * ``IN_PROGRESS`` + + * ``FAILED`` + + * ``COMPLETED`` + + After audio streaming finishes, and you send a + ``MedicalScribeSessionControlEvent`` event (with END_OF_SESSION as the Type), + the status is set to ``IN_PROGRESS``. If the status is ``COMPLETED``, the + analytics completed successfully, and you can find the results at the locations + specified in ``ClinicalNoteOutputLocation`` and ``TranscriptOutputLocation``. If + the status is ``FAILED``, ``FailureReason`` provides details about the failure. + """ + failure_reason: str | None = None + """ + If ``ClinicalNoteGenerationResult`` is ``FAILED``, information about why it + failed. + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_CLINICAL_NOTE_GENERATION_RESULT, self) + + def serialize_members(self, serializer: ShapeSerializer): + if self.clinical_note_output_location is not None: + serializer.write_string( + _SCHEMA_CLINICAL_NOTE_GENERATION_RESULT.members[ + "ClinicalNoteOutputLocation" + ], + self.clinical_note_output_location, + ) + + if self.transcript_output_location is not None: + serializer.write_string( + _SCHEMA_CLINICAL_NOTE_GENERATION_RESULT.members[ + "TranscriptOutputLocation" + ], + self.transcript_output_location, + ) + + if self.status is not None: + serializer.write_string( + _SCHEMA_CLINICAL_NOTE_GENERATION_RESULT.members["Status"], self.status + ) + + if self.failure_reason is not None: + serializer.write_string( + _SCHEMA_CLINICAL_NOTE_GENERATION_RESULT.members["FailureReason"], + self.failure_reason, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["clinical_note_output_location"] = de.read_string( + _SCHEMA_CLINICAL_NOTE_GENERATION_RESULT.members[ + "ClinicalNoteOutputLocation" + ] + ) + + case 1: + kwargs["transcript_output_location"] = de.read_string( + _SCHEMA_CLINICAL_NOTE_GENERATION_RESULT.members[ + "TranscriptOutputLocation" + ] + ) + + case 2: + kwargs["status"] = de.read_string( + _SCHEMA_CLINICAL_NOTE_GENERATION_RESULT.members["Status"] + ) + + case 3: + kwargs["failure_reason"] = de.read_string( + _SCHEMA_CLINICAL_NOTE_GENERATION_RESULT.members["FailureReason"] + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct( + _SCHEMA_CLINICAL_NOTE_GENERATION_RESULT, consumer=_consumer + ) + return kwargs + + +class MedicalScribeNoteTemplate(StrEnum): + HISTORY_AND_PHYSICAL = "HISTORY_AND_PHYSICAL" + GIRPP = "GIRPP" + DAP = "DAP" + SIRP = "SIRP" + BIRP = "BIRP" + BEHAVIORAL_SOAP = "BEHAVIORAL_SOAP" + PHYSICAL_SOAP = "PHYSICAL_SOAP" + + +@dataclass(kw_only=True) +class ClinicalNoteGenerationSettings: + """ + The output configuration for aggregated transcript and clinical note generation. + + """ + + output_bucket_name: str + """ + The name of the Amazon S3 bucket where you want the output of Amazon Web + Services HealthScribe post-stream analytics stored. Don't include the ``S3://`` + prefix of the specified bucket. + + HealthScribe outputs transcript and clinical note files under the prefix: + ``S3://$$output-bucket-name/healthscribe-streaming/session-id/post-stream-analytics/clinical-notes`` + + The role ``ResourceAccessRoleArn`` specified in the ``MedicalScribeConfigurationEvent`` must have permission to use the specified location. You can change Amazon S3 permissions using the ` Amazon Web Services Management Console `_. + See also `Permissions Required for IAM User Roles `_ + . + """ + + note_template: str | None = None + """ + Specify one of the following templates to use for the clinical note summary. The + default is ``HISTORY_AND_PHYSICAL``. + + * HISTORY_AND_PHYSICAL: Provides summaries for key sections of the clinical + documentation. Examples of sections include Chief Complaint, History of Present + Illness, Review of Systems, Past Medical History, Assessment, and Plan. + + * GIRPP: Provides summaries based on the patients progress toward goals. + Examples of sections include Goal, Intervention, Response, Progress, and Plan. + + * BIRP: Focuses on the patient's behavioral patterns and responses. Examples of + sections include Behavior, Intervention, Response, and Plan. + + * SIRP: Emphasizes the situational context of therapy. Examples of sections + include Situation, Intervention, Response, and Plan. + + * DAP: Provides a simplified format for clinical documentation. Examples of + sections include Data, Assessment, and Plan. + + * BEHAVIORAL_SOAP: Behavioral health focused documentation format. Examples of + sections include Subjective, Objective, Assessment, and Plan. + + * PHYSICAL_SOAP: Physical health focused documentation format. Examples of + sections include Subjective, Objective, Assessment, and Plan. + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_CLINICAL_NOTE_GENERATION_SETTINGS, self) + + def serialize_members(self, serializer: ShapeSerializer): + serializer.write_string( + _SCHEMA_CLINICAL_NOTE_GENERATION_SETTINGS.members["OutputBucketName"], + self.output_bucket_name, + ) + if self.note_template is not None: + serializer.write_string( + _SCHEMA_CLINICAL_NOTE_GENERATION_SETTINGS.members["NoteTemplate"], + self.note_template, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["output_bucket_name"] = de.read_string( + _SCHEMA_CLINICAL_NOTE_GENERATION_SETTINGS.members[ + "OutputBucketName" + ] + ) + + case 1: + kwargs["note_template"] = de.read_string( + _SCHEMA_CLINICAL_NOTE_GENERATION_SETTINGS.members[ + "NoteTemplate" + ] + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct( + _SCHEMA_CLINICAL_NOTE_GENERATION_SETTINGS, consumer=_consumer + ) + return kwargs + + +class ContentIdentificationType(StrEnum): + PII = "PII" + + +class ContentRedactionType(StrEnum): + PII = "PII" + + +@dataclass(kw_only=True) +class GetMedicalScribeStreamInput: + session_id: str | None = None + """ + The identifier of the HealthScribe streaming session you want information about. + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_GET_MEDICAL_SCRIBE_STREAM_INPUT, self) + + def serialize_members(self, serializer: ShapeSerializer): + if self.session_id is not None: + serializer.write_string( + _SCHEMA_GET_MEDICAL_SCRIBE_STREAM_INPUT.members["SessionId"], + self.session_id, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["session_id"] = de.read_string( + _SCHEMA_GET_MEDICAL_SCRIBE_STREAM_INPUT.members["SessionId"] + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct( + _SCHEMA_GET_MEDICAL_SCRIBE_STREAM_INPUT, consumer=_consumer + ) + return kwargs + + +class MedicalScribeParticipantRole(StrEnum): + PATIENT = "PATIENT" + CLINICIAN = "CLINICIAN" + + +@dataclass(kw_only=True) +class MedicalScribeChannelDefinition: + """ + Makes it possible to specify which speaker is on which channel. For example, if + the clinician is the first participant to speak, you would set the ``ChannelId`` + of the first ``ChannelDefinition`` in the list to ``0`` (to indicate the first + channel) and ``ParticipantRole`` to ``CLINICIAN`` (to indicate that it's the + clinician speaking). Then you would set the ``ChannelId`` of the second + ``ChannelDefinition`` in the list to ``1`` (to indicate the second channel) and + ``ParticipantRole`` to ``PATIENT`` (to indicate that it's the patient speaking). + + If you don't specify a channel definition, HealthScribe will diarize the + transcription and identify speaker roles for each speaker. + + """ + + participant_role: str + """ + Specify the participant that you want to flag. The allowed options are + ``CLINICIAN`` and ``PATIENT``. + """ + + channel_id: int = 0 + """ + Specify the audio channel you want to define. + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_MEDICAL_SCRIBE_CHANNEL_DEFINITION, self) + + def serialize_members(self, serializer: ShapeSerializer): + serializer.write_integer( + _SCHEMA_MEDICAL_SCRIBE_CHANNEL_DEFINITION.members["ChannelId"], + self.channel_id, + ) + serializer.write_string( + _SCHEMA_MEDICAL_SCRIBE_CHANNEL_DEFINITION.members["ParticipantRole"], + self.participant_role, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["channel_id"] = de.read_integer( + _SCHEMA_MEDICAL_SCRIBE_CHANNEL_DEFINITION.members["ChannelId"] + ) + + case 1: + kwargs["participant_role"] = de.read_string( + _SCHEMA_MEDICAL_SCRIBE_CHANNEL_DEFINITION.members[ + "ParticipantRole" + ] + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct( + _SCHEMA_MEDICAL_SCRIBE_CHANNEL_DEFINITION, consumer=_consumer + ) + return kwargs + + +def _serialize_medical_scribe_channel_definitions( + serializer: ShapeSerializer, + schema: Schema, + value: list[MedicalScribeChannelDefinition], +) -> None: + member_schema = schema.members["member"] + with serializer.begin_list(schema, len(value)) as ls: + for e in value: + ls.write_struct(member_schema, e) + + +def _deserialize_medical_scribe_channel_definitions( + deserializer: ShapeDeserializer, schema: Schema +) -> list[MedicalScribeChannelDefinition]: + result: list[MedicalScribeChannelDefinition] = [] + + def _read_value(d: ShapeDeserializer): + if d.is_null(): + d.read_null() + + else: + result.append(MedicalScribeChannelDefinition.deserialize(d)) + + deserializer.read_list(schema, _read_value) + return result + + +def _serialize_kms_encryption_context_map( + serializer: ShapeSerializer, schema: Schema, value: dict[str, str] +) -> None: + with serializer.begin_map(schema, len(value)) as m: + value_schema = schema.members["value"] + for k, v in value.items(): + m.entry(k, lambda vs: vs.write_string(value_schema, v)) + + +def _deserialize_kms_encryption_context_map( + deserializer: ShapeDeserializer, schema: Schema +) -> dict[str, str]: + result: dict[str, str] = {} + value_schema = schema.members["value"] + + def _read_value(k: str, d: ShapeDeserializer): + if d.is_null(): + d.read_null() + + else: + result[k] = d.read_string(value_schema) + + deserializer.read_map(schema, _read_value) + return result + + +@dataclass(kw_only=True) +class MedicalScribeEncryptionSettings: + """ + Contains encryption related settings to be used for data encryption with Key + Management Service, including KmsEncryptionContext and KmsKeyId. The KmsKeyId is + required, while KmsEncryptionContext is optional for additional layer of + security. + + By default, Amazon Web Services HealthScribe provides encryption at rest to + protect sensitive customer data using Amazon S3-managed keys. HealthScribe uses + the KMS key you specify as a second layer of encryption. + + Your ``ResourceAccessRoleArn`` must permission to use your KMS key. For more information, see ``Data Encryption at rest for Amazon Web Services HealthScribe ``_ + . + + """ + + kms_key_id: str + """ + The ID of the KMS key you want to use for your streaming session. You can + specify its KMS key ID, key Amazon Resource Name (ARN), alias name, or alias + ARN. When using an alias name, prefix it with ``"alias/"``. To specify a KMS key + in a different Amazon Web Services account, you must use the key ARN or alias + ARN. + + For example: + + * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab + + * Key ARN: + arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab + + * Alias name: alias/ExampleAlias + + * Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias + + To get the key ID and key ARN for a KMS key, use the `ListKeys `_ + or `DescribeKey `_ + KMS API operations. To get the alias name and alias ARN, use `ListKeys `_ + API operation. + """ + + kms_encryption_context: dict[str, str] | None = None + """ + A map of plain text, non-secret key:value pairs, known as encryption context + pairs, that provide an added layer of security for your data. For more + information, see `KMSencryption context `_ + and `Asymmetric keys in KMS `_ + . + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_MEDICAL_SCRIBE_ENCRYPTION_SETTINGS, self) + + def serialize_members(self, serializer: ShapeSerializer): + if self.kms_encryption_context is not None: + _serialize_kms_encryption_context_map( + serializer, + _SCHEMA_MEDICAL_SCRIBE_ENCRYPTION_SETTINGS.members[ + "KmsEncryptionContext" + ], + self.kms_encryption_context, + ) + + serializer.write_string( + _SCHEMA_MEDICAL_SCRIBE_ENCRYPTION_SETTINGS.members["KmsKeyId"], + self.kms_key_id, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["kms_encryption_context"] = ( + _deserialize_kms_encryption_context_map( + de, + _SCHEMA_MEDICAL_SCRIBE_ENCRYPTION_SETTINGS.members[ + "KmsEncryptionContext" + ], + ) + ) + + case 1: + kwargs["kms_key_id"] = de.read_string( + _SCHEMA_MEDICAL_SCRIBE_ENCRYPTION_SETTINGS.members["KmsKeyId"] + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct( + _SCHEMA_MEDICAL_SCRIBE_ENCRYPTION_SETTINGS, consumer=_consumer + ) + return kwargs + + +class MedicalScribeLanguageCode(StrEnum): + EN_US = "en-US" + + +class MedicalScribeMediaEncoding(StrEnum): + PCM = "pcm" + OGG_OPUS = "ogg-opus" + FLAC = "flac" + + +@dataclass(kw_only=True) +class MedicalScribePostStreamAnalyticsResult: + """ + Contains details for the result of post-stream analytics. + + """ + + clinical_note_generation_result: ClinicalNoteGenerationResult | None = None + """ + Provides the Clinical Note Generation result for post-stream analytics. + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct( + _SCHEMA_MEDICAL_SCRIBE_POST_STREAM_ANALYTICS_RESULT, self + ) + + def serialize_members(self, serializer: ShapeSerializer): + if self.clinical_note_generation_result is not None: + serializer.write_struct( + _SCHEMA_MEDICAL_SCRIBE_POST_STREAM_ANALYTICS_RESULT.members[ + "ClinicalNoteGenerationResult" + ], + self.clinical_note_generation_result, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["clinical_note_generation_result"] = ( + ClinicalNoteGenerationResult.deserialize(de) + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct( + _SCHEMA_MEDICAL_SCRIBE_POST_STREAM_ANALYTICS_RESULT, consumer=_consumer + ) + return kwargs + + +@dataclass(kw_only=True) +class MedicalScribePostStreamAnalyticsSettings: + """ + The settings for post-stream analytics. + + """ + + clinical_note_generation_settings: ClinicalNoteGenerationSettings + """ + Specify settings for the post-stream clinical note generation. + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct( + _SCHEMA_MEDICAL_SCRIBE_POST_STREAM_ANALYTICS_SETTINGS, self + ) + + def serialize_members(self, serializer: ShapeSerializer): + serializer.write_struct( + _SCHEMA_MEDICAL_SCRIBE_POST_STREAM_ANALYTICS_SETTINGS.members[ + "ClinicalNoteGenerationSettings" + ], + self.clinical_note_generation_settings, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["clinical_note_generation_settings"] = ( + ClinicalNoteGenerationSettings.deserialize(de) + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct( + _SCHEMA_MEDICAL_SCRIBE_POST_STREAM_ANALYTICS_SETTINGS, consumer=_consumer + ) + return kwargs + + +class MedicalScribeStreamStatus(StrEnum): + IN_PROGRESS = "IN_PROGRESS" + PAUSED = "PAUSED" + FAILED = "FAILED" + COMPLETED = "COMPLETED" + + +class MedicalScribeVocabularyFilterMethod(StrEnum): + REMOVE = "remove" + MASK = "mask" + TAG = "tag" + + +@dataclass(kw_only=True) +class MedicalScribeStreamDetails: + """ + Contains details about a Amazon Web Services HealthScribe streaming session. + + """ + + session_id: str | None = None + """ + The identifier of the HealthScribe streaming session. + """ + stream_created_at: datetime | None = None + """ + The date and time when the HealthScribe streaming session was created. + """ + stream_ended_at: datetime | None = None + """ + The date and time when the HealthScribe streaming session was ended. + """ + language_code: str | None = None + """ + The Language Code of the HealthScribe streaming session. + """ + media_sample_rate_hertz: int | None = None + """ + The sample rate (in hertz) of the HealthScribe streaming session. + """ + media_encoding: str | None = None + """ + The Media Encoding of the HealthScribe streaming session. + """ + vocabulary_name: str | None = None + """ + The vocabulary name of the HealthScribe streaming session. + """ + vocabulary_filter_name: str | None = None + """ + The name of the vocabulary filter used for the HealthScribe streaming session . + """ + vocabulary_filter_method: str | None = None + """ + The method of the vocabulary filter for the HealthScribe streaming session. + """ + resource_access_role_arn: str | None = None + """ + The Amazon Resource Name (ARN) of the role used in the HealthScribe streaming + session. + """ + channel_definitions: list[MedicalScribeChannelDefinition] | None = None + """ + The Channel Definitions of the HealthScribe streaming session. + """ + encryption_settings: MedicalScribeEncryptionSettings | None = None + """ + The Encryption Settings of the HealthScribe streaming session. + """ + stream_status: str | None = None + """ + The streaming status of the HealthScribe streaming session. + + Possible Values: + + * ``IN_PROGRESS`` + + * ``PAUSED`` + + * ``FAILED`` + + * ``COMPLETED`` + + .. note:: + This status is specific to real-time streaming. A ``COMPLETED`` status doesn't + mean that the post-stream analytics is complete. To get status of an analytics + result, check the ``Status`` field for the analytics result within the + ``MedicalScribePostStreamAnalyticsResult``. For example, you can view the status + of the ``ClinicalNoteGenerationResult``. + """ + post_stream_analytics_settings: MedicalScribePostStreamAnalyticsSettings | None = ( + None + ) + """ + The post-stream analytics settings of the HealthScribe streaming session. + """ + post_stream_analytics_result: MedicalScribePostStreamAnalyticsResult | None = None + """ + The result of post-stream analytics for the HealthScribe streaming session. + """ + medical_scribe_context_provided: bool | None = None + """ + Indicates whether the ``MedicalScribeContext`` object was provided when the + stream was started. + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_MEDICAL_SCRIBE_STREAM_DETAILS, self) + + def serialize_members(self, serializer: ShapeSerializer): + if self.session_id is not None: + serializer.write_string( + _SCHEMA_MEDICAL_SCRIBE_STREAM_DETAILS.members["SessionId"], + self.session_id, + ) + + if self.stream_created_at is not None: + serializer.write_timestamp( + _SCHEMA_MEDICAL_SCRIBE_STREAM_DETAILS.members["StreamCreatedAt"], + self.stream_created_at, + ) + + if self.stream_ended_at is not None: + serializer.write_timestamp( + _SCHEMA_MEDICAL_SCRIBE_STREAM_DETAILS.members["StreamEndedAt"], + self.stream_ended_at, + ) + + if self.language_code is not None: + serializer.write_string( + _SCHEMA_MEDICAL_SCRIBE_STREAM_DETAILS.members["LanguageCode"], + self.language_code, + ) + + if self.media_sample_rate_hertz is not None: + serializer.write_integer( + _SCHEMA_MEDICAL_SCRIBE_STREAM_DETAILS.members["MediaSampleRateHertz"], + self.media_sample_rate_hertz, + ) + + if self.media_encoding is not None: + serializer.write_string( + _SCHEMA_MEDICAL_SCRIBE_STREAM_DETAILS.members["MediaEncoding"], + self.media_encoding, + ) + + if self.vocabulary_name is not None: + serializer.write_string( + _SCHEMA_MEDICAL_SCRIBE_STREAM_DETAILS.members["VocabularyName"], + self.vocabulary_name, + ) + + if self.vocabulary_filter_name is not None: + serializer.write_string( + _SCHEMA_MEDICAL_SCRIBE_STREAM_DETAILS.members["VocabularyFilterName"], + self.vocabulary_filter_name, + ) + + if self.vocabulary_filter_method is not None: + serializer.write_string( + _SCHEMA_MEDICAL_SCRIBE_STREAM_DETAILS.members["VocabularyFilterMethod"], + self.vocabulary_filter_method, + ) + + if self.resource_access_role_arn is not None: + serializer.write_string( + _SCHEMA_MEDICAL_SCRIBE_STREAM_DETAILS.members["ResourceAccessRoleArn"], + self.resource_access_role_arn, + ) + + if self.channel_definitions is not None: + _serialize_medical_scribe_channel_definitions( + serializer, + _SCHEMA_MEDICAL_SCRIBE_STREAM_DETAILS.members["ChannelDefinitions"], + self.channel_definitions, + ) + + if self.encryption_settings is not None: + serializer.write_struct( + _SCHEMA_MEDICAL_SCRIBE_STREAM_DETAILS.members["EncryptionSettings"], + self.encryption_settings, + ) + + if self.stream_status is not None: + serializer.write_string( + _SCHEMA_MEDICAL_SCRIBE_STREAM_DETAILS.members["StreamStatus"], + self.stream_status, + ) + + if self.post_stream_analytics_settings is not None: + serializer.write_struct( + _SCHEMA_MEDICAL_SCRIBE_STREAM_DETAILS.members[ + "PostStreamAnalyticsSettings" + ], + self.post_stream_analytics_settings, + ) + + if self.post_stream_analytics_result is not None: + serializer.write_struct( + _SCHEMA_MEDICAL_SCRIBE_STREAM_DETAILS.members[ + "PostStreamAnalyticsResult" + ], + self.post_stream_analytics_result, + ) + + if self.medical_scribe_context_provided is not None: + serializer.write_boolean( + _SCHEMA_MEDICAL_SCRIBE_STREAM_DETAILS.members[ + "MedicalScribeContextProvided" + ], + self.medical_scribe_context_provided, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["session_id"] = de.read_string( + _SCHEMA_MEDICAL_SCRIBE_STREAM_DETAILS.members["SessionId"] + ) + + case 1: + kwargs["stream_created_at"] = de.read_timestamp( + _SCHEMA_MEDICAL_SCRIBE_STREAM_DETAILS.members["StreamCreatedAt"] + ) + + case 2: + kwargs["stream_ended_at"] = de.read_timestamp( + _SCHEMA_MEDICAL_SCRIBE_STREAM_DETAILS.members["StreamEndedAt"] + ) + + case 3: + kwargs["language_code"] = de.read_string( + _SCHEMA_MEDICAL_SCRIBE_STREAM_DETAILS.members["LanguageCode"] + ) + + case 4: + kwargs["media_sample_rate_hertz"] = de.read_integer( + _SCHEMA_MEDICAL_SCRIBE_STREAM_DETAILS.members[ + "MediaSampleRateHertz" + ] + ) + + case 5: + kwargs["media_encoding"] = de.read_string( + _SCHEMA_MEDICAL_SCRIBE_STREAM_DETAILS.members["MediaEncoding"] + ) + + case 6: + kwargs["vocabulary_name"] = de.read_string( + _SCHEMA_MEDICAL_SCRIBE_STREAM_DETAILS.members["VocabularyName"] + ) + + case 7: + kwargs["vocabulary_filter_name"] = de.read_string( + _SCHEMA_MEDICAL_SCRIBE_STREAM_DETAILS.members[ + "VocabularyFilterName" + ] + ) + + case 8: + kwargs["vocabulary_filter_method"] = de.read_string( + _SCHEMA_MEDICAL_SCRIBE_STREAM_DETAILS.members[ + "VocabularyFilterMethod" + ] + ) + + case 9: + kwargs["resource_access_role_arn"] = de.read_string( + _SCHEMA_MEDICAL_SCRIBE_STREAM_DETAILS.members[ + "ResourceAccessRoleArn" + ] + ) + + case 10: + kwargs["channel_definitions"] = ( + _deserialize_medical_scribe_channel_definitions( + de, + _SCHEMA_MEDICAL_SCRIBE_STREAM_DETAILS.members[ + "ChannelDefinitions" + ], + ) + ) + + case 11: + kwargs["encryption_settings"] = ( + MedicalScribeEncryptionSettings.deserialize(de) + ) + + case 12: + kwargs["stream_status"] = de.read_string( + _SCHEMA_MEDICAL_SCRIBE_STREAM_DETAILS.members["StreamStatus"] + ) + + case 13: + kwargs["post_stream_analytics_settings"] = ( + MedicalScribePostStreamAnalyticsSettings.deserialize(de) + ) + + case 14: + kwargs["post_stream_analytics_result"] = ( + MedicalScribePostStreamAnalyticsResult.deserialize(de) + ) + + case 15: + kwargs["medical_scribe_context_provided"] = de.read_boolean( + _SCHEMA_MEDICAL_SCRIBE_STREAM_DETAILS.members[ + "MedicalScribeContextProvided" + ] + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct( + _SCHEMA_MEDICAL_SCRIBE_STREAM_DETAILS, consumer=_consumer + ) + return kwargs + + +@dataclass(kw_only=True) +class GetMedicalScribeStreamOutput: + medical_scribe_stream_details: MedicalScribeStreamDetails | None = None + """ + Provides details about a HealthScribe streaming session. + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_GET_MEDICAL_SCRIBE_STREAM_OUTPUT, self) + + def serialize_members(self, serializer: ShapeSerializer): + if self.medical_scribe_stream_details is not None: + serializer.write_struct( + _SCHEMA_GET_MEDICAL_SCRIBE_STREAM_OUTPUT.members[ + "MedicalScribeStreamDetails" + ], + self.medical_scribe_stream_details, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["medical_scribe_stream_details"] = ( + MedicalScribeStreamDetails.deserialize(de) + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct( + _SCHEMA_GET_MEDICAL_SCRIBE_STREAM_OUTPUT, consumer=_consumer + ) + return kwargs + + +@dataclass(kw_only=True) +class ResourceNotFoundException(ServiceError): + """ + The request references a resource which doesn't exist. + + """ + + fault: Literal["client", "server"] | None = "client" + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_RESOURCE_NOT_FOUND_EXCEPTION, self) + + def serialize_members(self, serializer: ShapeSerializer): + if self.message is not None: + serializer.write_string( + _SCHEMA_RESOURCE_NOT_FOUND_EXCEPTION.members["Message"], self.message + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["message"] = de.read_string( + _SCHEMA_RESOURCE_NOT_FOUND_EXCEPTION.members["Message"] + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct( + _SCHEMA_RESOURCE_NOT_FOUND_EXCEPTION, consumer=_consumer + ) + return kwargs + + +GET_MEDICAL_SCRIBE_STREAM = APIOperation( + input=GetMedicalScribeStreamInput, + output=GetMedicalScribeStreamOutput, + schema=_SCHEMA_GET_MEDICAL_SCRIBE_STREAM, + input_schema=_SCHEMA_GET_MEDICAL_SCRIBE_STREAM_INPUT, + output_schema=_SCHEMA_GET_MEDICAL_SCRIBE_STREAM_OUTPUT, + error_registry=TypeRegistry( + { + ShapeID( + "com.amazonaws.transcribestreaming#BadRequestException" + ): BadRequestException, + ShapeID( + "com.amazonaws.transcribestreaming#InternalFailureException" + ): InternalFailureException, + ShapeID( + "com.amazonaws.transcribestreaming#LimitExceededException" + ): LimitExceededException, + ShapeID( + "com.amazonaws.transcribestreaming#ResourceNotFoundException" + ): ResourceNotFoundException, + } + ), + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +) + + +class LanguageCode(StrEnum): + EN_US = "en-US" + EN_GB = "en-GB" + ES_US = "es-US" + FR_CA = "fr-CA" + FR_FR = "fr-FR" + EN_AU = "en-AU" + IT_IT = "it-IT" + DE_DE = "de-DE" + PT_BR = "pt-BR" + JA_JP = "ja-JP" + KO_KR = "ko-KR" + ZH_CN = "zh-CN" + TH_TH = "th-TH" + ES_ES = "es-ES" + AR_SA = "ar-SA" + PT_PT = "pt-PT" + CA_ES = "ca-ES" + AR_AE = "ar-AE" + HI_IN = "hi-IN" + ZH_HK = "zh-HK" + NL_NL = "nl-NL" + NO_NO = "no-NO" + SV_SE = "sv-SE" + PL_PL = "pl-PL" + FI_FI = "fi-FI" + ZH_TW = "zh-TW" + EN_IN = "en-IN" + EN_IE = "en-IE" + EN_NZ = "en-NZ" + EN_AB = "en-AB" + EN_ZA = "en-ZA" + EN_WL = "en-WL" + DE_CH = "de-CH" + AF_ZA = "af-ZA" + EU_ES = "eu-ES" + HR_HR = "hr-HR" + CS_CZ = "cs-CZ" + DA_DK = "da-DK" + FA_IR = "fa-IR" + GL_ES = "gl-ES" + EL_GR = "el-GR" + HE_IL = "he-IL" + ID_ID = "id-ID" + LV_LV = "lv-LV" + MS_MY = "ms-MY" + RO_RO = "ro-RO" + RU_RU = "ru-RU" + SR_RS = "sr-RS" + SK_SK = "sk-SK" + SO_SO = "so-SO" + TL_PH = "tl-PH" + UK_UA = "uk-UA" + VI_VN = "vi-VN" + ZU_ZA = "zu-ZA" + + +@dataclass(kw_only=True) +class LanguageWithScore: + """ + The language code that represents the language identified in your audio, + including the associated confidence score. If you enabled channel identification + in your request and each channel contained a different language, you will have + more than one ``LanguageWithScore`` result. + + """ + + language_code: str | None = None + """ + The language code of the identified language. + """ + score: float = 0 + """ + The confidence score associated with the identified language code. Confidence + scores are values between zero and one; larger values indicate a higher + confidence in the identified language. + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_LANGUAGE_WITH_SCORE, self) + + def serialize_members(self, serializer: ShapeSerializer): + if self.language_code is not None: + serializer.write_string( + _SCHEMA_LANGUAGE_WITH_SCORE.members["LanguageCode"], self.language_code + ) + + serializer.write_double( + _SCHEMA_LANGUAGE_WITH_SCORE.members["Score"], self.score + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["language_code"] = de.read_string( + _SCHEMA_LANGUAGE_WITH_SCORE.members["LanguageCode"] + ) + + case 1: + kwargs["score"] = de.read_double( + _SCHEMA_LANGUAGE_WITH_SCORE.members["Score"] + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct(_SCHEMA_LANGUAGE_WITH_SCORE, consumer=_consumer) + return kwargs + + +def _serialize_language_identification( + serializer: ShapeSerializer, schema: Schema, value: list[LanguageWithScore] +) -> None: + member_schema = schema.members["member"] + with serializer.begin_list(schema, len(value)) as ls: + for e in value: + ls.write_struct(member_schema, e) + + +def _deserialize_language_identification( + deserializer: ShapeDeserializer, schema: Schema +) -> list[LanguageWithScore]: + result: list[LanguageWithScore] = [] + + def _read_value(d: ShapeDeserializer): + if d.is_null(): + d.read_null() + + else: + result.append(LanguageWithScore.deserialize(d)) + + deserializer.read_list(schema, _read_value) + return result + + +class MediaEncoding(StrEnum): + PCM = "pcm" + OGG_OPUS = "ogg-opus" + FLAC = "flac" + + +@dataclass(kw_only=True) +class MedicalEntity: + """ + Contains entities identified as personal health information (PHI) in your + transcription output, along with various associated attributes. Examples include + category, confidence score, type, stability score, and start and end times. + + """ + + start_time: float = 0 + """ + The start time, in seconds, of the utterance that was identified as PHI. + """ + end_time: float = 0 + """ + The end time, in seconds, of the utterance that was identified as PHI. + """ + category: str | None = None + """ + The category of information identified. The only category is ``PHI``. + """ + content: str | None = None + """ + The word or words identified as PHI. + """ + confidence: float | None = None + """ + The confidence score associated with the identified PHI entity in your audio. + + Confidence scores are values between 0 and 1. A larger value indicates a higher + probability that the identified entity correctly matches the entity spoken in + your media. + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_MEDICAL_ENTITY, self) + + def serialize_members(self, serializer: ShapeSerializer): + serializer.write_double( + _SCHEMA_MEDICAL_ENTITY.members["StartTime"], self.start_time + ) + serializer.write_double( + _SCHEMA_MEDICAL_ENTITY.members["EndTime"], self.end_time + ) + if self.category is not None: + serializer.write_string( + _SCHEMA_MEDICAL_ENTITY.members["Category"], self.category + ) + + if self.content is not None: + serializer.write_string( + _SCHEMA_MEDICAL_ENTITY.members["Content"], self.content + ) + + if self.confidence is not None: + serializer.write_double( + _SCHEMA_MEDICAL_ENTITY.members["Confidence"], self.confidence + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["start_time"] = de.read_double( + _SCHEMA_MEDICAL_ENTITY.members["StartTime"] + ) + + case 1: + kwargs["end_time"] = de.read_double( + _SCHEMA_MEDICAL_ENTITY.members["EndTime"] + ) + + case 2: + kwargs["category"] = de.read_string( + _SCHEMA_MEDICAL_ENTITY.members["Category"] + ) + + case 3: + kwargs["content"] = de.read_string( + _SCHEMA_MEDICAL_ENTITY.members["Content"] + ) + + case 4: + kwargs["confidence"] = de.read_double( + _SCHEMA_MEDICAL_ENTITY.members["Confidence"] + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct(_SCHEMA_MEDICAL_ENTITY, consumer=_consumer) + return kwargs + + +def _serialize_medical_entity_list( + serializer: ShapeSerializer, schema: Schema, value: list[MedicalEntity] +) -> None: + member_schema = schema.members["member"] + with serializer.begin_list(schema, len(value)) as ls: + for e in value: + ls.write_struct(member_schema, e) + + +def _deserialize_medical_entity_list( + deserializer: ShapeDeserializer, schema: Schema +) -> list[MedicalEntity]: + result: list[MedicalEntity] = [] + + def _read_value(d: ShapeDeserializer): + if d.is_null(): + d.read_null() + + else: + result.append(MedicalEntity.deserialize(d)) + + deserializer.read_list(schema, _read_value) + return result + + +@dataclass(kw_only=True) +class MedicalItem: + """ + A word, phrase, or punctuation mark in your transcription output, along with + various associated attributes, such as confidence score, type, and start and end + times. + + """ + + start_time: float = 0 + """ + The start time, in seconds, of the transcribed item. + """ + end_time: float = 0 + """ + The end time, in seconds, of the transcribed item. + """ + type: str | None = None + """ + The type of item identified. Options are: ``PRONUNCIATION`` (spoken words) and + ``PUNCTUATION``. + """ + content: str | None = None + """ + The word or punctuation that was transcribed. + """ + confidence: float | None = None + """ + The confidence score associated with a word or phrase in your transcript. + + Confidence scores are values between 0 and 1. A larger value indicates a higher + probability that the identified item correctly matches the item spoken in your + media. + """ + speaker: str | None = None + """ + If speaker partitioning is enabled, ``Speaker`` labels the speaker of the + specified item. + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_MEDICAL_ITEM, self) + + def serialize_members(self, serializer: ShapeSerializer): + serializer.write_double( + _SCHEMA_MEDICAL_ITEM.members["StartTime"], self.start_time + ) + serializer.write_double(_SCHEMA_MEDICAL_ITEM.members["EndTime"], self.end_time) + if self.type is not None: + serializer.write_string(_SCHEMA_MEDICAL_ITEM.members["Type"], self.type) + + if self.content is not None: + serializer.write_string( + _SCHEMA_MEDICAL_ITEM.members["Content"], self.content + ) + + if self.confidence is not None: + serializer.write_double( + _SCHEMA_MEDICAL_ITEM.members["Confidence"], self.confidence + ) + + if self.speaker is not None: + serializer.write_string( + _SCHEMA_MEDICAL_ITEM.members["Speaker"], self.speaker + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["start_time"] = de.read_double( + _SCHEMA_MEDICAL_ITEM.members["StartTime"] + ) + + case 1: + kwargs["end_time"] = de.read_double( + _SCHEMA_MEDICAL_ITEM.members["EndTime"] + ) + + case 2: + kwargs["type"] = de.read_string( + _SCHEMA_MEDICAL_ITEM.members["Type"] + ) + + case 3: + kwargs["content"] = de.read_string( + _SCHEMA_MEDICAL_ITEM.members["Content"] + ) + + case 4: + kwargs["confidence"] = de.read_double( + _SCHEMA_MEDICAL_ITEM.members["Confidence"] + ) + + case 5: + kwargs["speaker"] = de.read_string( + _SCHEMA_MEDICAL_ITEM.members["Speaker"] + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct(_SCHEMA_MEDICAL_ITEM, consumer=_consumer) + return kwargs + + +def _serialize_medical_item_list( + serializer: ShapeSerializer, schema: Schema, value: list[MedicalItem] +) -> None: + member_schema = schema.members["member"] + with serializer.begin_list(schema, len(value)) as ls: + for e in value: + ls.write_struct(member_schema, e) + + +def _deserialize_medical_item_list( + deserializer: ShapeDeserializer, schema: Schema +) -> list[MedicalItem]: + result: list[MedicalItem] = [] + + def _read_value(d: ShapeDeserializer): + if d.is_null(): + d.read_null() + + else: + result.append(MedicalItem.deserialize(d)) + + deserializer.read_list(schema, _read_value) + return result + + +@dataclass(kw_only=True) +class MedicalAlternative: + """ + A list of possible alternative transcriptions for the input audio. Each + alternative may contain one or more of ``Items``, ``Entities``, or + ``Transcript``. + + """ + + transcript: str | None = None + """ + Contains transcribed text. + """ + items: list[MedicalItem] | None = None + """ + Contains words, phrases, or punctuation marks in your transcription output. + """ + entities: list[MedicalEntity] | None = None + """ + Contains entities identified as personal health information (PHI) in your + transcription output. + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_MEDICAL_ALTERNATIVE, self) + + def serialize_members(self, serializer: ShapeSerializer): + if self.transcript is not None: + serializer.write_string( + _SCHEMA_MEDICAL_ALTERNATIVE.members["Transcript"], self.transcript + ) + + if self.items is not None: + _serialize_medical_item_list( + serializer, _SCHEMA_MEDICAL_ALTERNATIVE.members["Items"], self.items + ) + + if self.entities is not None: + _serialize_medical_entity_list( + serializer, + _SCHEMA_MEDICAL_ALTERNATIVE.members["Entities"], + self.entities, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["transcript"] = de.read_string( + _SCHEMA_MEDICAL_ALTERNATIVE.members["Transcript"] + ) + + case 1: + kwargs["items"] = _deserialize_medical_item_list( + de, _SCHEMA_MEDICAL_ALTERNATIVE.members["Items"] + ) + + case 2: + kwargs["entities"] = _deserialize_medical_entity_list( + de, _SCHEMA_MEDICAL_ALTERNATIVE.members["Entities"] + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct(_SCHEMA_MEDICAL_ALTERNATIVE, consumer=_consumer) + return kwargs + + +def _serialize_medical_alternative_list( + serializer: ShapeSerializer, schema: Schema, value: list[MedicalAlternative] +) -> None: + member_schema = schema.members["member"] + with serializer.begin_list(schema, len(value)) as ls: + for e in value: + ls.write_struct(member_schema, e) + + +def _deserialize_medical_alternative_list( + deserializer: ShapeDeserializer, schema: Schema +) -> list[MedicalAlternative]: + result: list[MedicalAlternative] = [] + + def _read_value(d: ShapeDeserializer): + if d.is_null(): + d.read_null() + + else: + result.append(MedicalAlternative.deserialize(d)) + + deserializer.read_list(schema, _read_value) + return result + + +class MedicalContentIdentificationType(StrEnum): + PHI = "PHI" + + +@dataclass(kw_only=True) +class MedicalResult: + """ + The ``Result`` associated with a ````. + + Contains a set of transcription results from one or more audio segments, along + with additional information per your request parameters. This can include + information relating to alternative transcriptions, channel identification, + partial result stabilization, language identification, and other + transcription-related data. + + """ + + result_id: str | None = None + """ + Provides a unique identifier for the ``Result``. + """ + start_time: float = 0 + """ + The start time, in seconds, of the ``Result``. + """ + end_time: float = 0 + """ + The end time, in seconds, of the ``Result``. + """ + is_partial: bool = False + """ + Indicates if the segment is complete. + + If ``IsPartial`` is ``true``, the segment is not complete. If ``IsPartial`` is + ``false``, the segment is complete. + """ + alternatives: list[MedicalAlternative] | None = None + """ + A list of possible alternative transcriptions for the input audio. Each + alternative may contain one or more of ``Items``, ``Entities``, or + ``Transcript``. + """ + channel_id: str | None = None + """ + Indicates the channel identified for the ``Result``. + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_MEDICAL_RESULT, self) + + def serialize_members(self, serializer: ShapeSerializer): + if self.result_id is not None: + serializer.write_string( + _SCHEMA_MEDICAL_RESULT.members["ResultId"], self.result_id + ) + + serializer.write_double( + _SCHEMA_MEDICAL_RESULT.members["StartTime"], self.start_time + ) + serializer.write_double( + _SCHEMA_MEDICAL_RESULT.members["EndTime"], self.end_time + ) + serializer.write_boolean( + _SCHEMA_MEDICAL_RESULT.members["IsPartial"], self.is_partial + ) + if self.alternatives is not None: + _serialize_medical_alternative_list( + serializer, + _SCHEMA_MEDICAL_RESULT.members["Alternatives"], + self.alternatives, + ) + + if self.channel_id is not None: + serializer.write_string( + _SCHEMA_MEDICAL_RESULT.members["ChannelId"], self.channel_id + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["result_id"] = de.read_string( + _SCHEMA_MEDICAL_RESULT.members["ResultId"] + ) + + case 1: + kwargs["start_time"] = de.read_double( + _SCHEMA_MEDICAL_RESULT.members["StartTime"] + ) + + case 2: + kwargs["end_time"] = de.read_double( + _SCHEMA_MEDICAL_RESULT.members["EndTime"] + ) + + case 3: + kwargs["is_partial"] = de.read_boolean( + _SCHEMA_MEDICAL_RESULT.members["IsPartial"] + ) + + case 4: + kwargs["alternatives"] = _deserialize_medical_alternative_list( + de, _SCHEMA_MEDICAL_RESULT.members["Alternatives"] + ) + + case 5: + kwargs["channel_id"] = de.read_string( + _SCHEMA_MEDICAL_RESULT.members["ChannelId"] + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct(_SCHEMA_MEDICAL_RESULT, consumer=_consumer) + return kwargs + + +def _serialize_medical_result_list( + serializer: ShapeSerializer, schema: Schema, value: list[MedicalResult] +) -> None: + member_schema = schema.members["member"] + with serializer.begin_list(schema, len(value)) as ls: + for e in value: + ls.write_struct(member_schema, e) + + +def _deserialize_medical_result_list( + deserializer: ShapeDeserializer, schema: Schema +) -> list[MedicalResult]: + result: list[MedicalResult] = [] + + def _read_value(d: ShapeDeserializer): + if d.is_null(): + d.read_null() + + else: + result.append(MedicalResult.deserialize(d)) + + deserializer.read_list(schema, _read_value) + return result + + +@dataclass(kw_only=True) +class MedicalScribeAudioEvent: + """ + A wrapper for your audio chunks + + For more information, see ``Event stream encoding ``_ + . + + """ + + audio_chunk: bytes + """ + An audio blob containing the next segment of audio from your application, with a + maximum duration of 1 second. The maximum size in bytes varies based on audio + properties. + + Find recommended size in `Transcribing streaming best practices `_ + . + + Size calculation: ``Duration (s) * Sample Rate (Hz) * Number of Channels * 2 + (Bytes per Sample)`` + + For example, a 1-second chunk of 16 kHz, 2-channel, 16-bit audio would be ``1 * + 16000 * 2 * 2 = 64000 bytes``. + + For 8 kHz, 1-channel, 16-bit audio, a 1-second chunk would be ``1 * 8000 * 1 * 2 + = 16000 bytes``. + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_MEDICAL_SCRIBE_AUDIO_EVENT, self) + + def serialize_members(self, serializer: ShapeSerializer): + serializer.write_blob( + _SCHEMA_MEDICAL_SCRIBE_AUDIO_EVENT.members["AudioChunk"], self.audio_chunk + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["audio_chunk"] = de.read_blob( + _SCHEMA_MEDICAL_SCRIBE_AUDIO_EVENT.members["AudioChunk"] + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct(_SCHEMA_MEDICAL_SCRIBE_AUDIO_EVENT, consumer=_consumer) + return kwargs + + +class Pronouns(StrEnum): + HE_HIM = "HE_HIM" + SHE_HER = "SHE_HER" + THEY_THEM = "THEY_THEM" + + +@dataclass(kw_only=True) +class MedicalScribePatientContext: + """ + Contains patient-specific information. + + """ + + pronouns: str | None = field(repr=False, default=None) + """ + The patient's preferred pronouns that the user wants to provide as a context for + clinical note generation . + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_MEDICAL_SCRIBE_PATIENT_CONTEXT, self) + + def serialize_members(self, serializer: ShapeSerializer): + if self.pronouns is not None: + serializer.write_string( + _SCHEMA_MEDICAL_SCRIBE_PATIENT_CONTEXT.members["Pronouns"], + self.pronouns, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["pronouns"] = de.read_string( + _SCHEMA_MEDICAL_SCRIBE_PATIENT_CONTEXT.members["Pronouns"] + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct( + _SCHEMA_MEDICAL_SCRIBE_PATIENT_CONTEXT, consumer=_consumer + ) + return kwargs + + +@dataclass(kw_only=True) +class MedicalScribeContext: + """ + The ``MedicalScribeContext`` object that contains contextual information which + is used during clinical note generation to add relevant context to the note. + + """ + + patient_context: MedicalScribePatientContext | None = None + """ + Contains patient-specific information used to customize the clinical note + generation. + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_MEDICAL_SCRIBE_CONTEXT, self) + + def serialize_members(self, serializer: ShapeSerializer): + if self.patient_context is not None: + serializer.write_struct( + _SCHEMA_MEDICAL_SCRIBE_CONTEXT.members["PatientContext"], + self.patient_context, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["patient_context"] = MedicalScribePatientContext.deserialize( + de + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct(_SCHEMA_MEDICAL_SCRIBE_CONTEXT, consumer=_consumer) + return kwargs + + +@dataclass(kw_only=True) +class MedicalScribeConfigurationEvent: + """ + Specify details to configure the streaming session, including channel + definitions, encryption settings, post-stream analytics settings, resource + access role ARN and vocabulary settings. + + Whether you are starting a new session or resuming an existing session, your + first event must be a ``MedicalScribeConfigurationEvent``. If you are resuming a + session, then this event must have the same configurations that you provided to + start the session. + + """ + + resource_access_role_arn: str + """ + The Amazon Resource Name (ARN) of an IAM role that has permissions to access the + Amazon S3 output bucket you specified, and use your KMS key if supplied. If the + role that you specify doesn’t have the appropriate permissions, your request + fails. + + IAM role ARNs have the format + ``arn:partition:iam::account:role/role-name-with-path``. For example: + ``arn:aws:iam::111122223333:role/Admin``. + + For more information, see `Amazon Web Services HealthScribe `_ + . + """ + + post_stream_analytics_settings: MedicalScribePostStreamAnalyticsSettings + """ + Specify settings for post-stream analytics. + """ + + vocabulary_name: str | None = None + """ + Specify the name of the custom vocabulary you want to use for your streaming + session. Custom vocabulary names are case-sensitive. + """ + vocabulary_filter_name: str | None = None + """ + Specify the name of the custom vocabulary filter you want to include in your + streaming session. Custom vocabulary filter names are case-sensitive. + + If you include ``VocabularyFilterName`` in the + ``MedicalScribeConfigurationEvent``, you must also include + ``VocabularyFilterMethod``. + """ + vocabulary_filter_method: str | None = None + """ + Specify how you want your custom vocabulary filter applied to the streaming + session. + + To replace words with ``***``, specify ``mask``. + + To delete words, specify ``remove``. + + To flag words without changing them, specify ``tag``. + """ + channel_definitions: list[MedicalScribeChannelDefinition] | None = None + """ + Specify which speaker is on which audio channel. + """ + encryption_settings: MedicalScribeEncryptionSettings | None = None + """ + Specify the encryption settings for your streaming session. + """ + medical_scribe_context: MedicalScribeContext | None = None + """ + The ``MedicalScribeContext`` object that contains contextual information used to + generate customized clinical notes. + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_MEDICAL_SCRIBE_CONFIGURATION_EVENT, self) + + def serialize_members(self, serializer: ShapeSerializer): + if self.vocabulary_name is not None: + serializer.write_string( + _SCHEMA_MEDICAL_SCRIBE_CONFIGURATION_EVENT.members["VocabularyName"], + self.vocabulary_name, + ) + + if self.vocabulary_filter_name is not None: + serializer.write_string( + _SCHEMA_MEDICAL_SCRIBE_CONFIGURATION_EVENT.members[ + "VocabularyFilterName" + ], + self.vocabulary_filter_name, + ) + + if self.vocabulary_filter_method is not None: + serializer.write_string( + _SCHEMA_MEDICAL_SCRIBE_CONFIGURATION_EVENT.members[ + "VocabularyFilterMethod" + ], + self.vocabulary_filter_method, + ) + + serializer.write_string( + _SCHEMA_MEDICAL_SCRIBE_CONFIGURATION_EVENT.members["ResourceAccessRoleArn"], + self.resource_access_role_arn, + ) + if self.channel_definitions is not None: + _serialize_medical_scribe_channel_definitions( + serializer, + _SCHEMA_MEDICAL_SCRIBE_CONFIGURATION_EVENT.members[ + "ChannelDefinitions" + ], + self.channel_definitions, + ) + + if self.encryption_settings is not None: + serializer.write_struct( + _SCHEMA_MEDICAL_SCRIBE_CONFIGURATION_EVENT.members[ + "EncryptionSettings" + ], + self.encryption_settings, + ) + + serializer.write_struct( + _SCHEMA_MEDICAL_SCRIBE_CONFIGURATION_EVENT.members[ + "PostStreamAnalyticsSettings" + ], + self.post_stream_analytics_settings, + ) + if self.medical_scribe_context is not None: + serializer.write_struct( + _SCHEMA_MEDICAL_SCRIBE_CONFIGURATION_EVENT.members[ + "MedicalScribeContext" + ], + self.medical_scribe_context, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["vocabulary_name"] = de.read_string( + _SCHEMA_MEDICAL_SCRIBE_CONFIGURATION_EVENT.members[ + "VocabularyName" + ] + ) + + case 1: + kwargs["vocabulary_filter_name"] = de.read_string( + _SCHEMA_MEDICAL_SCRIBE_CONFIGURATION_EVENT.members[ + "VocabularyFilterName" + ] + ) + + case 2: + kwargs["vocabulary_filter_method"] = de.read_string( + _SCHEMA_MEDICAL_SCRIBE_CONFIGURATION_EVENT.members[ + "VocabularyFilterMethod" + ] + ) + + case 3: + kwargs["resource_access_role_arn"] = de.read_string( + _SCHEMA_MEDICAL_SCRIBE_CONFIGURATION_EVENT.members[ + "ResourceAccessRoleArn" + ] + ) + + case 4: + kwargs["channel_definitions"] = ( + _deserialize_medical_scribe_channel_definitions( + de, + _SCHEMA_MEDICAL_SCRIBE_CONFIGURATION_EVENT.members[ + "ChannelDefinitions" + ], + ) + ) + + case 5: + kwargs["encryption_settings"] = ( + MedicalScribeEncryptionSettings.deserialize(de) + ) + + case 6: + kwargs["post_stream_analytics_settings"] = ( + MedicalScribePostStreamAnalyticsSettings.deserialize(de) + ) + + case 7: + kwargs["medical_scribe_context"] = MedicalScribeContext.deserialize( + de + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct( + _SCHEMA_MEDICAL_SCRIBE_CONFIGURATION_EVENT, consumer=_consumer + ) + return kwargs + + +class MedicalScribeSessionControlEventType(StrEnum): + END_OF_SESSION = "END_OF_SESSION" + + +@dataclass(kw_only=True) +class MedicalScribeSessionControlEvent: + """ + Specify the lifecycle of your streaming session. + + """ + + type: str + """ + The type of ``MedicalScribeSessionControlEvent``. + + Possible Values: + + * ``END_OF_SESSION`` - Indicates the audio streaming is complete. After you send an END_OF_SESSION event, Amazon Web Services HealthScribe starts the post-stream analytics. The session can't be resumed after this event is sent. After Amazon Web Services HealthScribe processes the event, the real-time ``StreamStatus`` is ``COMPLETED``. You get the ``StreamStatus`` and other stream details with the `GetMedicalScribeStream `_ + API operation. For more information about different streaming statuses, see the + ``StreamStatus`` description in the `MedicalScribeStreamDetails `_ + . + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_MEDICAL_SCRIBE_SESSION_CONTROL_EVENT, self) + + def serialize_members(self, serializer: ShapeSerializer): + serializer.write_string( + _SCHEMA_MEDICAL_SCRIBE_SESSION_CONTROL_EVENT.members["Type"], self.type + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["type"] = de.read_string( + _SCHEMA_MEDICAL_SCRIBE_SESSION_CONTROL_EVENT.members["Type"] + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct( + _SCHEMA_MEDICAL_SCRIBE_SESSION_CONTROL_EVENT, consumer=_consumer + ) + return kwargs + + +@dataclass +class MedicalScribeInputStreamAudioEvent: + """ + A wrapper for your audio chunks + + For more information, see `Event stream encoding `_ + . + + """ + + value: MedicalScribeAudioEvent + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_MEDICAL_SCRIBE_INPUT_STREAM, self) + + def serialize_members(self, serializer: ShapeSerializer): + serializer.write_struct( + _SCHEMA_MEDICAL_SCRIBE_INPUT_STREAM.members["AudioEvent"], self.value + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(value=MedicalScribeAudioEvent.deserialize(deserializer)) + + +@dataclass +class MedicalScribeInputStreamSessionControlEvent: + """ + Specify the lifecycle of your streaming session, such as ending the session. + + """ + + value: MedicalScribeSessionControlEvent + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_MEDICAL_SCRIBE_INPUT_STREAM, self) + + def serialize_members(self, serializer: ShapeSerializer): + serializer.write_struct( + _SCHEMA_MEDICAL_SCRIBE_INPUT_STREAM.members["SessionControlEvent"], + self.value, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(value=MedicalScribeSessionControlEvent.deserialize(deserializer)) + + +@dataclass +class MedicalScribeInputStreamConfigurationEvent: + """ + Specify additional streaming session configurations beyond those provided in + your initial start request headers. For example, specify channel definitions, + encryption settings, and post-stream analytics settings. + + Whether you are starting a new session or resuming an existing session, your + first event must be a ``MedicalScribeConfigurationEvent``. + + """ + + value: MedicalScribeConfigurationEvent + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_MEDICAL_SCRIBE_INPUT_STREAM, self) + + def serialize_members(self, serializer: ShapeSerializer): + serializer.write_struct( + _SCHEMA_MEDICAL_SCRIBE_INPUT_STREAM.members["ConfigurationEvent"], + self.value, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(value=MedicalScribeConfigurationEvent.deserialize(deserializer)) + + +@dataclass +class MedicalScribeInputStreamUnknown: + """Represents an unknown variant. + + If you receive this value, you will need to update your library to receive the + parsed value. + + This value may not be deliberately sent. + """ + + tag: str + + def serialize(self, serializer: ShapeSerializer): + raise SerializationError("Unknown union variants may not be serialized.") + + def serialize_members(self, serializer: ShapeSerializer): + raise SerializationError("Unknown union variants may not be serialized.") + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + raise NotImplementedError() + + +MedicalScribeInputStream = Union[ + MedicalScribeInputStreamAudioEvent + | MedicalScribeInputStreamSessionControlEvent + | MedicalScribeInputStreamConfigurationEvent + | MedicalScribeInputStreamUnknown +] + +""" +An encoded stream of events. The stream is encoded as HTTP/2 data frames. + +An input stream consists of the following types of events. The first element of +the input stream must be the ``MedicalScribeConfigurationEvent`` event type. + +* ``MedicalScribeConfigurationEvent`` + +* ``MedicalScribeAudioEvent`` + +* ``MedicalScribeSessionControlEvent`` + +""" + + +class _MedicalScribeInputStreamDeserializer: + _result: MedicalScribeInputStream | None = None + + def deserialize(self, deserializer: ShapeDeserializer) -> MedicalScribeInputStream: + self._result = None + deserializer.read_struct(_SCHEMA_MEDICAL_SCRIBE_INPUT_STREAM, self._consumer) + + if self._result is None: + raise SerializationError( + "Unions must have exactly one value, but found none." + ) + + return self._result + + def _consumer(self, schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + self._set_result(MedicalScribeInputStreamAudioEvent.deserialize(de)) + + case 1: + self._set_result( + MedicalScribeInputStreamSessionControlEvent.deserialize(de) + ) + + case 2: + self._set_result( + MedicalScribeInputStreamConfigurationEvent.deserialize(de) + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + def _set_result(self, value: MedicalScribeInputStream) -> None: + if self._result is not None: + raise SerializationError( + "Unions must have exactly one value, but found more than one." + ) + self._result = value + + +class MedicalScribeTranscriptItemType(StrEnum): + PRONUNCIATION = "pronunciation" + PUNCTUATION = "punctuation" + + +@dataclass(kw_only=True) +class MedicalScribeTranscriptItem: + """ + A word, phrase, or punctuation mark in your transcription output, along with + various associated attributes, such as confidence score, type, and start and end + times. + + """ + + begin_audio_time: float = 0 + """ + The start time, in milliseconds, of the transcribed item. + """ + end_audio_time: float = 0 + """ + The end time, in milliseconds, of the transcribed item. + """ + type: str | None = None + """ + The type of item identified. Options are: ``PRONUNCIATION`` (spoken words) and + ``PUNCTUATION``. + """ + confidence: float | None = None + """ + The confidence score associated with a word or phrase in your transcript. + + Confidence scores are values between 0 and 1. A larger value indicates a higher + probability that the identified item correctly matches the item spoken in your + media. + """ + content: str | None = None + """ + The word, phrase or punctuation mark that was transcribed. + """ + vocabulary_filter_match: bool | None = None + """ + Indicates whether the specified item matches a word in the vocabulary filter + included in your configuration event. If ``true``, there is a vocabulary filter + match. + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_MEDICAL_SCRIBE_TRANSCRIPT_ITEM, self) + + def serialize_members(self, serializer: ShapeSerializer): + serializer.write_double( + _SCHEMA_MEDICAL_SCRIBE_TRANSCRIPT_ITEM.members["BeginAudioTime"], + self.begin_audio_time, + ) + serializer.write_double( + _SCHEMA_MEDICAL_SCRIBE_TRANSCRIPT_ITEM.members["EndAudioTime"], + self.end_audio_time, + ) + if self.type is not None: + serializer.write_string( + _SCHEMA_MEDICAL_SCRIBE_TRANSCRIPT_ITEM.members["Type"], self.type + ) + + if self.confidence is not None: + serializer.write_double( + _SCHEMA_MEDICAL_SCRIBE_TRANSCRIPT_ITEM.members["Confidence"], + self.confidence, + ) + + if self.content is not None: + serializer.write_string( + _SCHEMA_MEDICAL_SCRIBE_TRANSCRIPT_ITEM.members["Content"], self.content + ) + + if self.vocabulary_filter_match is not None: + serializer.write_boolean( + _SCHEMA_MEDICAL_SCRIBE_TRANSCRIPT_ITEM.members["VocabularyFilterMatch"], + self.vocabulary_filter_match, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["begin_audio_time"] = de.read_double( + _SCHEMA_MEDICAL_SCRIBE_TRANSCRIPT_ITEM.members["BeginAudioTime"] + ) + + case 1: + kwargs["end_audio_time"] = de.read_double( + _SCHEMA_MEDICAL_SCRIBE_TRANSCRIPT_ITEM.members["EndAudioTime"] + ) + + case 2: + kwargs["type"] = de.read_string( + _SCHEMA_MEDICAL_SCRIBE_TRANSCRIPT_ITEM.members["Type"] + ) + + case 3: + kwargs["confidence"] = de.read_double( + _SCHEMA_MEDICAL_SCRIBE_TRANSCRIPT_ITEM.members["Confidence"] + ) + + case 4: + kwargs["content"] = de.read_string( + _SCHEMA_MEDICAL_SCRIBE_TRANSCRIPT_ITEM.members["Content"] + ) + + case 5: + kwargs["vocabulary_filter_match"] = de.read_boolean( + _SCHEMA_MEDICAL_SCRIBE_TRANSCRIPT_ITEM.members[ + "VocabularyFilterMatch" + ] + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct( + _SCHEMA_MEDICAL_SCRIBE_TRANSCRIPT_ITEM, consumer=_consumer + ) + return kwargs + + +def _serialize_medical_scribe_transcript_item_list( + serializer: ShapeSerializer, + schema: Schema, + value: list[MedicalScribeTranscriptItem], +) -> None: + member_schema = schema.members["member"] + with serializer.begin_list(schema, len(value)) as ls: + for e in value: + ls.write_struct(member_schema, e) + + +def _deserialize_medical_scribe_transcript_item_list( + deserializer: ShapeDeserializer, schema: Schema +) -> list[MedicalScribeTranscriptItem]: + result: list[MedicalScribeTranscriptItem] = [] + + def _read_value(d: ShapeDeserializer): + if d.is_null(): + d.read_null() + + else: + result.append(MedicalScribeTranscriptItem.deserialize(d)) + + deserializer.read_list(schema, _read_value) + return result + + +@dataclass(kw_only=True) +class MedicalScribeTranscriptSegment: + """ + Contains a set of transcription results, along with additional information of + the segment. + + """ + + segment_id: str | None = None + """ + The identifier of the segment. + """ + begin_audio_time: float = 0 + """ + The start time, in milliseconds, of the segment. + """ + end_audio_time: float = 0 + """ + The end time, in milliseconds, of the segment. + """ + content: str | None = None + """ + Contains transcribed text of the segment. + """ + items: list[MedicalScribeTranscriptItem] | None = None + """ + Contains words, phrases, or punctuation marks in your segment. + """ + is_partial: bool = False + """ + Indicates if the segment is complete. + + If ``IsPartial`` is ``true``, the segment is not complete. If ``IsPartial`` is + ``false``, the segment is complete. + """ + channel_id: str | None = None + """ + Indicates which audio channel is associated with the + ``MedicalScribeTranscriptSegment``. + + If ``MedicalScribeChannelDefinition`` is not provided in the + ``MedicalScribeConfigurationEvent``, then this field will not be included. + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_MEDICAL_SCRIBE_TRANSCRIPT_SEGMENT, self) + + def serialize_members(self, serializer: ShapeSerializer): + if self.segment_id is not None: + serializer.write_string( + _SCHEMA_MEDICAL_SCRIBE_TRANSCRIPT_SEGMENT.members["SegmentId"], + self.segment_id, + ) + + serializer.write_double( + _SCHEMA_MEDICAL_SCRIBE_TRANSCRIPT_SEGMENT.members["BeginAudioTime"], + self.begin_audio_time, + ) + serializer.write_double( + _SCHEMA_MEDICAL_SCRIBE_TRANSCRIPT_SEGMENT.members["EndAudioTime"], + self.end_audio_time, + ) + if self.content is not None: + serializer.write_string( + _SCHEMA_MEDICAL_SCRIBE_TRANSCRIPT_SEGMENT.members["Content"], + self.content, + ) + + if self.items is not None: + _serialize_medical_scribe_transcript_item_list( + serializer, + _SCHEMA_MEDICAL_SCRIBE_TRANSCRIPT_SEGMENT.members["Items"], + self.items, + ) + + serializer.write_boolean( + _SCHEMA_MEDICAL_SCRIBE_TRANSCRIPT_SEGMENT.members["IsPartial"], + self.is_partial, + ) + if self.channel_id is not None: + serializer.write_string( + _SCHEMA_MEDICAL_SCRIBE_TRANSCRIPT_SEGMENT.members["ChannelId"], + self.channel_id, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["segment_id"] = de.read_string( + _SCHEMA_MEDICAL_SCRIBE_TRANSCRIPT_SEGMENT.members["SegmentId"] + ) + + case 1: + kwargs["begin_audio_time"] = de.read_double( + _SCHEMA_MEDICAL_SCRIBE_TRANSCRIPT_SEGMENT.members[ + "BeginAudioTime" + ] + ) + + case 2: + kwargs["end_audio_time"] = de.read_double( + _SCHEMA_MEDICAL_SCRIBE_TRANSCRIPT_SEGMENT.members[ + "EndAudioTime" + ] + ) + + case 3: + kwargs["content"] = de.read_string( + _SCHEMA_MEDICAL_SCRIBE_TRANSCRIPT_SEGMENT.members["Content"] + ) + + case 4: + kwargs["items"] = _deserialize_medical_scribe_transcript_item_list( + de, _SCHEMA_MEDICAL_SCRIBE_TRANSCRIPT_SEGMENT.members["Items"] + ) + + case 5: + kwargs["is_partial"] = de.read_boolean( + _SCHEMA_MEDICAL_SCRIBE_TRANSCRIPT_SEGMENT.members["IsPartial"] + ) + + case 6: + kwargs["channel_id"] = de.read_string( + _SCHEMA_MEDICAL_SCRIBE_TRANSCRIPT_SEGMENT.members["ChannelId"] + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct( + _SCHEMA_MEDICAL_SCRIBE_TRANSCRIPT_SEGMENT, consumer=_consumer + ) + return kwargs + + +@dataclass(kw_only=True) +class MedicalScribeTranscriptEvent: + """ + The event associated with ``MedicalScribeResultStream``. + + Contains ``MedicalScribeTranscriptSegment``, which contains segment related + information. + + """ + + transcript_segment: MedicalScribeTranscriptSegment | None = None + """ + The ``TranscriptSegment`` associated with a ``MedicalScribeTranscriptEvent``. + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_MEDICAL_SCRIBE_TRANSCRIPT_EVENT, self) + + def serialize_members(self, serializer: ShapeSerializer): + if self.transcript_segment is not None: + serializer.write_struct( + _SCHEMA_MEDICAL_SCRIBE_TRANSCRIPT_EVENT.members["TranscriptSegment"], + self.transcript_segment, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["transcript_segment"] = ( + MedicalScribeTranscriptSegment.deserialize(de) + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct( + _SCHEMA_MEDICAL_SCRIBE_TRANSCRIPT_EVENT, consumer=_consumer + ) + return kwargs + + +@dataclass +class MedicalScribeResultStreamTranscriptEvent: + """ + The transcript event that contains real-time transcription results. + + """ + + value: MedicalScribeTranscriptEvent + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_MEDICAL_SCRIBE_RESULT_STREAM, self) + + def serialize_members(self, serializer: ShapeSerializer): + serializer.write_struct( + _SCHEMA_MEDICAL_SCRIBE_RESULT_STREAM.members["TranscriptEvent"], self.value + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(value=MedicalScribeTranscriptEvent.deserialize(deserializer)) + + +@dataclass +class MedicalScribeResultStreamBadRequestException: + """ + One or more arguments to the ``StartStreamTranscription``, + ``StartMedicalStreamTranscription``, or + ``StartCallAnalyticsStreamTranscription`` operation was not valid. For example, + ``MediaEncoding`` or ``LanguageCode`` used unsupported values. Check the + specified parameters and try your request again. + + """ + + value: BadRequestException + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_MEDICAL_SCRIBE_RESULT_STREAM, self) + + def serialize_members(self, serializer: ShapeSerializer): + serializer.write_struct( + _SCHEMA_MEDICAL_SCRIBE_RESULT_STREAM.members["BadRequestException"], + self.value, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(value=BadRequestException.deserialize(deserializer)) + + +@dataclass +class MedicalScribeResultStreamLimitExceededException: + """ + Your client has exceeded one of the Amazon Transcribe limits. This is typically + the audio length limit. Break your audio stream into smaller chunks and try your + request again. + + """ + + value: LimitExceededException + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_MEDICAL_SCRIBE_RESULT_STREAM, self) + + def serialize_members(self, serializer: ShapeSerializer): + serializer.write_struct( + _SCHEMA_MEDICAL_SCRIBE_RESULT_STREAM.members["LimitExceededException"], + self.value, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(value=LimitExceededException.deserialize(deserializer)) + + +@dataclass +class MedicalScribeResultStreamInternalFailureException: + """ + A problem occurred while processing the audio. Amazon Transcribe terminated + processing. + + """ + + value: InternalFailureException + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_MEDICAL_SCRIBE_RESULT_STREAM, self) + + def serialize_members(self, serializer: ShapeSerializer): + serializer.write_struct( + _SCHEMA_MEDICAL_SCRIBE_RESULT_STREAM.members["InternalFailureException"], + self.value, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(value=InternalFailureException.deserialize(deserializer)) + + +@dataclass +class MedicalScribeResultStreamConflictException: + """ + A new stream started with the same session ID. The current stream has been + terminated. + + """ + + value: ConflictException + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_MEDICAL_SCRIBE_RESULT_STREAM, self) + + def serialize_members(self, serializer: ShapeSerializer): + serializer.write_struct( + _SCHEMA_MEDICAL_SCRIBE_RESULT_STREAM.members["ConflictException"], + self.value, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(value=ConflictException.deserialize(deserializer)) + + +@dataclass +class MedicalScribeResultStreamServiceUnavailableException: + """ + The service is currently unavailable. Try your request later. + + """ + + value: ServiceUnavailableException + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_MEDICAL_SCRIBE_RESULT_STREAM, self) + + def serialize_members(self, serializer: ShapeSerializer): + serializer.write_struct( + _SCHEMA_MEDICAL_SCRIBE_RESULT_STREAM.members["ServiceUnavailableException"], + self.value, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(value=ServiceUnavailableException.deserialize(deserializer)) + + +@dataclass +class MedicalScribeResultStreamUnknown: + """Represents an unknown variant. + + If you receive this value, you will need to update your library to receive the + parsed value. + + This value may not be deliberately sent. + """ + + tag: str + + def serialize(self, serializer: ShapeSerializer): + raise SerializationError("Unknown union variants may not be serialized.") + + def serialize_members(self, serializer: ShapeSerializer): + raise SerializationError("Unknown union variants may not be serialized.") + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + raise NotImplementedError() + + +MedicalScribeResultStream = Union[ + MedicalScribeResultStreamTranscriptEvent + | MedicalScribeResultStreamBadRequestException + | MedicalScribeResultStreamLimitExceededException + | MedicalScribeResultStreamInternalFailureException + | MedicalScribeResultStreamConflictException + | MedicalScribeResultStreamServiceUnavailableException + | MedicalScribeResultStreamUnknown +] + +""" +Result stream where you will receive the output events. The details are provided +in the ``MedicalScribeTranscriptEvent`` object. + +""" + + +class _MedicalScribeResultStreamDeserializer: + _result: MedicalScribeResultStream | None = None + + def deserialize(self, deserializer: ShapeDeserializer) -> MedicalScribeResultStream: + self._result = None + deserializer.read_struct(_SCHEMA_MEDICAL_SCRIBE_RESULT_STREAM, self._consumer) + + if self._result is None: + raise SerializationError( + "Unions must have exactly one value, but found none." + ) + + return self._result + + def _consumer(self, schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + self._set_result( + MedicalScribeResultStreamTranscriptEvent.deserialize(de) + ) + + case 1: + self._set_result( + MedicalScribeResultStreamBadRequestException.deserialize(de) + ) + + case 2: + self._set_result( + MedicalScribeResultStreamLimitExceededException.deserialize(de) + ) + + case 3: + self._set_result( + MedicalScribeResultStreamInternalFailureException.deserialize(de) + ) + + case 4: + self._set_result( + MedicalScribeResultStreamConflictException.deserialize(de) + ) + + case 5: + self._set_result( + MedicalScribeResultStreamServiceUnavailableException.deserialize(de) + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + def _set_result(self, value: MedicalScribeResultStream) -> None: + if self._result is not None: + raise SerializationError( + "Unions must have exactly one value, but found more than one." + ) + self._result = value + + +@dataclass(kw_only=True) +class MedicalTranscript: + """ + The ``MedicalTranscript`` associated with a ````. + + ``MedicalTranscript`` contains ``Results``, which contains a set of + transcription results from one or more audio segments, along with additional + information per your request parameters. + + """ + + results: list[MedicalResult] | None = None + """ + Contains a set of transcription results from one or more audio segments, along + with additional information per your request parameters. This can include + information relating to alternative transcriptions, channel identification, + partial result stabilization, language identification, and other + transcription-related data. + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_MEDICAL_TRANSCRIPT, self) + + def serialize_members(self, serializer: ShapeSerializer): + if self.results is not None: + _serialize_medical_result_list( + serializer, _SCHEMA_MEDICAL_TRANSCRIPT.members["Results"], self.results + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["results"] = _deserialize_medical_result_list( + de, _SCHEMA_MEDICAL_TRANSCRIPT.members["Results"] + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct(_SCHEMA_MEDICAL_TRANSCRIPT, consumer=_consumer) + return kwargs + + +@dataclass(kw_only=True) +class MedicalTranscriptEvent: + """ + The ``MedicalTranscriptEvent`` associated with a + ``MedicalTranscriptResultStream``. + + Contains a set of transcription results from one or more audio segments, along + with additional information per your request parameters. + + """ + + transcript: MedicalTranscript | None = None + """ + Contains ``Results``, which contains a set of transcription results from one or + more audio segments, along with additional information per your request + parameters. This can include information relating to alternative transcriptions, + channel identification, partial result stabilization, language identification, + and other transcription-related data. + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_MEDICAL_TRANSCRIPT_EVENT, self) + + def serialize_members(self, serializer: ShapeSerializer): + if self.transcript is not None: + serializer.write_struct( + _SCHEMA_MEDICAL_TRANSCRIPT_EVENT.members["Transcript"], self.transcript + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["transcript"] = MedicalTranscript.deserialize(de) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct(_SCHEMA_MEDICAL_TRANSCRIPT_EVENT, consumer=_consumer) + return kwargs + + +@dataclass +class MedicalTranscriptResultStreamTranscriptEvent: + """ + The ``MedicalTranscriptEvent`` associated with a + ``MedicalTranscriptResultStream``. + + Contains a set of transcription results from one or more audio segments, along + with additional information per your request parameters. This can include + information relating to alternative transcriptions, channel identification, + partial result stabilization, language identification, and other + transcription-related data. + + """ + + value: MedicalTranscriptEvent + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_MEDICAL_TRANSCRIPT_RESULT_STREAM, self) + + def serialize_members(self, serializer: ShapeSerializer): + serializer.write_struct( + _SCHEMA_MEDICAL_TRANSCRIPT_RESULT_STREAM.members["TranscriptEvent"], + self.value, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(value=MedicalTranscriptEvent.deserialize(deserializer)) + + +@dataclass +class MedicalTranscriptResultStreamBadRequestException: + """ + One or more arguments to the ``StartStreamTranscription``, + ``StartMedicalStreamTranscription``, or + ``StartCallAnalyticsStreamTranscription`` operation was not valid. For example, + ``MediaEncoding`` or ``LanguageCode`` used unsupported values. Check the + specified parameters and try your request again. + + """ + + value: BadRequestException + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_MEDICAL_TRANSCRIPT_RESULT_STREAM, self) + + def serialize_members(self, serializer: ShapeSerializer): + serializer.write_struct( + _SCHEMA_MEDICAL_TRANSCRIPT_RESULT_STREAM.members["BadRequestException"], + self.value, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(value=BadRequestException.deserialize(deserializer)) + + +@dataclass +class MedicalTranscriptResultStreamLimitExceededException: + """ + Your client has exceeded one of the Amazon Transcribe limits. This is typically + the audio length limit. Break your audio stream into smaller chunks and try your + request again. + + """ + + value: LimitExceededException + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_MEDICAL_TRANSCRIPT_RESULT_STREAM, self) + + def serialize_members(self, serializer: ShapeSerializer): + serializer.write_struct( + _SCHEMA_MEDICAL_TRANSCRIPT_RESULT_STREAM.members["LimitExceededException"], + self.value, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(value=LimitExceededException.deserialize(deserializer)) + + +@dataclass +class MedicalTranscriptResultStreamInternalFailureException: + """ + A problem occurred while processing the audio. Amazon Transcribe terminated + processing. + + """ + + value: InternalFailureException + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_MEDICAL_TRANSCRIPT_RESULT_STREAM, self) + + def serialize_members(self, serializer: ShapeSerializer): + serializer.write_struct( + _SCHEMA_MEDICAL_TRANSCRIPT_RESULT_STREAM.members[ + "InternalFailureException" + ], + self.value, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(value=InternalFailureException.deserialize(deserializer)) + + +@dataclass +class MedicalTranscriptResultStreamConflictException: + """ + A new stream started with the same session ID. The current stream has been + terminated. + + """ + + value: ConflictException + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_MEDICAL_TRANSCRIPT_RESULT_STREAM, self) + + def serialize_members(self, serializer: ShapeSerializer): + serializer.write_struct( + _SCHEMA_MEDICAL_TRANSCRIPT_RESULT_STREAM.members["ConflictException"], + self.value, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(value=ConflictException.deserialize(deserializer)) + + +@dataclass +class MedicalTranscriptResultStreamServiceUnavailableException: + """ + The service is currently unavailable. Try your request later. + + """ + + value: ServiceUnavailableException + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_MEDICAL_TRANSCRIPT_RESULT_STREAM, self) + + def serialize_members(self, serializer: ShapeSerializer): + serializer.write_struct( + _SCHEMA_MEDICAL_TRANSCRIPT_RESULT_STREAM.members[ + "ServiceUnavailableException" + ], + self.value, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(value=ServiceUnavailableException.deserialize(deserializer)) + + +@dataclass +class MedicalTranscriptResultStreamUnknown: + """Represents an unknown variant. + + If you receive this value, you will need to update your library to receive the + parsed value. + + This value may not be deliberately sent. + """ + + tag: str + + def serialize(self, serializer: ShapeSerializer): + raise SerializationError("Unknown union variants may not be serialized.") + + def serialize_members(self, serializer: ShapeSerializer): + raise SerializationError("Unknown union variants may not be serialized.") + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + raise NotImplementedError() + + +MedicalTranscriptResultStream = Union[ + MedicalTranscriptResultStreamTranscriptEvent + | MedicalTranscriptResultStreamBadRequestException + | MedicalTranscriptResultStreamLimitExceededException + | MedicalTranscriptResultStreamInternalFailureException + | MedicalTranscriptResultStreamConflictException + | MedicalTranscriptResultStreamServiceUnavailableException + | MedicalTranscriptResultStreamUnknown +] + +""" +Contains detailed information about your streaming session. + +""" + + +class _MedicalTranscriptResultStreamDeserializer: + _result: MedicalTranscriptResultStream | None = None + + def deserialize( + self, deserializer: ShapeDeserializer + ) -> MedicalTranscriptResultStream: + self._result = None + deserializer.read_struct( + _SCHEMA_MEDICAL_TRANSCRIPT_RESULT_STREAM, self._consumer + ) + + if self._result is None: + raise SerializationError( + "Unions must have exactly one value, but found none." + ) + + return self._result + + def _consumer(self, schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + self._set_result( + MedicalTranscriptResultStreamTranscriptEvent.deserialize(de) + ) + + case 1: + self._set_result( + MedicalTranscriptResultStreamBadRequestException.deserialize(de) + ) + + case 2: + self._set_result( + MedicalTranscriptResultStreamLimitExceededException.deserialize(de) + ) + + case 3: + self._set_result( + MedicalTranscriptResultStreamInternalFailureException.deserialize( + de + ) + ) + + case 4: + self._set_result( + MedicalTranscriptResultStreamConflictException.deserialize(de) + ) + + case 5: + self._set_result( + MedicalTranscriptResultStreamServiceUnavailableException.deserialize( + de + ) + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + def _set_result(self, value: MedicalTranscriptResultStream) -> None: + if self._result is not None: + raise SerializationError( + "Unions must have exactly one value, but found more than one." + ) + self._result = value + + +class PartialResultsStability(StrEnum): + HIGH = "high" + MEDIUM = "medium" + LOW = "low" + + +@dataclass(kw_only=True) +class Result: + """ + The ``Result`` associated with a ````. + + Contains a set of transcription results from one or more audio segments, along + with additional information per your request parameters. This can include + information relating to alternative transcriptions, channel identification, + partial result stabilization, language identification, and other + transcription-related data. + + """ + + result_id: str | None = None + """ + Provides a unique identifier for the ``Result``. + """ + start_time: float = 0 + """ + The start time of the ``Result`` in seconds, with millisecond precision (e.g., + 1.056). + """ + end_time: float = 0 + """ + The end time of the ``Result`` in seconds, with millisecond precision (e.g., + 1.056). + """ + is_partial: bool = False + """ + Indicates if the segment is complete. + + If ``IsPartial`` is ``true``, the segment is not complete. If ``IsPartial`` is + ``false``, the segment is complete. + """ + alternatives: list[Alternative] | None = None + """ + A list of possible alternative transcriptions for the input audio. Each + alternative may contain one or more of ``Items``, ``Entities``, or + ``Transcript``. + """ + channel_id: str | None = None + """ + Indicates which audio channel is associated with the ``Result``. + """ + language_code: str | None = None + """ + The language code that represents the language spoken in your audio stream. + """ + language_identification: list[LanguageWithScore] | None = None + """ + The language code of the dominant language identified in your stream. + + If you enabled channel identification and each channel of your audio contains a + different language, you may have more than one result. + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_RESULT, self) + + def serialize_members(self, serializer: ShapeSerializer): + if self.result_id is not None: + serializer.write_string(_SCHEMA_RESULT.members["ResultId"], self.result_id) + + serializer.write_double(_SCHEMA_RESULT.members["StartTime"], self.start_time) + serializer.write_double(_SCHEMA_RESULT.members["EndTime"], self.end_time) + serializer.write_boolean(_SCHEMA_RESULT.members["IsPartial"], self.is_partial) + if self.alternatives is not None: + _serialize_alternative_list( + serializer, _SCHEMA_RESULT.members["Alternatives"], self.alternatives + ) + + if self.channel_id is not None: + serializer.write_string( + _SCHEMA_RESULT.members["ChannelId"], self.channel_id + ) + + if self.language_code is not None: + serializer.write_string( + _SCHEMA_RESULT.members["LanguageCode"], self.language_code + ) + + if self.language_identification is not None: + _serialize_language_identification( + serializer, + _SCHEMA_RESULT.members["LanguageIdentification"], + self.language_identification, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["result_id"] = de.read_string( + _SCHEMA_RESULT.members["ResultId"] + ) + + case 1: + kwargs["start_time"] = de.read_double( + _SCHEMA_RESULT.members["StartTime"] + ) + + case 2: + kwargs["end_time"] = de.read_double( + _SCHEMA_RESULT.members["EndTime"] + ) + + case 3: + kwargs["is_partial"] = de.read_boolean( + _SCHEMA_RESULT.members["IsPartial"] + ) + + case 4: + kwargs["alternatives"] = _deserialize_alternative_list( + de, _SCHEMA_RESULT.members["Alternatives"] + ) + + case 5: + kwargs["channel_id"] = de.read_string( + _SCHEMA_RESULT.members["ChannelId"] + ) + + case 6: + kwargs["language_code"] = de.read_string( + _SCHEMA_RESULT.members["LanguageCode"] + ) + + case 7: + kwargs["language_identification"] = ( + _deserialize_language_identification( + de, _SCHEMA_RESULT.members["LanguageIdentification"] + ) + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct(_SCHEMA_RESULT, consumer=_consumer) + return kwargs + + +def _serialize_result_list( + serializer: ShapeSerializer, schema: Schema, value: list[Result] +) -> None: + member_schema = schema.members["member"] + with serializer.begin_list(schema, len(value)) as ls: + for e in value: + ls.write_struct(member_schema, e) + + +def _deserialize_result_list( + deserializer: ShapeDeserializer, schema: Schema +) -> list[Result]: + result: list[Result] = [] + + def _read_value(d: ShapeDeserializer): + if d.is_null(): + d.read_null() + + else: + result.append(Result.deserialize(d)) + + deserializer.read_list(schema, _read_value) + return result + + +class Specialty(StrEnum): + PRIMARYCARE = "PRIMARYCARE" + CARDIOLOGY = "CARDIOLOGY" + NEUROLOGY = "NEUROLOGY" + ONCOLOGY = "ONCOLOGY" + RADIOLOGY = "RADIOLOGY" + UROLOGY = "UROLOGY" + + +class VocabularyFilterMethod(StrEnum): + REMOVE = "remove" + MASK = "mask" + TAG = "tag" + + +@dataclass(kw_only=True) +class StartCallAnalyticsStreamTranscriptionInput: + language_code: str | None = None + """ + Specify the language code that represents the language spoken in your audio. + + For a list of languages supported with real-time Call Analytics, refer to the + `Supported languages `_ + table. + """ + media_sample_rate_hertz: int | None = None + """ + The sample rate of the input audio (in hertz). Low-quality audio, such as + telephone audio, is typically around 8,000 Hz. High-quality audio typically + ranges from 16,000 Hz to 48,000 Hz. Note that the sample rate you specify must + match that of your audio. + """ + media_encoding: str | None = None + """ + Specify the encoding of your input audio. Supported formats are: + + * FLAC + + * OPUS-encoded audio in an Ogg container + + * PCM (only signed 16-bit little-endian audio formats, which does not include + WAV) + + For more information, see `Media formats `_ + . + """ + vocabulary_name: str | None = None + """ + Specify the name of the custom vocabulary that you want to use when processing + your transcription. Note that vocabulary names are case sensitive. + + If the language of the specified custom vocabulary doesn't match the language + identified in your media, the custom vocabulary is not applied to your + transcription. + + For more information, see `Custom vocabularies `_ + . + """ + session_id: str | None = None + """ + Specify a name for your Call Analytics transcription session. If you don't + include this parameter in your request, Amazon Transcribe generates an ID and + returns it in the response. + """ + vocabulary_filter_name: str | None = None + """ + Specify the name of the custom vocabulary filter that you want to use when + processing your transcription. Note that vocabulary filter names are case + sensitive. + + If the language of the specified custom vocabulary filter doesn't match the + language identified in your media, the vocabulary filter is not applied to your + transcription. + + For more information, see `Using vocabulary filtering with unwanted words `_ + . + """ + vocabulary_filter_method: str | None = None + """ + Specify how you want your vocabulary filter applied to your transcript. + + To replace words with ``***``, choose ``mask``. + + To delete words, choose ``remove``. + + To flag words without changing them, choose ``tag``. + """ + language_model_name: str | None = None + """ + Specify the name of the custom language model that you want to use when + processing your transcription. Note that language model names are case + sensitive. + + The language of the specified language model must match the language code you + specify in your transcription request. If the languages don't match, the custom + language model isn't applied. There are no errors or warnings associated with a + language mismatch. + + For more information, see `Custom language models `_ + . + """ + identify_language: bool = False + """ + Enables automatic language identification for your Call Analytics transcription. + + If you include ``IdentifyLanguage``, you must include a list of language codes, + using ``LanguageOptions``, that you think may be present in your audio stream. + You must provide a minimum of two language selections. + + You can also include a preferred language using ``PreferredLanguage``. Adding a + preferred language can help Amazon Transcribe identify the language faster than + if you omit this parameter. + + Note that you must include either ``LanguageCode`` or ``IdentifyLanguage`` in + your request. If you include both parameters, your transcription job fails. + """ + language_options: str | None = None + """ + Specify two or more language codes that represent the languages you think may be + present in your media. + + Including language options can improve the accuracy of language identification. + + If you include ``LanguageOptions`` in your request, you must also include + ``IdentifyLanguage``. + + For a list of languages supported with Call Analytics streaming, refer to the + `Supported languages `_ + table. + + .. important:: + You can only include one language dialect per language per stream. For example, + you cannot include ``en-US`` and ``en-AU`` in the same request. + """ + preferred_language: str | None = None + """ + Specify a preferred language from the subset of languages codes you specified in + ``LanguageOptions``. + + You can only use this parameter if you've included ``IdentifyLanguage`` and + ``LanguageOptions`` in your request. + """ + vocabulary_names: str | None = None + """ + Specify the names of the custom vocabularies that you want to use when + processing your Call Analytics transcription. Note that vocabulary names are + case sensitive. + + If the custom vocabulary's language doesn't match the identified media language, + it won't be applied to the transcription. + + .. important:: + This parameter is only intended for use **with** the ``IdentifyLanguage`` + parameter. If you're **not** including ``IdentifyLanguage`` in your request and + want to use a custom vocabulary with your transcription, use the + ``VocabularyName`` parameter instead. + + For more information, see `Custom vocabularies `_ + . + """ + vocabulary_filter_names: str | None = None + """ + Specify the names of the custom vocabulary filters that you want to use when + processing your Call Analytics transcription. Note that vocabulary filter names + are case sensitive. + + These filters serve to customize the transcript output. + + .. important:: + This parameter is only intended for use **with** the ``IdentifyLanguage`` + parameter. If you're **not** including ``IdentifyLanguage`` in your request and + want to use a custom vocabulary filter with your transcription, use the + ``VocabularyFilterName`` parameter instead. + + For more information, see `Using vocabulary filtering with unwanted words `_ + . + """ + enable_partial_results_stabilization: bool = False + """ + Enables partial result stabilization for your transcription. Partial result + stabilization can reduce latency in your output, but may impact accuracy. For + more information, see `Partial-result stabilization `_ + . + """ + partial_results_stability: str | None = None + """ + Specify the level of stability to use when you enable partial results + stabilization (``EnablePartialResultsStabilization``). + + Low stability provides the highest accuracy. High stability transcribes faster, + but with slightly lower accuracy. + + For more information, see `Partial-result stabilization `_ + . + """ + content_identification_type: str | None = None + """ + Labels all personally identifiable information (PII) identified in your + transcript. + + Content identification is performed at the segment level; PII specified in + ``PiiEntityTypes`` is flagged upon complete transcription of an audio segment. + If you don't include ``PiiEntityTypes`` in your request, all PII is identified. + + You can’t set ``ContentIdentificationType`` and ``ContentRedactionType`` in the + same request. If you set both, your request returns a ``BadRequestException``. + + For more information, see `Redacting or identifying personally identifiable information `_ + . + """ + content_redaction_type: str | None = None + """ + Redacts all personally identifiable information (PII) identified in your + transcript. + + Content redaction is performed at the segment level; PII specified in + ``PiiEntityTypes`` is redacted upon complete transcription of an audio segment. + If you don't include ``PiiEntityTypes`` in your request, all PII is redacted. + + You can’t set ``ContentRedactionType`` and ``ContentIdentificationType`` in the + same request. If you set both, your request returns a ``BadRequestException``. + + For more information, see `Redacting or identifying personally identifiable information `_ + . + """ + pii_entity_types: str | None = None + """ + Specify which types of personally identifiable information (PII) you want to + redact in your transcript. You can include as many types as you'd like, or you + can select ``ALL``. + + Values must be comma-separated and can include: ``ADDRESS``, + ``BANK_ACCOUNT_NUMBER``, ``BANK_ROUTING``, ``CREDIT_DEBIT_CVV``, + ``CREDIT_DEBIT_EXPIRY``, ``CREDIT_DEBIT_NUMBER``, ``EMAIL``, ``NAME``, + ``PHONE``, ``PIN``, ``SSN``, or ``ALL``. + + Note that if you include ``PiiEntityTypes`` in your request, you must also + include ``ContentIdentificationType`` or ``ContentRedactionType``. + + If you include ``ContentRedactionType`` or ``ContentIdentificationType`` in your + request, but do not include ``PiiEntityTypes``, all PII is redacted or + identified. + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_INPUT, self + ) + + def serialize_members(self, serializer: ShapeSerializer): + if self.language_code is not None: + serializer.write_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_INPUT.members[ + "LanguageCode" + ], + self.language_code, + ) + + if self.media_sample_rate_hertz is not None: + serializer.write_integer( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_INPUT.members[ + "MediaSampleRateHertz" + ], + self.media_sample_rate_hertz, + ) + + if self.media_encoding is not None: + serializer.write_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_INPUT.members[ + "MediaEncoding" + ], + self.media_encoding, + ) + + if self.vocabulary_name is not None: + serializer.write_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_INPUT.members[ + "VocabularyName" + ], + self.vocabulary_name, + ) + + if self.session_id is not None: + serializer.write_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_INPUT.members[ + "SessionId" + ], + self.session_id, + ) + + if self.vocabulary_filter_name is not None: + serializer.write_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_INPUT.members[ + "VocabularyFilterName" + ], + self.vocabulary_filter_name, + ) + + if self.vocabulary_filter_method is not None: + serializer.write_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_INPUT.members[ + "VocabularyFilterMethod" + ], + self.vocabulary_filter_method, + ) + + if self.language_model_name is not None: + serializer.write_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_INPUT.members[ + "LanguageModelName" + ], + self.language_model_name, + ) + + if self.identify_language is not None: + serializer.write_boolean( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_INPUT.members[ + "IdentifyLanguage" + ], + self.identify_language, + ) + + if self.language_options is not None: + serializer.write_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_INPUT.members[ + "LanguageOptions" + ], + self.language_options, + ) + + if self.preferred_language is not None: + serializer.write_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_INPUT.members[ + "PreferredLanguage" + ], + self.preferred_language, + ) + + if self.vocabulary_names is not None: + serializer.write_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_INPUT.members[ + "VocabularyNames" + ], + self.vocabulary_names, + ) + + if self.vocabulary_filter_names is not None: + serializer.write_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_INPUT.members[ + "VocabularyFilterNames" + ], + self.vocabulary_filter_names, + ) + + if self.enable_partial_results_stabilization is not None: + serializer.write_boolean( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_INPUT.members[ + "EnablePartialResultsStabilization" + ], + self.enable_partial_results_stabilization, + ) + + if self.partial_results_stability is not None: + serializer.write_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_INPUT.members[ + "PartialResultsStability" + ], + self.partial_results_stability, + ) + + if self.content_identification_type is not None: + serializer.write_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_INPUT.members[ + "ContentIdentificationType" + ], + self.content_identification_type, + ) + + if self.content_redaction_type is not None: + serializer.write_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_INPUT.members[ + "ContentRedactionType" + ], + self.content_redaction_type, + ) + + if self.pii_entity_types is not None: + serializer.write_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_INPUT.members[ + "PiiEntityTypes" + ], + self.pii_entity_types, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["language_code"] = de.read_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_INPUT.members[ + "LanguageCode" + ] + ) + + case 1: + kwargs["media_sample_rate_hertz"] = de.read_integer( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_INPUT.members[ + "MediaSampleRateHertz" + ] + ) + + case 2: + kwargs["media_encoding"] = de.read_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_INPUT.members[ + "MediaEncoding" + ] + ) + + case 3: + kwargs["vocabulary_name"] = de.read_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_INPUT.members[ + "VocabularyName" + ] + ) + + case 4: + kwargs["session_id"] = de.read_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_INPUT.members[ + "SessionId" + ] + ) + + case 6: + kwargs["vocabulary_filter_name"] = de.read_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_INPUT.members[ + "VocabularyFilterName" + ] + ) + + case 7: + kwargs["vocabulary_filter_method"] = de.read_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_INPUT.members[ + "VocabularyFilterMethod" + ] + ) + + case 8: + kwargs["language_model_name"] = de.read_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_INPUT.members[ + "LanguageModelName" + ] + ) + + case 9: + kwargs["identify_language"] = de.read_boolean( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_INPUT.members[ + "IdentifyLanguage" + ] + ) + + case 10: + kwargs["language_options"] = de.read_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_INPUT.members[ + "LanguageOptions" + ] + ) + + case 11: + kwargs["preferred_language"] = de.read_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_INPUT.members[ + "PreferredLanguage" + ] + ) + + case 12: + kwargs["vocabulary_names"] = de.read_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_INPUT.members[ + "VocabularyNames" + ] + ) + + case 13: + kwargs["vocabulary_filter_names"] = de.read_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_INPUT.members[ + "VocabularyFilterNames" + ] + ) + + case 14: + kwargs["enable_partial_results_stabilization"] = de.read_boolean( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_INPUT.members[ + "EnablePartialResultsStabilization" + ] + ) + + case 15: + kwargs["partial_results_stability"] = de.read_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_INPUT.members[ + "PartialResultsStability" + ] + ) + + case 16: + kwargs["content_identification_type"] = de.read_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_INPUT.members[ + "ContentIdentificationType" + ] + ) + + case 17: + kwargs["content_redaction_type"] = de.read_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_INPUT.members[ + "ContentRedactionType" + ] + ) + + case 18: + kwargs["pii_entity_types"] = de.read_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_INPUT.members[ + "PiiEntityTypes" + ] + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_INPUT, consumer=_consumer + ) + return kwargs + + +@dataclass(kw_only=True) +class StartCallAnalyticsStreamTranscriptionOutput: + request_id: str | None = None + """ + Provides the identifier for your real-time Call Analytics request. + """ + language_code: str | None = None + """ + Provides the language code that you specified in your Call Analytics request. + """ + media_sample_rate_hertz: int | None = None + """ + Provides the sample rate that you specified in your Call Analytics request. + """ + media_encoding: str | None = None + """ + Provides the media encoding you specified in your Call Analytics request. + """ + vocabulary_name: str | None = None + """ + Provides the name of the custom vocabulary that you specified in your Call + Analytics request. + """ + session_id: str | None = None + """ + Provides the identifier for your Call Analytics transcription session. + """ + vocabulary_filter_name: str | None = None + """ + Provides the name of the custom vocabulary filter that you specified in your + Call Analytics request. + """ + vocabulary_filter_method: str | None = None + """ + Provides the vocabulary filtering method used in your Call Analytics + transcription. + """ + language_model_name: str | None = None + """ + Provides the name of the custom language model that you specified in your Call + Analytics request. + """ + identify_language: bool = False + """ + Shows whether automatic language identification was enabled for your Call + Analytics transcription. + """ + language_options: str | None = None + """ + Provides the language codes that you specified in your Call Analytics request. + """ + preferred_language: str | None = None + """ + Provides the preferred language that you specified in your Call Analytics + request. + """ + vocabulary_names: str | None = None + """ + Provides the names of the custom vocabularies that you specified in your Call + Analytics request. + """ + vocabulary_filter_names: str | None = None + """ + Provides the names of the custom vocabulary filters that you specified in your + Call Analytics request. + """ + enable_partial_results_stabilization: bool = False + """ + Shows whether partial results stabilization was enabled for your Call Analytics + transcription. + """ + partial_results_stability: str | None = None + """ + Provides the stabilization level used for your transcription. + """ + content_identification_type: str | None = None + """ + Shows whether content identification was enabled for your Call Analytics + transcription. + """ + content_redaction_type: str | None = None + """ + Shows whether content redaction was enabled for your Call Analytics + transcription. + """ + pii_entity_types: str | None = None + """ + Lists the PII entity types you specified in your Call Analytics request. + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_OUTPUT, self + ) + + def serialize_members(self, serializer: ShapeSerializer): + if self.request_id is not None: + serializer.write_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_OUTPUT.members[ + "RequestId" + ], + self.request_id, + ) + + if self.language_code is not None: + serializer.write_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_OUTPUT.members[ + "LanguageCode" + ], + self.language_code, + ) + + if self.media_sample_rate_hertz is not None: + serializer.write_integer( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_OUTPUT.members[ + "MediaSampleRateHertz" + ], + self.media_sample_rate_hertz, + ) + + if self.media_encoding is not None: + serializer.write_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_OUTPUT.members[ + "MediaEncoding" + ], + self.media_encoding, + ) + + if self.vocabulary_name is not None: + serializer.write_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_OUTPUT.members[ + "VocabularyName" + ], + self.vocabulary_name, + ) + + if self.session_id is not None: + serializer.write_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_OUTPUT.members[ + "SessionId" + ], + self.session_id, + ) + + if self.vocabulary_filter_name is not None: + serializer.write_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_OUTPUT.members[ + "VocabularyFilterName" + ], + self.vocabulary_filter_name, + ) + + if self.vocabulary_filter_method is not None: + serializer.write_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_OUTPUT.members[ + "VocabularyFilterMethod" + ], + self.vocabulary_filter_method, + ) + + if self.language_model_name is not None: + serializer.write_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_OUTPUT.members[ + "LanguageModelName" + ], + self.language_model_name, + ) + + serializer.write_boolean( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_OUTPUT.members[ + "IdentifyLanguage" + ], + self.identify_language, + ) + if self.language_options is not None: + serializer.write_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_OUTPUT.members[ + "LanguageOptions" + ], + self.language_options, + ) + + if self.preferred_language is not None: + serializer.write_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_OUTPUT.members[ + "PreferredLanguage" + ], + self.preferred_language, + ) + + if self.vocabulary_names is not None: + serializer.write_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_OUTPUT.members[ + "VocabularyNames" + ], + self.vocabulary_names, + ) + + if self.vocabulary_filter_names is not None: + serializer.write_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_OUTPUT.members[ + "VocabularyFilterNames" + ], + self.vocabulary_filter_names, + ) + + serializer.write_boolean( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_OUTPUT.members[ + "EnablePartialResultsStabilization" + ], + self.enable_partial_results_stabilization, + ) + if self.partial_results_stability is not None: + serializer.write_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_OUTPUT.members[ + "PartialResultsStability" + ], + self.partial_results_stability, + ) + + if self.content_identification_type is not None: + serializer.write_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_OUTPUT.members[ + "ContentIdentificationType" + ], + self.content_identification_type, + ) + + if self.content_redaction_type is not None: + serializer.write_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_OUTPUT.members[ + "ContentRedactionType" + ], + self.content_redaction_type, + ) + + if self.pii_entity_types is not None: + serializer.write_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_OUTPUT.members[ + "PiiEntityTypes" + ], + self.pii_entity_types, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["request_id"] = de.read_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_OUTPUT.members[ + "RequestId" + ] + ) + + case 1: + kwargs["language_code"] = de.read_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_OUTPUT.members[ + "LanguageCode" + ] + ) + + case 2: + kwargs["media_sample_rate_hertz"] = de.read_integer( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_OUTPUT.members[ + "MediaSampleRateHertz" + ] + ) + + case 3: + kwargs["media_encoding"] = de.read_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_OUTPUT.members[ + "MediaEncoding" + ] + ) + + case 4: + kwargs["vocabulary_name"] = de.read_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_OUTPUT.members[ + "VocabularyName" + ] + ) + + case 5: + kwargs["session_id"] = de.read_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_OUTPUT.members[ + "SessionId" + ] + ) + + case 7: + kwargs["vocabulary_filter_name"] = de.read_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_OUTPUT.members[ + "VocabularyFilterName" + ] + ) + + case 8: + kwargs["vocabulary_filter_method"] = de.read_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_OUTPUT.members[ + "VocabularyFilterMethod" + ] + ) + + case 9: + kwargs["language_model_name"] = de.read_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_OUTPUT.members[ + "LanguageModelName" + ] + ) + + case 10: + kwargs["identify_language"] = de.read_boolean( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_OUTPUT.members[ + "IdentifyLanguage" + ] + ) + + case 11: + kwargs["language_options"] = de.read_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_OUTPUT.members[ + "LanguageOptions" + ] + ) + + case 12: + kwargs["preferred_language"] = de.read_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_OUTPUT.members[ + "PreferredLanguage" + ] + ) + + case 13: + kwargs["vocabulary_names"] = de.read_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_OUTPUT.members[ + "VocabularyNames" + ] + ) + + case 14: + kwargs["vocabulary_filter_names"] = de.read_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_OUTPUT.members[ + "VocabularyFilterNames" + ] + ) + + case 15: + kwargs["enable_partial_results_stabilization"] = de.read_boolean( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_OUTPUT.members[ + "EnablePartialResultsStabilization" + ] + ) + + case 16: + kwargs["partial_results_stability"] = de.read_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_OUTPUT.members[ + "PartialResultsStability" + ] + ) + + case 17: + kwargs["content_identification_type"] = de.read_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_OUTPUT.members[ + "ContentIdentificationType" + ] + ) + + case 18: + kwargs["content_redaction_type"] = de.read_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_OUTPUT.members[ + "ContentRedactionType" + ] + ) + + case 19: + kwargs["pii_entity_types"] = de.read_string( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_OUTPUT.members[ + "PiiEntityTypes" + ] + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct( + _SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_OUTPUT, consumer=_consumer + ) + return kwargs + + +START_CALL_ANALYTICS_STREAM_TRANSCRIPTION = APIOperation( + input=StartCallAnalyticsStreamTranscriptionInput, + output=StartCallAnalyticsStreamTranscriptionOutput, + schema=_SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION, + input_schema=_SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_INPUT, + output_schema=_SCHEMA_START_CALL_ANALYTICS_STREAM_TRANSCRIPTION_OUTPUT, + error_registry=TypeRegistry( + { + ShapeID( + "com.amazonaws.transcribestreaming#BadRequestException" + ): BadRequestException, + ShapeID( + "com.amazonaws.transcribestreaming#ConflictException" + ): ConflictException, + ShapeID( + "com.amazonaws.transcribestreaming#InternalFailureException" + ): InternalFailureException, + ShapeID( + "com.amazonaws.transcribestreaming#LimitExceededException" + ): LimitExceededException, + ShapeID( + "com.amazonaws.transcribestreaming#ServiceUnavailableException" + ): ServiceUnavailableException, + } + ), + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +) + + +@dataclass(kw_only=True) +class StartMedicalScribeStreamInput: + session_id: str | None = None + """ + Specify an identifier for your streaming session (in UUID format). If you don't + include a SessionId in your request, Amazon Web Services HealthScribe generates + an ID and returns it in the response. + """ + language_code: str | None = None + """ + Specify the language code for your HealthScribe streaming session. + """ + media_sample_rate_hertz: int | None = None + """ + Specify the sample rate of the input audio (in hertz). Amazon Web Services + HealthScribe supports a range from 16,000 Hz to 48,000 Hz. The sample rate you + specify must match that of your audio. + """ + media_encoding: str | None = None + """ + Specify the encoding used for the input audio. + + Supported formats are: + + * FLAC + + * OPUS-encoded audio in an Ogg container + + * PCM (only signed 16-bit little-endian audio formats, which does not include + WAV) + + For more information, see `Media formats `_ + . + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_START_MEDICAL_SCRIBE_STREAM_INPUT, self) + + def serialize_members(self, serializer: ShapeSerializer): + if self.session_id is not None: + serializer.write_string( + _SCHEMA_START_MEDICAL_SCRIBE_STREAM_INPUT.members["SessionId"], + self.session_id, + ) + + if self.language_code is not None: + serializer.write_string( + _SCHEMA_START_MEDICAL_SCRIBE_STREAM_INPUT.members["LanguageCode"], + self.language_code, + ) + + if self.media_sample_rate_hertz is not None: + serializer.write_integer( + _SCHEMA_START_MEDICAL_SCRIBE_STREAM_INPUT.members[ + "MediaSampleRateHertz" + ], + self.media_sample_rate_hertz, + ) + + if self.media_encoding is not None: + serializer.write_string( + _SCHEMA_START_MEDICAL_SCRIBE_STREAM_INPUT.members["MediaEncoding"], + self.media_encoding, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["session_id"] = de.read_string( + _SCHEMA_START_MEDICAL_SCRIBE_STREAM_INPUT.members["SessionId"] + ) + + case 1: + kwargs["language_code"] = de.read_string( + _SCHEMA_START_MEDICAL_SCRIBE_STREAM_INPUT.members[ + "LanguageCode" + ] + ) + + case 2: + kwargs["media_sample_rate_hertz"] = de.read_integer( + _SCHEMA_START_MEDICAL_SCRIBE_STREAM_INPUT.members[ + "MediaSampleRateHertz" + ] + ) + + case 3: + kwargs["media_encoding"] = de.read_string( + _SCHEMA_START_MEDICAL_SCRIBE_STREAM_INPUT.members[ + "MediaEncoding" + ] + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct( + _SCHEMA_START_MEDICAL_SCRIBE_STREAM_INPUT, consumer=_consumer + ) + return kwargs + + +@dataclass(kw_only=True) +class StartMedicalScribeStreamOutput: + session_id: str | None = None + """ + The identifier (in UUID format) for your streaming session. + + If you already started streaming, this is same ID as the one you specified in + your initial ``StartMedicalScribeStreamRequest``. + """ + request_id: str | None = None + """ + The unique identifier for your streaming request. + """ + language_code: str | None = None + """ + The Language Code that you specified in your request. Same as provided in the + ``StartMedicalScribeStreamRequest``. + """ + media_sample_rate_hertz: int | None = None + """ + The sample rate (in hertz) that you specified in your request. Same as provided + in the ``StartMedicalScribeStreamRequest`` + """ + media_encoding: str | None = None + """ + The Media Encoding you specified in your request. Same as provided in the + ``StartMedicalScribeStreamRequest`` + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_START_MEDICAL_SCRIBE_STREAM_OUTPUT, self) + + def serialize_members(self, serializer: ShapeSerializer): + if self.session_id is not None: + serializer.write_string( + _SCHEMA_START_MEDICAL_SCRIBE_STREAM_OUTPUT.members["SessionId"], + self.session_id, + ) + + if self.request_id is not None: + serializer.write_string( + _SCHEMA_START_MEDICAL_SCRIBE_STREAM_OUTPUT.members["RequestId"], + self.request_id, + ) + + if self.language_code is not None: + serializer.write_string( + _SCHEMA_START_MEDICAL_SCRIBE_STREAM_OUTPUT.members["LanguageCode"], + self.language_code, + ) + + if self.media_sample_rate_hertz is not None: + serializer.write_integer( + _SCHEMA_START_MEDICAL_SCRIBE_STREAM_OUTPUT.members[ + "MediaSampleRateHertz" + ], + self.media_sample_rate_hertz, + ) + + if self.media_encoding is not None: + serializer.write_string( + _SCHEMA_START_MEDICAL_SCRIBE_STREAM_OUTPUT.members["MediaEncoding"], + self.media_encoding, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["session_id"] = de.read_string( + _SCHEMA_START_MEDICAL_SCRIBE_STREAM_OUTPUT.members["SessionId"] + ) + + case 1: + kwargs["request_id"] = de.read_string( + _SCHEMA_START_MEDICAL_SCRIBE_STREAM_OUTPUT.members["RequestId"] + ) + + case 2: + kwargs["language_code"] = de.read_string( + _SCHEMA_START_MEDICAL_SCRIBE_STREAM_OUTPUT.members[ + "LanguageCode" + ] + ) + + case 3: + kwargs["media_sample_rate_hertz"] = de.read_integer( + _SCHEMA_START_MEDICAL_SCRIBE_STREAM_OUTPUT.members[ + "MediaSampleRateHertz" + ] + ) + + case 4: + kwargs["media_encoding"] = de.read_string( + _SCHEMA_START_MEDICAL_SCRIBE_STREAM_OUTPUT.members[ + "MediaEncoding" + ] + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct( + _SCHEMA_START_MEDICAL_SCRIBE_STREAM_OUTPUT, consumer=_consumer + ) + return kwargs + + +START_MEDICAL_SCRIBE_STREAM = APIOperation( + input=StartMedicalScribeStreamInput, + output=StartMedicalScribeStreamOutput, + schema=_SCHEMA_START_MEDICAL_SCRIBE_STREAM, + input_schema=_SCHEMA_START_MEDICAL_SCRIBE_STREAM_INPUT, + output_schema=_SCHEMA_START_MEDICAL_SCRIBE_STREAM_OUTPUT, + error_registry=TypeRegistry( + { + ShapeID( + "com.amazonaws.transcribestreaming#BadRequestException" + ): BadRequestException, + ShapeID( + "com.amazonaws.transcribestreaming#ConflictException" + ): ConflictException, + ShapeID( + "com.amazonaws.transcribestreaming#InternalFailureException" + ): InternalFailureException, + ShapeID( + "com.amazonaws.transcribestreaming#LimitExceededException" + ): LimitExceededException, + ShapeID( + "com.amazonaws.transcribestreaming#ServiceUnavailableException" + ): ServiceUnavailableException, + } + ), + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +) + + +class Type(StrEnum): + CONVERSATION = "CONVERSATION" + DICTATION = "DICTATION" + + +@dataclass(kw_only=True) +class StartMedicalStreamTranscriptionInput: + language_code: str | None = None + """ + Specify the language code that represents the language spoken in your audio. + + .. important:: + Amazon Transcribe Medical only supports US English (``en-US``). + """ + media_sample_rate_hertz: int | None = None + """ + The sample rate of the input audio (in hertz). Amazon Transcribe Medical + supports a range from 16,000 Hz to 48,000 Hz. Note that the sample rate you + specify must match that of your audio. + """ + media_encoding: str | None = None + """ + Specify the encoding used for the input audio. Supported formats are: + + * FLAC + + * OPUS-encoded audio in an Ogg container + + * PCM (only signed 16-bit little-endian audio formats, which does not include + WAV) + + For more information, see `Media formats `_ + . + """ + vocabulary_name: str | None = None + """ + Specify the name of the custom vocabulary that you want to use when processing + your transcription. Note that vocabulary names are case sensitive. + """ + specialty: str | None = None + """ + Specify the medical specialty contained in your audio. + """ + type: str | None = None + """ + Specify the type of input audio. For example, choose ``DICTATION`` for a + provider dictating patient notes and ``CONVERSATION`` for a dialogue between a + patient and a medical professional. + """ + show_speaker_label: bool = False + """ + Enables speaker partitioning (diarization) in your transcription output. Speaker + partitioning labels the speech from individual speakers in your media file. + + For more information, see `Partitioning speakers (diarization) `_ + . + """ + session_id: str | None = None + """ + Specify a name for your transcription session. If you don't include this + parameter in your request, Amazon Transcribe Medical generates an ID and returns + it in the response. + """ + enable_channel_identification: bool = False + """ + Enables channel identification in multi-channel audio. + + Channel identification transcribes the audio on each channel independently, then + appends the output for each channel into one transcript. + + If you have multi-channel audio and do not enable channel identification, your + audio is transcribed in a continuous manner and your transcript is not separated + by channel. + + If you include ``EnableChannelIdentification`` in your request, you must also + include ``NumberOfChannels``. + + For more information, see `Transcribing multi-channel audio `_ + . + """ + number_of_channels: int | None = None + """ + Specify the number of channels in your audio stream. This value must be ``2``, + as only two channels are supported. If your audio doesn't contain multiple + channels, do not include this parameter in your request. + + If you include ``NumberOfChannels`` in your request, you must also include + ``EnableChannelIdentification``. + """ + content_identification_type: str | None = None + """ + Labels all personal health information (PHI) identified in your transcript. + + Content identification is performed at the segment level; PHI is flagged upon + complete transcription of an audio segment. + + For more information, see `Identifying personal health information (PHI) in a transcription `_ + . + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_INPUT, self) + + def serialize_members(self, serializer: ShapeSerializer): + if self.language_code is not None: + serializer.write_string( + _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_INPUT.members[ + "LanguageCode" + ], + self.language_code, + ) + + if self.media_sample_rate_hertz is not None: + serializer.write_integer( + _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_INPUT.members[ + "MediaSampleRateHertz" + ], + self.media_sample_rate_hertz, + ) + + if self.media_encoding is not None: + serializer.write_string( + _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_INPUT.members[ + "MediaEncoding" + ], + self.media_encoding, + ) + + if self.vocabulary_name is not None: + serializer.write_string( + _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_INPUT.members[ + "VocabularyName" + ], + self.vocabulary_name, + ) + + if self.specialty is not None: + serializer.write_string( + _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_INPUT.members["Specialty"], + self.specialty, + ) + + if self.type is not None: + serializer.write_string( + _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_INPUT.members["Type"], + self.type, + ) + + if self.show_speaker_label is not None: + serializer.write_boolean( + _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_INPUT.members[ + "ShowSpeakerLabel" + ], + self.show_speaker_label, + ) + + if self.session_id is not None: + serializer.write_string( + _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_INPUT.members["SessionId"], + self.session_id, + ) + + if self.enable_channel_identification is not None: + serializer.write_boolean( + _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_INPUT.members[ + "EnableChannelIdentification" + ], + self.enable_channel_identification, + ) + + if self.number_of_channels is not None: + serializer.write_integer( + _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_INPUT.members[ + "NumberOfChannels" + ], + self.number_of_channels, + ) + + if self.content_identification_type is not None: + serializer.write_string( + _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_INPUT.members[ + "ContentIdentificationType" + ], + self.content_identification_type, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["language_code"] = de.read_string( + _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_INPUT.members[ + "LanguageCode" + ] + ) + + case 1: + kwargs["media_sample_rate_hertz"] = de.read_integer( + _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_INPUT.members[ + "MediaSampleRateHertz" + ] + ) + + case 2: + kwargs["media_encoding"] = de.read_string( + _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_INPUT.members[ + "MediaEncoding" + ] + ) + + case 3: + kwargs["vocabulary_name"] = de.read_string( + _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_INPUT.members[ + "VocabularyName" + ] + ) + + case 4: + kwargs["specialty"] = de.read_string( + _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_INPUT.members[ + "Specialty" + ] + ) + + case 5: + kwargs["type"] = de.read_string( + _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_INPUT.members["Type"] + ) + + case 6: + kwargs["show_speaker_label"] = de.read_boolean( + _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_INPUT.members[ + "ShowSpeakerLabel" + ] + ) + + case 7: + kwargs["session_id"] = de.read_string( + _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_INPUT.members[ + "SessionId" + ] + ) + + case 9: + kwargs["enable_channel_identification"] = de.read_boolean( + _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_INPUT.members[ + "EnableChannelIdentification" + ] + ) + + case 10: + kwargs["number_of_channels"] = de.read_integer( + _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_INPUT.members[ + "NumberOfChannels" + ] + ) + + case 11: + kwargs["content_identification_type"] = de.read_string( + _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_INPUT.members[ + "ContentIdentificationType" + ] + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct( + _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_INPUT, consumer=_consumer + ) + return kwargs + + +@dataclass(kw_only=True) +class StartMedicalStreamTranscriptionOutput: + request_id: str | None = None + """ + Provides the identifier for your streaming request. + """ + language_code: str | None = None + """ + Provides the language code that you specified in your request. This must be + ``en-US``. + """ + media_sample_rate_hertz: int | None = None + """ + Provides the sample rate that you specified in your request. + """ + media_encoding: str | None = None + """ + Provides the media encoding you specified in your request. + """ + vocabulary_name: str | None = None + """ + Provides the name of the custom vocabulary that you specified in your request. + """ + specialty: str | None = None + """ + Provides the medical specialty that you specified in your request. + """ + type: str | None = None + """ + Provides the type of audio you specified in your request. + """ + show_speaker_label: bool = False + """ + Shows whether speaker partitioning was enabled for your transcription. + """ + session_id: str | None = None + """ + Provides the identifier for your transcription session. + """ + enable_channel_identification: bool = False + """ + Shows whether channel identification was enabled for your transcription. + """ + number_of_channels: int | None = None + """ + Provides the number of channels that you specified in your request. + """ + content_identification_type: str | None = None + """ + Shows whether content identification was enabled for your transcription. + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_OUTPUT, self) + + def serialize_members(self, serializer: ShapeSerializer): + if self.request_id is not None: + serializer.write_string( + _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_OUTPUT.members["RequestId"], + self.request_id, + ) + + if self.language_code is not None: + serializer.write_string( + _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_OUTPUT.members[ + "LanguageCode" + ], + self.language_code, + ) + + if self.media_sample_rate_hertz is not None: + serializer.write_integer( + _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_OUTPUT.members[ + "MediaSampleRateHertz" + ], + self.media_sample_rate_hertz, + ) + + if self.media_encoding is not None: + serializer.write_string( + _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_OUTPUT.members[ + "MediaEncoding" + ], + self.media_encoding, + ) + + if self.vocabulary_name is not None: + serializer.write_string( + _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_OUTPUT.members[ + "VocabularyName" + ], + self.vocabulary_name, + ) + + if self.specialty is not None: + serializer.write_string( + _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_OUTPUT.members["Specialty"], + self.specialty, + ) + + if self.type is not None: + serializer.write_string( + _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_OUTPUT.members["Type"], + self.type, + ) + + serializer.write_boolean( + _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_OUTPUT.members[ + "ShowSpeakerLabel" + ], + self.show_speaker_label, + ) + if self.session_id is not None: + serializer.write_string( + _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_OUTPUT.members["SessionId"], + self.session_id, + ) + + serializer.write_boolean( + _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_OUTPUT.members[ + "EnableChannelIdentification" + ], + self.enable_channel_identification, + ) + if self.number_of_channels is not None: + serializer.write_integer( + _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_OUTPUT.members[ + "NumberOfChannels" + ], + self.number_of_channels, + ) + + if self.content_identification_type is not None: + serializer.write_string( + _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_OUTPUT.members[ + "ContentIdentificationType" + ], + self.content_identification_type, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["request_id"] = de.read_string( + _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_OUTPUT.members[ + "RequestId" + ] + ) + + case 1: + kwargs["language_code"] = de.read_string( + _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_OUTPUT.members[ + "LanguageCode" + ] + ) + + case 2: + kwargs["media_sample_rate_hertz"] = de.read_integer( + _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_OUTPUT.members[ + "MediaSampleRateHertz" + ] + ) + + case 3: + kwargs["media_encoding"] = de.read_string( + _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_OUTPUT.members[ + "MediaEncoding" + ] + ) + + case 4: + kwargs["vocabulary_name"] = de.read_string( + _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_OUTPUT.members[ + "VocabularyName" + ] + ) + + case 5: + kwargs["specialty"] = de.read_string( + _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_OUTPUT.members[ + "Specialty" + ] + ) + + case 6: + kwargs["type"] = de.read_string( + _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_OUTPUT.members[ + "Type" + ] + ) + + case 7: + kwargs["show_speaker_label"] = de.read_boolean( + _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_OUTPUT.members[ + "ShowSpeakerLabel" + ] + ) + + case 8: + kwargs["session_id"] = de.read_string( + _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_OUTPUT.members[ + "SessionId" + ] + ) + + case 10: + kwargs["enable_channel_identification"] = de.read_boolean( + _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_OUTPUT.members[ + "EnableChannelIdentification" + ] + ) + + case 11: + kwargs["number_of_channels"] = de.read_integer( + _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_OUTPUT.members[ + "NumberOfChannels" + ] + ) + + case 12: + kwargs["content_identification_type"] = de.read_string( + _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_OUTPUT.members[ + "ContentIdentificationType" + ] + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct( + _SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_OUTPUT, consumer=_consumer + ) + return kwargs + + +START_MEDICAL_STREAM_TRANSCRIPTION = APIOperation( + input=StartMedicalStreamTranscriptionInput, + output=StartMedicalStreamTranscriptionOutput, + schema=_SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION, + input_schema=_SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_INPUT, + output_schema=_SCHEMA_START_MEDICAL_STREAM_TRANSCRIPTION_OUTPUT, + error_registry=TypeRegistry( + { + ShapeID( + "com.amazonaws.transcribestreaming#BadRequestException" + ): BadRequestException, + ShapeID( + "com.amazonaws.transcribestreaming#ConflictException" + ): ConflictException, + ShapeID( + "com.amazonaws.transcribestreaming#InternalFailureException" + ): InternalFailureException, + ShapeID( + "com.amazonaws.transcribestreaming#LimitExceededException" + ): LimitExceededException, + ShapeID( + "com.amazonaws.transcribestreaming#ServiceUnavailableException" + ): ServiceUnavailableException, + } + ), + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +) + + +@dataclass(kw_only=True) +class StartStreamTranscriptionInput: + language_code: str | None = None + """ + Specify the language code that represents the language spoken in your audio. + + If you're unsure of the language spoken in your audio, consider using + ``IdentifyLanguage`` to enable automatic language identification. + + For a list of languages supported with Amazon Transcribe streaming, refer to the + `Supported languages `_ + table. + """ + media_sample_rate_hertz: int | None = None + """ + The sample rate of the input audio (in hertz). Low-quality audio, such as + telephone audio, is typically around 8,000 Hz. High-quality audio typically + ranges from 16,000 Hz to 48,000 Hz. Note that the sample rate you specify must + match that of your audio. + """ + media_encoding: str | None = None + """ + Specify the encoding of your input audio. Supported formats are: + + * FLAC + + * OPUS-encoded audio in an Ogg container + + * PCM (only signed 16-bit little-endian audio formats, which does not include + WAV) + + For more information, see `Media formats `_ + . + """ + vocabulary_name: str | None = None + """ + Specify the name of the custom vocabulary that you want to use when processing + your transcription. Note that vocabulary names are case sensitive. + + If the language of the specified custom vocabulary doesn't match the language + identified in your media, the custom vocabulary is not applied to your + transcription. + + .. important:: + This parameter is **not** intended for use with the ``IdentifyLanguage`` + parameter. If you're including ``IdentifyLanguage`` in your request and want to + use one or more custom vocabularies with your transcription, use the + ``VocabularyNames`` parameter instead. + + For more information, see `Custom vocabularies `_ + . + """ + session_id: str | None = None + """ + Specify a name for your transcription session. If you don't include this + parameter in your request, Amazon Transcribe generates an ID and returns it in + the response. + """ + vocabulary_filter_name: str | None = None + """ + Specify the name of the custom vocabulary filter that you want to use when + processing your transcription. Note that vocabulary filter names are case + sensitive. + + If the language of the specified custom vocabulary filter doesn't match the + language identified in your media, the vocabulary filter is not applied to your + transcription. + + .. important:: + This parameter is **not** intended for use with the ``IdentifyLanguage`` + parameter. If you're including ``IdentifyLanguage`` in your request and want to + use one or more vocabulary filters with your transcription, use the + ``VocabularyFilterNames`` parameter instead. + + For more information, see `Using vocabulary filtering with unwanted words `_ + . + """ + vocabulary_filter_method: str | None = None + """ + Specify how you want your vocabulary filter applied to your transcript. + + To replace words with ``***``, choose ``mask``. + + To delete words, choose ``remove``. + + To flag words without changing them, choose ``tag``. + """ + show_speaker_label: bool = False + """ + Enables speaker partitioning (diarization) in your transcription output. Speaker + partitioning labels the speech from individual speakers in your media file. + + For more information, see `Partitioning speakers (diarization) `_ + . + """ + enable_channel_identification: bool = False + """ + Enables channel identification in multi-channel audio. + + Channel identification transcribes the audio on each channel independently, then + appends the output for each channel into one transcript. + + If you have multi-channel audio and do not enable channel identification, your + audio is transcribed in a continuous manner and your transcript is not separated + by channel. + + If you include ``EnableChannelIdentification`` in your request, you must also + include ``NumberOfChannels``. + + For more information, see `Transcribing multi-channel audio `_ + . + """ + number_of_channels: int | None = None + """ + Specify the number of channels in your audio stream. This value must be ``2``, + as only two channels are supported. If your audio doesn't contain multiple + channels, do not include this parameter in your request. + + If you include ``NumberOfChannels`` in your request, you must also include + ``EnableChannelIdentification``. + """ + enable_partial_results_stabilization: bool = False + """ + Enables partial result stabilization for your transcription. Partial result + stabilization can reduce latency in your output, but may impact accuracy. For + more information, see `Partial-result stabilization `_ + . + """ + partial_results_stability: str | None = None + """ + Specify the level of stability to use when you enable partial results + stabilization (``EnablePartialResultsStabilization``). + + Low stability provides the highest accuracy. High stability transcribes faster, + but with slightly lower accuracy. + + For more information, see `Partial-result stabilization `_ + . + """ + content_identification_type: str | None = None + """ + Labels all personally identifiable information (PII) identified in your + transcript. + + Content identification is performed at the segment level; PII specified in + ``PiiEntityTypes`` is flagged upon complete transcription of an audio segment. + If you don't include ``PiiEntityTypes`` in your request, all PII is identified. + + You can’t set ``ContentIdentificationType`` and ``ContentRedactionType`` in the + same request. If you set both, your request returns a ``BadRequestException``. + + For more information, see `Redacting or identifying personally identifiable information `_ + . + """ + content_redaction_type: str | None = None + """ + Redacts all personally identifiable information (PII) identified in your + transcript. + + Content redaction is performed at the segment level; PII specified in + ``PiiEntityTypes`` is redacted upon complete transcription of an audio segment. + If you don't include ``PiiEntityTypes`` in your request, all PII is redacted. + + You can’t set ``ContentRedactionType`` and ``ContentIdentificationType`` in the + same request. If you set both, your request returns a ``BadRequestException``. + + For more information, see `Redacting or identifying personally identifiable information `_ + . + """ + pii_entity_types: str | None = None + """ + Specify which types of personally identifiable information (PII) you want to + redact in your transcript. You can include as many types as you'd like, or you + can select ``ALL``. + + Values must be comma-separated and can include: ``ADDRESS``, + ``BANK_ACCOUNT_NUMBER``, ``BANK_ROUTING``, ``CREDIT_DEBIT_CVV``, + ``CREDIT_DEBIT_EXPIRY``, ``CREDIT_DEBIT_NUMBER``, ``EMAIL``, ``NAME``, + ``PHONE``, ``PIN``, ``SSN``, or ``ALL``. + + Note that if you include ``PiiEntityTypes`` in your request, you must also + include ``ContentIdentificationType`` or ``ContentRedactionType``. + + If you include ``ContentRedactionType`` or ``ContentIdentificationType`` in your + request, but do not include ``PiiEntityTypes``, all PII is redacted or + identified. + """ + language_model_name: str | None = None + """ + Specify the name of the custom language model that you want to use when + processing your transcription. Note that language model names are case + sensitive. + + The language of the specified language model must match the language code you + specify in your transcription request. If the languages don't match, the custom + language model isn't applied. There are no errors or warnings associated with a + language mismatch. + + For more information, see `Custom language models `_ + . + """ + identify_language: bool = False + """ + Enables automatic language identification for your transcription. + + If you include ``IdentifyLanguage``, you must include a list of language codes, + using ``LanguageOptions``, that you think may be present in your audio stream. + + You can also include a preferred language using ``PreferredLanguage``. Adding a + preferred language can help Amazon Transcribe identify the language faster than + if you omit this parameter. + + If you have multi-channel audio that contains different languages on each + channel, and you've enabled channel identification, automatic language + identification identifies the dominant language on each audio channel. + + Note that you must include either ``LanguageCode`` or ``IdentifyLanguage`` or + ``IdentifyMultipleLanguages`` in your request. If you include more than one of + these parameters, your transcription job fails. + + Streaming language identification can't be combined with custom language models + or redaction. + """ + language_options: str | None = None + """ + Specify two or more language codes that represent the languages you think may be + present in your media; including more than five is not recommended. + + Including language options can improve the accuracy of language identification. + + If you include ``LanguageOptions`` in your request, you must also include + ``IdentifyLanguage`` or ``IdentifyMultipleLanguages``. + + For a list of languages supported with Amazon Transcribe streaming, refer to the + `Supported languages `_ + table. + + .. important:: + You can only include one language dialect per language per stream. For example, + you cannot include ``en-US`` and ``en-AU`` in the same request. + """ + preferred_language: str | None = None + """ + Specify a preferred language from the subset of languages codes you specified in + ``LanguageOptions``. + + You can only use this parameter if you've included ``IdentifyLanguage`` and + ``LanguageOptions`` in your request. + """ + identify_multiple_languages: bool = False + """ + Enables automatic multi-language identification in your transcription job + request. Use this parameter if your stream contains more than one language. If + your stream contains only one language, use IdentifyLanguage instead. + + If you include ``IdentifyMultipleLanguages``, you must include a list of + language codes, using ``LanguageOptions``, that you think may be present in your + stream. + + If you want to apply a custom vocabulary or a custom vocabulary filter to your + automatic multiple language identification request, include ``VocabularyNames`` + or ``VocabularyFilterNames``. + + Note that you must include one of ``LanguageCode``, ``IdentifyLanguage``, or + ``IdentifyMultipleLanguages`` in your request. If you include more than one of + these parameters, your transcription job fails. + """ + vocabulary_names: str | None = None + """ + Specify the names of the custom vocabularies that you want to use when + processing your transcription. Note that vocabulary names are case sensitive. + + If none of the languages of the specified custom vocabularies match the language + identified in your media, your job fails. + + .. important:: + This parameter is only intended for use **with** the ``IdentifyLanguage`` + parameter. If you're **not** including ``IdentifyLanguage`` in your request and + want to use a custom vocabulary with your transcription, use the + ``VocabularyName`` parameter instead. + + For more information, see `Custom vocabularies `_ + . + """ + vocabulary_filter_names: str | None = None + """ + Specify the names of the custom vocabulary filters that you want to use when + processing your transcription. Note that vocabulary filter names are case + sensitive. + + If none of the languages of the specified custom vocabulary filters match the + language identified in your media, your job fails. + + .. important:: + This parameter is only intended for use **with** the ``IdentifyLanguage`` + parameter. If you're **not** including ``IdentifyLanguage`` in your request and + want to use a custom vocabulary filter with your transcription, use the + ``VocabularyFilterName`` parameter instead. + + For more information, see `Using vocabulary filtering with unwanted words `_ + . + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_START_STREAM_TRANSCRIPTION_INPUT, self) + + def serialize_members(self, serializer: ShapeSerializer): + if self.language_code is not None: + serializer.write_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_INPUT.members["LanguageCode"], + self.language_code, + ) + + if self.media_sample_rate_hertz is not None: + serializer.write_integer( + _SCHEMA_START_STREAM_TRANSCRIPTION_INPUT.members[ + "MediaSampleRateHertz" + ], + self.media_sample_rate_hertz, + ) + + if self.media_encoding is not None: + serializer.write_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_INPUT.members["MediaEncoding"], + self.media_encoding, + ) + + if self.vocabulary_name is not None: + serializer.write_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_INPUT.members["VocabularyName"], + self.vocabulary_name, + ) + + if self.session_id is not None: + serializer.write_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_INPUT.members["SessionId"], + self.session_id, + ) + + if self.vocabulary_filter_name is not None: + serializer.write_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_INPUT.members[ + "VocabularyFilterName" + ], + self.vocabulary_filter_name, + ) + + if self.vocabulary_filter_method is not None: + serializer.write_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_INPUT.members[ + "VocabularyFilterMethod" + ], + self.vocabulary_filter_method, + ) + + if self.show_speaker_label is not None: + serializer.write_boolean( + _SCHEMA_START_STREAM_TRANSCRIPTION_INPUT.members["ShowSpeakerLabel"], + self.show_speaker_label, + ) + + if self.enable_channel_identification is not None: + serializer.write_boolean( + _SCHEMA_START_STREAM_TRANSCRIPTION_INPUT.members[ + "EnableChannelIdentification" + ], + self.enable_channel_identification, + ) + + if self.number_of_channels is not None: + serializer.write_integer( + _SCHEMA_START_STREAM_TRANSCRIPTION_INPUT.members["NumberOfChannels"], + self.number_of_channels, + ) + + if self.enable_partial_results_stabilization is not None: + serializer.write_boolean( + _SCHEMA_START_STREAM_TRANSCRIPTION_INPUT.members[ + "EnablePartialResultsStabilization" + ], + self.enable_partial_results_stabilization, + ) + + if self.partial_results_stability is not None: + serializer.write_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_INPUT.members[ + "PartialResultsStability" + ], + self.partial_results_stability, + ) + + if self.content_identification_type is not None: + serializer.write_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_INPUT.members[ + "ContentIdentificationType" + ], + self.content_identification_type, + ) + + if self.content_redaction_type is not None: + serializer.write_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_INPUT.members[ + "ContentRedactionType" + ], + self.content_redaction_type, + ) + + if self.pii_entity_types is not None: + serializer.write_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_INPUT.members["PiiEntityTypes"], + self.pii_entity_types, + ) + + if self.language_model_name is not None: + serializer.write_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_INPUT.members["LanguageModelName"], + self.language_model_name, + ) + + if self.identify_language is not None: + serializer.write_boolean( + _SCHEMA_START_STREAM_TRANSCRIPTION_INPUT.members["IdentifyLanguage"], + self.identify_language, + ) + + if self.language_options is not None: + serializer.write_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_INPUT.members["LanguageOptions"], + self.language_options, + ) + + if self.preferred_language is not None: + serializer.write_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_INPUT.members["PreferredLanguage"], + self.preferred_language, + ) + + if self.identify_multiple_languages is not None: + serializer.write_boolean( + _SCHEMA_START_STREAM_TRANSCRIPTION_INPUT.members[ + "IdentifyMultipleLanguages" + ], + self.identify_multiple_languages, + ) + + if self.vocabulary_names is not None: + serializer.write_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_INPUT.members["VocabularyNames"], + self.vocabulary_names, + ) + + if self.vocabulary_filter_names is not None: + serializer.write_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_INPUT.members[ + "VocabularyFilterNames" + ], + self.vocabulary_filter_names, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["language_code"] = de.read_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_INPUT.members["LanguageCode"] + ) + + case 1: + kwargs["media_sample_rate_hertz"] = de.read_integer( + _SCHEMA_START_STREAM_TRANSCRIPTION_INPUT.members[ + "MediaSampleRateHertz" + ] + ) + + case 2: + kwargs["media_encoding"] = de.read_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_INPUT.members[ + "MediaEncoding" + ] + ) + + case 3: + kwargs["vocabulary_name"] = de.read_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_INPUT.members[ + "VocabularyName" + ] + ) + + case 4: + kwargs["session_id"] = de.read_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_INPUT.members["SessionId"] + ) + + case 6: + kwargs["vocabulary_filter_name"] = de.read_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_INPUT.members[ + "VocabularyFilterName" + ] + ) + + case 7: + kwargs["vocabulary_filter_method"] = de.read_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_INPUT.members[ + "VocabularyFilterMethod" + ] + ) + + case 8: + kwargs["show_speaker_label"] = de.read_boolean( + _SCHEMA_START_STREAM_TRANSCRIPTION_INPUT.members[ + "ShowSpeakerLabel" + ] + ) + + case 9: + kwargs["enable_channel_identification"] = de.read_boolean( + _SCHEMA_START_STREAM_TRANSCRIPTION_INPUT.members[ + "EnableChannelIdentification" + ] + ) + + case 10: + kwargs["number_of_channels"] = de.read_integer( + _SCHEMA_START_STREAM_TRANSCRIPTION_INPUT.members[ + "NumberOfChannels" + ] + ) + + case 11: + kwargs["enable_partial_results_stabilization"] = de.read_boolean( + _SCHEMA_START_STREAM_TRANSCRIPTION_INPUT.members[ + "EnablePartialResultsStabilization" + ] + ) + + case 12: + kwargs["partial_results_stability"] = de.read_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_INPUT.members[ + "PartialResultsStability" + ] + ) + + case 13: + kwargs["content_identification_type"] = de.read_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_INPUT.members[ + "ContentIdentificationType" + ] + ) + + case 14: + kwargs["content_redaction_type"] = de.read_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_INPUT.members[ + "ContentRedactionType" + ] + ) + + case 15: + kwargs["pii_entity_types"] = de.read_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_INPUT.members[ + "PiiEntityTypes" + ] + ) + + case 16: + kwargs["language_model_name"] = de.read_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_INPUT.members[ + "LanguageModelName" + ] + ) + + case 17: + kwargs["identify_language"] = de.read_boolean( + _SCHEMA_START_STREAM_TRANSCRIPTION_INPUT.members[ + "IdentifyLanguage" + ] + ) + + case 18: + kwargs["language_options"] = de.read_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_INPUT.members[ + "LanguageOptions" + ] + ) + + case 19: + kwargs["preferred_language"] = de.read_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_INPUT.members[ + "PreferredLanguage" + ] + ) + + case 20: + kwargs["identify_multiple_languages"] = de.read_boolean( + _SCHEMA_START_STREAM_TRANSCRIPTION_INPUT.members[ + "IdentifyMultipleLanguages" + ] + ) + + case 21: + kwargs["vocabulary_names"] = de.read_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_INPUT.members[ + "VocabularyNames" + ] + ) + + case 22: + kwargs["vocabulary_filter_names"] = de.read_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_INPUT.members[ + "VocabularyFilterNames" + ] + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct( + _SCHEMA_START_STREAM_TRANSCRIPTION_INPUT, consumer=_consumer + ) + return kwargs + + +@dataclass(kw_only=True) +class Transcript: + """ + The ``Transcript`` associated with a ````. + + ``Transcript`` contains ``Results``, which contains a set of transcription + results from one or more audio segments, along with additional information per + your request parameters. + + """ + + results: list[Result] | None = None + """ + Contains a set of transcription results from one or more audio segments, along + with additional information per your request parameters. This can include + information relating to alternative transcriptions, channel identification, + partial result stabilization, language identification, and other + transcription-related data. + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_TRANSCRIPT, self) + + def serialize_members(self, serializer: ShapeSerializer): + if self.results is not None: + _serialize_result_list( + serializer, _SCHEMA_TRANSCRIPT.members["Results"], self.results + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["results"] = _deserialize_result_list( + de, _SCHEMA_TRANSCRIPT.members["Results"] + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct(_SCHEMA_TRANSCRIPT, consumer=_consumer) + return kwargs + + +@dataclass(kw_only=True) +class TranscriptEvent: + """ + The ``TranscriptEvent`` associated with a ``TranscriptResultStream``. + + Contains a set of transcription results from one or more audio segments, along + with additional information per your request parameters. + + """ + + transcript: Transcript | None = None + """ + Contains ``Results``, which contains a set of transcription results from one or + more audio segments, along with additional information per your request + parameters. This can include information relating to alternative transcriptions, + channel identification, partial result stabilization, language identification, + and other transcription-related data. + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_TRANSCRIPT_EVENT, self) + + def serialize_members(self, serializer: ShapeSerializer): + if self.transcript is not None: + serializer.write_struct( + _SCHEMA_TRANSCRIPT_EVENT.members["Transcript"], self.transcript + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["transcript"] = Transcript.deserialize(de) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct(_SCHEMA_TRANSCRIPT_EVENT, consumer=_consumer) + return kwargs + + +@dataclass +class TranscriptResultStreamTranscriptEvent: + """ + Contains ``Transcript``, which contains ``Results``. The ```` object contains a + set of transcription results from one or more audio segments, along with + additional information per your request parameters. + + """ + + value: TranscriptEvent + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_TRANSCRIPT_RESULT_STREAM, self) + + def serialize_members(self, serializer: ShapeSerializer): + serializer.write_struct( + _SCHEMA_TRANSCRIPT_RESULT_STREAM.members["TranscriptEvent"], self.value + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(value=TranscriptEvent.deserialize(deserializer)) + + +@dataclass +class TranscriptResultStreamBadRequestException: + """ + A client error occurred when the stream was created. Check the parameters of the + request and try your request again. + + """ + + value: BadRequestException + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_TRANSCRIPT_RESULT_STREAM, self) + + def serialize_members(self, serializer: ShapeSerializer): + serializer.write_struct( + _SCHEMA_TRANSCRIPT_RESULT_STREAM.members["BadRequestException"], self.value + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(value=BadRequestException.deserialize(deserializer)) + + +@dataclass +class TranscriptResultStreamLimitExceededException: + """ + Your client has exceeded one of the Amazon Transcribe limits. This is typically + the audio length limit. Break your audio stream into smaller chunks and try your + request again. + + """ + + value: LimitExceededException + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_TRANSCRIPT_RESULT_STREAM, self) + + def serialize_members(self, serializer: ShapeSerializer): + serializer.write_struct( + _SCHEMA_TRANSCRIPT_RESULT_STREAM.members["LimitExceededException"], + self.value, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(value=LimitExceededException.deserialize(deserializer)) + + +@dataclass +class TranscriptResultStreamInternalFailureException: + """ + A problem occurred while processing the audio. Amazon Transcribe terminated + processing. + + """ + + value: InternalFailureException + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_TRANSCRIPT_RESULT_STREAM, self) + + def serialize_members(self, serializer: ShapeSerializer): + serializer.write_struct( + _SCHEMA_TRANSCRIPT_RESULT_STREAM.members["InternalFailureException"], + self.value, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(value=InternalFailureException.deserialize(deserializer)) + + +@dataclass +class TranscriptResultStreamConflictException: + """ + A new stream started with the same session ID. The current stream has been + terminated. + + """ + + value: ConflictException + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_TRANSCRIPT_RESULT_STREAM, self) + + def serialize_members(self, serializer: ShapeSerializer): + serializer.write_struct( + _SCHEMA_TRANSCRIPT_RESULT_STREAM.members["ConflictException"], self.value + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(value=ConflictException.deserialize(deserializer)) + + +@dataclass +class TranscriptResultStreamServiceUnavailableException: + """ + The service is currently unavailable. Try your request later. + + """ + + value: ServiceUnavailableException + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_TRANSCRIPT_RESULT_STREAM, self) + + def serialize_members(self, serializer: ShapeSerializer): + serializer.write_struct( + _SCHEMA_TRANSCRIPT_RESULT_STREAM.members["ServiceUnavailableException"], + self.value, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(value=ServiceUnavailableException.deserialize(deserializer)) + + +@dataclass +class TranscriptResultStreamUnknown: + """Represents an unknown variant. + + If you receive this value, you will need to update your library to receive the + parsed value. + + This value may not be deliberately sent. + """ + + tag: str + + def serialize(self, serializer: ShapeSerializer): + raise SerializationError("Unknown union variants may not be serialized.") + + def serialize_members(self, serializer: ShapeSerializer): + raise SerializationError("Unknown union variants may not be serialized.") + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + raise NotImplementedError() + + +TranscriptResultStream = Union[ + TranscriptResultStreamTranscriptEvent + | TranscriptResultStreamBadRequestException + | TranscriptResultStreamLimitExceededException + | TranscriptResultStreamInternalFailureException + | TranscriptResultStreamConflictException + | TranscriptResultStreamServiceUnavailableException + | TranscriptResultStreamUnknown +] + +""" +Contains detailed information about your streaming session. + +""" + + +class _TranscriptResultStreamDeserializer: + _result: TranscriptResultStream | None = None + + def deserialize(self, deserializer: ShapeDeserializer) -> TranscriptResultStream: + self._result = None + deserializer.read_struct(_SCHEMA_TRANSCRIPT_RESULT_STREAM, self._consumer) + + if self._result is None: + raise SerializationError( + "Unions must have exactly one value, but found none." + ) + + return self._result + + def _consumer(self, schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + self._set_result(TranscriptResultStreamTranscriptEvent.deserialize(de)) + + case 1: + self._set_result( + TranscriptResultStreamBadRequestException.deserialize(de) + ) + + case 2: + self._set_result( + TranscriptResultStreamLimitExceededException.deserialize(de) + ) + + case 3: + self._set_result( + TranscriptResultStreamInternalFailureException.deserialize(de) + ) + + case 4: + self._set_result( + TranscriptResultStreamConflictException.deserialize(de) + ) + + case 5: + self._set_result( + TranscriptResultStreamServiceUnavailableException.deserialize(de) + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + def _set_result(self, value: TranscriptResultStream) -> None: + if self._result is not None: + raise SerializationError( + "Unions must have exactly one value, but found more than one." + ) + self._result = value + + +@dataclass(kw_only=True) +class StartStreamTranscriptionOutput: + request_id: str | None = None + """ + Provides the identifier for your streaming request. + """ + language_code: str | None = None + """ + Provides the language code that you specified in your request. + """ + media_sample_rate_hertz: int | None = None + """ + Provides the sample rate that you specified in your request. + """ + media_encoding: str | None = None + """ + Provides the media encoding you specified in your request. + """ + vocabulary_name: str | None = None + """ + Provides the name of the custom vocabulary that you specified in your request. + """ + session_id: str | None = None + """ + Provides the identifier for your transcription session. + """ + vocabulary_filter_name: str | None = None + """ + Provides the name of the custom vocabulary filter that you specified in your + request. + """ + vocabulary_filter_method: str | None = None + """ + Provides the vocabulary filtering method used in your transcription. + """ + show_speaker_label: bool = False + """ + Shows whether speaker partitioning was enabled for your transcription. + """ + enable_channel_identification: bool = False + """ + Shows whether channel identification was enabled for your transcription. + """ + number_of_channels: int | None = None + """ + Provides the number of channels that you specified in your request. + """ + enable_partial_results_stabilization: bool = False + """ + Shows whether partial results stabilization was enabled for your transcription. + """ + partial_results_stability: str | None = None + """ + Provides the stabilization level used for your transcription. + """ + content_identification_type: str | None = None + """ + Shows whether content identification was enabled for your transcription. + """ + content_redaction_type: str | None = None + """ + Shows whether content redaction was enabled for your transcription. + """ + pii_entity_types: str | None = None + """ + Lists the PII entity types you specified in your request. + """ + language_model_name: str | None = None + """ + Provides the name of the custom language model that you specified in your + request. + """ + identify_language: bool = False + """ + Shows whether automatic language identification was enabled for your + transcription. + """ + language_options: str | None = None + """ + Provides the language codes that you specified in your request. + """ + preferred_language: str | None = None + """ + Provides the preferred language that you specified in your request. + """ + identify_multiple_languages: bool = False + """ + Shows whether automatic multi-language identification was enabled for your + transcription. + """ + vocabulary_names: str | None = None + """ + Provides the names of the custom vocabularies that you specified in your + request. + """ + vocabulary_filter_names: str | None = None + """ + Provides the names of the custom vocabulary filters that you specified in your + request. + """ + + def serialize(self, serializer: ShapeSerializer): + serializer.write_struct(_SCHEMA_START_STREAM_TRANSCRIPTION_OUTPUT, self) + + def serialize_members(self, serializer: ShapeSerializer): + if self.request_id is not None: + serializer.write_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_OUTPUT.members["RequestId"], + self.request_id, + ) + + if self.language_code is not None: + serializer.write_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_OUTPUT.members["LanguageCode"], + self.language_code, + ) + + if self.media_sample_rate_hertz is not None: + serializer.write_integer( + _SCHEMA_START_STREAM_TRANSCRIPTION_OUTPUT.members[ + "MediaSampleRateHertz" + ], + self.media_sample_rate_hertz, + ) + + if self.media_encoding is not None: + serializer.write_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_OUTPUT.members["MediaEncoding"], + self.media_encoding, + ) + + if self.vocabulary_name is not None: + serializer.write_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_OUTPUT.members["VocabularyName"], + self.vocabulary_name, + ) + + if self.session_id is not None: + serializer.write_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_OUTPUT.members["SessionId"], + self.session_id, + ) + + if self.vocabulary_filter_name is not None: + serializer.write_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_OUTPUT.members[ + "VocabularyFilterName" + ], + self.vocabulary_filter_name, + ) + + if self.vocabulary_filter_method is not None: + serializer.write_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_OUTPUT.members[ + "VocabularyFilterMethod" + ], + self.vocabulary_filter_method, + ) + + serializer.write_boolean( + _SCHEMA_START_STREAM_TRANSCRIPTION_OUTPUT.members["ShowSpeakerLabel"], + self.show_speaker_label, + ) + serializer.write_boolean( + _SCHEMA_START_STREAM_TRANSCRIPTION_OUTPUT.members[ + "EnableChannelIdentification" + ], + self.enable_channel_identification, + ) + if self.number_of_channels is not None: + serializer.write_integer( + _SCHEMA_START_STREAM_TRANSCRIPTION_OUTPUT.members["NumberOfChannels"], + self.number_of_channels, + ) + + serializer.write_boolean( + _SCHEMA_START_STREAM_TRANSCRIPTION_OUTPUT.members[ + "EnablePartialResultsStabilization" + ], + self.enable_partial_results_stabilization, + ) + if self.partial_results_stability is not None: + serializer.write_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_OUTPUT.members[ + "PartialResultsStability" + ], + self.partial_results_stability, + ) + + if self.content_identification_type is not None: + serializer.write_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_OUTPUT.members[ + "ContentIdentificationType" + ], + self.content_identification_type, + ) + + if self.content_redaction_type is not None: + serializer.write_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_OUTPUT.members[ + "ContentRedactionType" + ], + self.content_redaction_type, + ) + + if self.pii_entity_types is not None: + serializer.write_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_OUTPUT.members["PiiEntityTypes"], + self.pii_entity_types, + ) + + if self.language_model_name is not None: + serializer.write_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_OUTPUT.members["LanguageModelName"], + self.language_model_name, + ) + + serializer.write_boolean( + _SCHEMA_START_STREAM_TRANSCRIPTION_OUTPUT.members["IdentifyLanguage"], + self.identify_language, + ) + if self.language_options is not None: + serializer.write_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_OUTPUT.members["LanguageOptions"], + self.language_options, + ) + + if self.preferred_language is not None: + serializer.write_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_OUTPUT.members["PreferredLanguage"], + self.preferred_language, + ) + + serializer.write_boolean( + _SCHEMA_START_STREAM_TRANSCRIPTION_OUTPUT.members[ + "IdentifyMultipleLanguages" + ], + self.identify_multiple_languages, + ) + if self.vocabulary_names is not None: + serializer.write_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_OUTPUT.members["VocabularyNames"], + self.vocabulary_names, + ) + + if self.vocabulary_filter_names is not None: + serializer.write_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_OUTPUT.members[ + "VocabularyFilterNames" + ], + self.vocabulary_filter_names, + ) + + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: + return cls(**cls.deserialize_kwargs(deserializer)) + + @classmethod + def deserialize_kwargs(cls, deserializer: ShapeDeserializer) -> dict[str, Any]: + kwargs: dict[str, Any] = {} + + def _consumer(schema: Schema, de: ShapeDeserializer) -> None: + match schema.expect_member_index(): + case 0: + kwargs["request_id"] = de.read_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_OUTPUT.members["RequestId"] + ) + + case 1: + kwargs["language_code"] = de.read_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_OUTPUT.members[ + "LanguageCode" + ] + ) + + case 2: + kwargs["media_sample_rate_hertz"] = de.read_integer( + _SCHEMA_START_STREAM_TRANSCRIPTION_OUTPUT.members[ + "MediaSampleRateHertz" + ] + ) + + case 3: + kwargs["media_encoding"] = de.read_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_OUTPUT.members[ + "MediaEncoding" + ] + ) + + case 4: + kwargs["vocabulary_name"] = de.read_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_OUTPUT.members[ + "VocabularyName" + ] + ) + + case 5: + kwargs["session_id"] = de.read_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_OUTPUT.members["SessionId"] + ) + + case 7: + kwargs["vocabulary_filter_name"] = de.read_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_OUTPUT.members[ + "VocabularyFilterName" + ] + ) + + case 8: + kwargs["vocabulary_filter_method"] = de.read_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_OUTPUT.members[ + "VocabularyFilterMethod" + ] + ) + + case 9: + kwargs["show_speaker_label"] = de.read_boolean( + _SCHEMA_START_STREAM_TRANSCRIPTION_OUTPUT.members[ + "ShowSpeakerLabel" + ] + ) + + case 10: + kwargs["enable_channel_identification"] = de.read_boolean( + _SCHEMA_START_STREAM_TRANSCRIPTION_OUTPUT.members[ + "EnableChannelIdentification" + ] + ) + + case 11: + kwargs["number_of_channels"] = de.read_integer( + _SCHEMA_START_STREAM_TRANSCRIPTION_OUTPUT.members[ + "NumberOfChannels" + ] + ) + + case 12: + kwargs["enable_partial_results_stabilization"] = de.read_boolean( + _SCHEMA_START_STREAM_TRANSCRIPTION_OUTPUT.members[ + "EnablePartialResultsStabilization" + ] + ) + + case 13: + kwargs["partial_results_stability"] = de.read_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_OUTPUT.members[ + "PartialResultsStability" + ] + ) + + case 14: + kwargs["content_identification_type"] = de.read_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_OUTPUT.members[ + "ContentIdentificationType" + ] + ) + + case 15: + kwargs["content_redaction_type"] = de.read_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_OUTPUT.members[ + "ContentRedactionType" + ] + ) + + case 16: + kwargs["pii_entity_types"] = de.read_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_OUTPUT.members[ + "PiiEntityTypes" + ] + ) + + case 17: + kwargs["language_model_name"] = de.read_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_OUTPUT.members[ + "LanguageModelName" + ] + ) + + case 18: + kwargs["identify_language"] = de.read_boolean( + _SCHEMA_START_STREAM_TRANSCRIPTION_OUTPUT.members[ + "IdentifyLanguage" + ] + ) + + case 19: + kwargs["language_options"] = de.read_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_OUTPUT.members[ + "LanguageOptions" + ] + ) + + case 20: + kwargs["preferred_language"] = de.read_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_OUTPUT.members[ + "PreferredLanguage" + ] + ) + + case 21: + kwargs["identify_multiple_languages"] = de.read_boolean( + _SCHEMA_START_STREAM_TRANSCRIPTION_OUTPUT.members[ + "IdentifyMultipleLanguages" + ] + ) + + case 22: + kwargs["vocabulary_names"] = de.read_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_OUTPUT.members[ + "VocabularyNames" + ] + ) + + case 23: + kwargs["vocabulary_filter_names"] = de.read_string( + _SCHEMA_START_STREAM_TRANSCRIPTION_OUTPUT.members[ + "VocabularyFilterNames" + ] + ) + + case _: + logger.debug("Unexpected member schema: %s", schema) + + deserializer.read_struct( + _SCHEMA_START_STREAM_TRANSCRIPTION_OUTPUT, consumer=_consumer + ) + return kwargs + + +START_STREAM_TRANSCRIPTION = APIOperation( + input=StartStreamTranscriptionInput, + output=StartStreamTranscriptionOutput, + schema=_SCHEMA_START_STREAM_TRANSCRIPTION, + input_schema=_SCHEMA_START_STREAM_TRANSCRIPTION_INPUT, + output_schema=_SCHEMA_START_STREAM_TRANSCRIPTION_OUTPUT, + error_registry=TypeRegistry( + { + ShapeID( + "com.amazonaws.transcribestreaming#BadRequestException" + ): BadRequestException, + ShapeID( + "com.amazonaws.transcribestreaming#ConflictException" + ): ConflictException, + ShapeID( + "com.amazonaws.transcribestreaming#InternalFailureException" + ): InternalFailureException, + ShapeID( + "com.amazonaws.transcribestreaming#LimitExceededException" + ): LimitExceededException, + ShapeID( + "com.amazonaws.transcribestreaming#ServiceUnavailableException" + ): ServiceUnavailableException, + } + ), + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +) diff --git a/clients/aws-sdk-transcribe-streaming/src/aws_sdk_transcribe_streaming/user_agent.py b/clients/aws-sdk-transcribe-streaming/src/aws_sdk_transcribe_streaming/user_agent.py new file mode 100644 index 0000000..f923a15 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/src/aws_sdk_transcribe_streaming/user_agent.py @@ -0,0 +1,17 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +from smithy_aws_core.interceptors.user_agent import UserAgentInterceptor + +from . import __version__ +from .config import Config + + +def aws_user_agent_plugin(config: Config): + config.interceptors.append( + UserAgentInterceptor( + ua_suffix=config.user_agent_extra, + ua_app_id=config.sdk_ua_app_id, + sdk_version=__version__, + service_id="Transcribe_Streaming", + ) + ) diff --git a/clients/aws-sdk-transcribe-streaming/tests/__init__.py b/clients/aws-sdk-transcribe-streaming/tests/__init__.py new file mode 100644 index 0000000..247be3e --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/tests/__init__.py @@ -0,0 +1 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. diff --git a/clients/aws-sdk-transcribe-streaming/tests/test_protocol.py b/clients/aws-sdk-transcribe-streaming/tests/test_protocol.py new file mode 100644 index 0000000..8d3d501 --- /dev/null +++ b/clients/aws-sdk-transcribe-streaming/tests/test_protocol.py @@ -0,0 +1,60 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +from smithy_core.aio.utils import async_list +from smithy_http import tuples_to_fields +from smithy_http.aio import HTTPResponse as _HTTPResponse +from smithy_http.aio.interfaces import HTTPRequest, HTTPResponse +from smithy_http.interfaces import HTTPClientConfiguration, HTTPRequestConfiguration + +from aws_sdk_transcribe_streaming.models import ServiceError + + +class TestHttpServiceError(ServiceError): + """A test error that subclasses the service-error for protocol tests.""" + + def __init__(self, request: HTTPRequest): + self.request = request + + +class RequestTestHTTPClient: + """An asynchronous HTTP client solely for testing purposes.""" + + def __init__(self, *, client_config: HTTPClientConfiguration | None = None): + self._client_config = client_config + + async def send( + self, + request: HTTPRequest, + *, + request_config: HTTPRequestConfiguration | None = None, + ) -> HTTPResponse: + # Raise the exception with the request object to bypass actual request handling + raise TestHttpServiceError(request) + + +class ResponseTestHTTPClient: + """An asynchronous HTTP client solely for testing purposes.""" + + def __init__( + self, + *, + client_config: HTTPClientConfiguration | None = None, + status: int = 200, + headers: list[tuple[str, str]] | None = None, + body: bytes = b"", + ): + self._client_config = client_config + self.status = status + self.fields = tuples_to_fields(headers or []) + self.body = body + + async def send( + self, + request: HTTPRequest, + *, + request_config: HTTPRequestConfiguration | None = None, + ) -> _HTTPResponse: + # Pre-construct the response from the request and return it + return _HTTPResponse( + status=self.status, fields=self.fields, body=async_list([self.body]) + ) diff --git a/codegen/aws-models/transcribe-streaming.json b/codegen/aws-models/transcribe-streaming.json new file mode 100644 index 0000000..d636846 --- /dev/null +++ b/codegen/aws-models/transcribe-streaming.json @@ -0,0 +1,4706 @@ +{ + "smithy": "2.0", + "metadata": { + "suppressions": [ + { + "id": "HttpMethodSemantics", + "namespace": "*" + }, + { + "id": "HttpResponseCodeSemantics", + "namespace": "*" + }, + { + "id": "PaginatedTrait", + "namespace": "*" + }, + { + "id": "HttpHeaderTrait", + "namespace": "*" + }, + { + "id": "HttpUriConflict", + "namespace": "*" + }, + { + "id": "Service", + "namespace": "*" + } + ] + }, + "shapes": { + "com.amazonaws.transcribestreaming#Alternative": { + "type": "structure", + "members": { + "Transcript": { + "target": "com.amazonaws.transcribestreaming#String", + "traits": { + "smithy.api#documentation": "

Contains transcribed text.

" + } + }, + "Items": { + "target": "com.amazonaws.transcribestreaming#ItemList", + "traits": { + "smithy.api#documentation": "

Contains words, phrases, or punctuation marks in your transcription output.

" + } + }, + "Entities": { + "target": "com.amazonaws.transcribestreaming#EntityList", + "traits": { + "smithy.api#documentation": "

Contains entities identified as personally identifiable information (PII) in your transcription \n output.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A list of possible alternative transcriptions for the input audio. Each alternative may contain\n one or more of Items, Entities, or Transcript.

" + } + }, + "com.amazonaws.transcribestreaming#AlternativeList": { + "type": "list", + "member": { + "target": "com.amazonaws.transcribestreaming#Alternative" + } + }, + "com.amazonaws.transcribestreaming#AudioChunk": { + "type": "blob" + }, + "com.amazonaws.transcribestreaming#AudioEvent": { + "type": "structure", + "members": { + "AudioChunk": { + "target": "com.amazonaws.transcribestreaming#AudioChunk", + "traits": { + "smithy.api#documentation": "

\n An audio blob containing the next segment of audio from your application,\n with a maximum duration of 1 second. \n The maximum size in bytes varies based on audio properties.\n

\n

Find recommended size in Transcribing streaming best practices.\n

\n

\n Size calculation: Duration (s) * Sample Rate (Hz) * Number of Channels * 2 (Bytes per Sample)\n

\n

\n For example, a 1-second chunk of 16 kHz, 2-channel, 16-bit audio would be \n 1 * 16000 * 2 * 2 = 64000 bytes.\n

\n

\n For 8 kHz, 1-channel, 16-bit audio, a 1-second chunk would be \n 1 * 8000 * 1 * 2 = 16000 bytes.\n

", + "smithy.api#eventPayload": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

A wrapper for your audio chunks. Your audio stream consists of one or more audio\n events, which consist of one or more audio chunks.

\n

For more information, see Event stream encoding.

" + } + }, + "com.amazonaws.transcribestreaming#AudioStream": { + "type": "union", + "members": { + "AudioEvent": { + "target": "com.amazonaws.transcribestreaming#AudioEvent", + "traits": { + "smithy.api#documentation": "

A blob of audio from your application. Your audio stream consists of one or more audio\n events.

\n

For more information, see Event stream encoding.

" + } + }, + "ConfigurationEvent": { + "target": "com.amazonaws.transcribestreaming#ConfigurationEvent", + "traits": { + "smithy.api#documentation": "

Contains audio channel definitions and post-call analytics settings.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

An encoded stream of audio blobs. Audio streams are encoded as either HTTP/2 or WebSocket \n data frames.

\n

For more information, see Transcribing streaming audio.

", + "smithy.api#streaming": {} + } + }, + "com.amazonaws.transcribestreaming#BadRequestException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.transcribestreaming#String" + } + }, + "traits": { + "smithy.api#documentation": "

One or more arguments to the StartStreamTranscription, \n StartMedicalStreamTranscription, or StartCallAnalyticsStreamTranscription \n operation was not valid. For example, MediaEncoding or LanguageCode \n used unsupported values. Check the specified parameters and try your request again.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.transcribestreaming#Boolean": { + "type": "boolean", + "traits": { + "smithy.api#default": false + } + }, + "com.amazonaws.transcribestreaming#BucketName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 64 + }, + "smithy.api#pattern": "^[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9]$" + } + }, + "com.amazonaws.transcribestreaming#CallAnalyticsEntity": { + "type": "structure", + "members": { + "BeginOffsetMillis": { + "target": "com.amazonaws.transcribestreaming#Long", + "traits": { + "smithy.api#documentation": "

The time, in milliseconds, from the beginning of the audio stream to the start of the identified entity.

" + } + }, + "EndOffsetMillis": { + "target": "com.amazonaws.transcribestreaming#Long", + "traits": { + "smithy.api#documentation": "

The time, in milliseconds, from the beginning of the audio stream to the end of the identified entity.

" + } + }, + "Category": { + "target": "com.amazonaws.transcribestreaming#String", + "traits": { + "smithy.api#documentation": "

The category of information identified. For example, PII.

" + } + }, + "Type": { + "target": "com.amazonaws.transcribestreaming#String", + "traits": { + "smithy.api#documentation": "

The type of PII identified. For example, NAME or \n CREDIT_DEBIT_NUMBER.

" + } + }, + "Content": { + "target": "com.amazonaws.transcribestreaming#String", + "traits": { + "smithy.api#documentation": "

The word or words that represent the identified entity.

" + } + }, + "Confidence": { + "target": "com.amazonaws.transcribestreaming#Confidence", + "traits": { + "smithy.api#documentation": "

The confidence score associated with the identification of an entity in your transcript.

\n

Confidence scores are values between 0 and 1. A larger value indicates a higher\n probability that the identified entity correctly matches the entity spoken in your\n media.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Contains entities identified as personally identifiable information (PII) in your\n transcription output, along with various associated attributes. Examples include category,\n confidence score, content, type, and start and end times.

" + } + }, + "com.amazonaws.transcribestreaming#CallAnalyticsEntityList": { + "type": "list", + "member": { + "target": "com.amazonaws.transcribestreaming#CallAnalyticsEntity" + } + }, + "com.amazonaws.transcribestreaming#CallAnalyticsItem": { + "type": "structure", + "members": { + "BeginOffsetMillis": { + "target": "com.amazonaws.transcribestreaming#Long", + "traits": { + "smithy.api#documentation": "

The time, in milliseconds, from the beginning of the audio stream to the start of the identified item.

" + } + }, + "EndOffsetMillis": { + "target": "com.amazonaws.transcribestreaming#Long", + "traits": { + "smithy.api#documentation": "

The time, in milliseconds, from the beginning of the audio stream to the end of the identified item.

" + } + }, + "Type": { + "target": "com.amazonaws.transcribestreaming#ItemType", + "traits": { + "smithy.api#documentation": "

The type of item identified. Options are: PRONUNCIATION (spoken words) and\n PUNCTUATION.

" + } + }, + "Content": { + "target": "com.amazonaws.transcribestreaming#String", + "traits": { + "smithy.api#documentation": "

The word or punctuation that was transcribed.

" + } + }, + "Confidence": { + "target": "com.amazonaws.transcribestreaming#Confidence", + "traits": { + "smithy.api#documentation": "

The confidence score associated with a word or phrase in your transcript.

\n

Confidence scores are values between 0 and 1. A larger value indicates a higher\n probability that the identified item correctly matches the item spoken in your media.

" + } + }, + "VocabularyFilterMatch": { + "target": "com.amazonaws.transcribestreaming#Boolean", + "traits": { + "smithy.api#default": false, + "smithy.api#documentation": "

Indicates whether the specified item matches a word in the vocabulary filter included in\n your Call Analytics request. If true, there is a vocabulary filter match.

" + } + }, + "Stable": { + "target": "com.amazonaws.transcribestreaming#Stable", + "traits": { + "smithy.api#documentation": "

If partial result stabilization is enabled, Stable indicates whether the specified \n item is stable (true) or if it may change when the segment is complete \n (false).

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A word, phrase, or punctuation mark in your Call Analytics transcription output, along with various \n associated attributes, such as confidence score, type, and start and end times.

" + } + }, + "com.amazonaws.transcribestreaming#CallAnalyticsItemList": { + "type": "list", + "member": { + "target": "com.amazonaws.transcribestreaming#CallAnalyticsItem" + } + }, + "com.amazonaws.transcribestreaming#CallAnalyticsLanguageCode": { + "type": "enum", + "members": { + "EN_US": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "en-US" + } + }, + "EN_GB": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "en-GB" + } + }, + "ES_US": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "es-US" + } + }, + "FR_CA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "fr-CA" + } + }, + "FR_FR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "fr-FR" + } + }, + "EN_AU": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "en-AU" + } + }, + "IT_IT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "it-IT" + } + }, + "DE_DE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "de-DE" + } + }, + "PT_BR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pt-BR" + } + } + } + }, + "com.amazonaws.transcribestreaming#CallAnalyticsLanguageIdentification": { + "type": "list", + "member": { + "target": "com.amazonaws.transcribestreaming#CallAnalyticsLanguageWithScore" + } + }, + "com.amazonaws.transcribestreaming#CallAnalyticsLanguageWithScore": { + "type": "structure", + "members": { + "LanguageCode": { + "target": "com.amazonaws.transcribestreaming#CallAnalyticsLanguageCode", + "traits": { + "smithy.api#documentation": "

The language code of the identified language.

" + } + }, + "Score": { + "target": "com.amazonaws.transcribestreaming#Double", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The confidence score associated with the identified language code. Confidence scores are values between zero and one; larger values indicate a higher confidence in the identified language.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The language code that represents the language identified in your audio, including the associated\n confidence score.

" + } + }, + "com.amazonaws.transcribestreaming#CallAnalyticsTranscriptResultStream": { + "type": "union", + "members": { + "UtteranceEvent": { + "target": "com.amazonaws.transcribestreaming#UtteranceEvent", + "traits": { + "smithy.api#documentation": "

Contains set of transcription results from one or more audio segments, along with additional \n information per your request parameters. This can include information relating to channel definitions,\n partial result stabilization, sentiment, issue detection, and other transcription-related data.

" + } + }, + "CategoryEvent": { + "target": "com.amazonaws.transcribestreaming#CategoryEvent", + "traits": { + "smithy.api#documentation": "

Provides information on matched categories that were used to generate real-time supervisor \n alerts.

" + } + }, + "BadRequestException": { + "target": "com.amazonaws.transcribestreaming#BadRequestException" + }, + "LimitExceededException": { + "target": "com.amazonaws.transcribestreaming#LimitExceededException" + }, + "InternalFailureException": { + "target": "com.amazonaws.transcribestreaming#InternalFailureException" + }, + "ConflictException": { + "target": "com.amazonaws.transcribestreaming#ConflictException" + }, + "ServiceUnavailableException": { + "target": "com.amazonaws.transcribestreaming#ServiceUnavailableException" + } + }, + "traits": { + "smithy.api#documentation": "

Contains detailed information about your real-time Call Analytics session. These details are \n provided in the UtteranceEvent and CategoryEvent objects.

", + "smithy.api#streaming": {} + } + }, + "com.amazonaws.transcribestreaming#CategoryEvent": { + "type": "structure", + "members": { + "MatchedCategories": { + "target": "com.amazonaws.transcribestreaming#StringList", + "traits": { + "smithy.api#documentation": "

Lists the categories that were matched in your audio segment.

" + } + }, + "MatchedDetails": { + "target": "com.amazonaws.transcribestreaming#MatchedCategoryDetails", + "traits": { + "smithy.api#documentation": "

Contains information about the matched categories, including category names and timestamps.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Provides information on any TranscriptFilterType categories that matched your \n transcription output. Matches are identified for each segment upon completion of that segment.

" + } + }, + "com.amazonaws.transcribestreaming#ChannelDefinition": { + "type": "structure", + "members": { + "ChannelId": { + "target": "com.amazonaws.transcribestreaming#ChannelId", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Specify the audio channel you want to define.

", + "smithy.api#required": {} + } + }, + "ParticipantRole": { + "target": "com.amazonaws.transcribestreaming#ParticipantRole", + "traits": { + "smithy.api#documentation": "

Specify the speaker you want to define. Omitting this parameter is equivalent to\n specifying both participants.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Makes it possible to specify which speaker is on which audio channel. For example, if your\n agent is the first participant to speak, you would set ChannelId to\n 0 (to indicate the first channel) and ParticipantRole to\n AGENT (to indicate that it's the agent speaking).

" + } + }, + "com.amazonaws.transcribestreaming#ChannelDefinitions": { + "type": "list", + "member": { + "target": "com.amazonaws.transcribestreaming#ChannelDefinition" + }, + "traits": { + "smithy.api#length": { + "min": 2, + "max": 2 + } + } + }, + "com.amazonaws.transcribestreaming#ChannelId": { + "type": "integer", + "traits": { + "smithy.api#default": 0, + "smithy.api#range": { + "min": 0, + "max": 1 + } + } + }, + "com.amazonaws.transcribestreaming#CharacterOffsets": { + "type": "structure", + "members": { + "Begin": { + "target": "com.amazonaws.transcribestreaming#Integer", + "traits": { + "smithy.api#documentation": "

Provides the character count of the first character where a match is identified. For example, the first\n character associated with an issue or a category match in a segment transcript.

" + } + }, + "End": { + "target": "com.amazonaws.transcribestreaming#Integer", + "traits": { + "smithy.api#documentation": "

Provides the character count of the last character where a match is identified. For example, the last \n character associated with an issue or a category match in a segment transcript.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Provides the location, using character count, in your transcript where a match is identified. For example, \n the location of an issue or a category match within a segment.

" + } + }, + "com.amazonaws.transcribestreaming#ClinicalNoteGenerationResult": { + "type": "structure", + "members": { + "ClinicalNoteOutputLocation": { + "target": "com.amazonaws.transcribestreaming#Uri", + "traits": { + "smithy.api#documentation": "

Holds the Amazon S3 URI for the output Clinical Note.

" + } + }, + "TranscriptOutputLocation": { + "target": "com.amazonaws.transcribestreaming#Uri", + "traits": { + "smithy.api#documentation": "

Holds the Amazon S3 URI for the output Transcript.

" + } + }, + "Status": { + "target": "com.amazonaws.transcribestreaming#ClinicalNoteGenerationStatus", + "traits": { + "smithy.api#documentation": "

The status of the clinical note generation.

\n

Possible Values:

\n
    \n
  • \n

    \n IN_PROGRESS\n

    \n
  • \n
  • \n

    \n FAILED\n

    \n
  • \n
  • \n

    \n COMPLETED\n

    \n
  • \n
\n

\n After audio streaming finishes, and you send a MedicalScribeSessionControlEvent event (with END_OF_SESSION as the Type),\n the status is set to IN_PROGRESS.\n If the status is COMPLETED, the analytics completed successfully, and you can find the\n results at the locations specified in ClinicalNoteOutputLocation and TranscriptOutputLocation.\n If the status is FAILED, FailureReason provides details about the failure.\n

" + } + }, + "FailureReason": { + "target": "com.amazonaws.transcribestreaming#String", + "traits": { + "smithy.api#documentation": "

If ClinicalNoteGenerationResult is FAILED, information about why it failed.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The details for clinical note generation,\n including status, and output locations for clinical note and aggregated transcript if the analytics completed,\n or failure reason if the analytics failed.\n

" + } + }, + "com.amazonaws.transcribestreaming#ClinicalNoteGenerationSettings": { + "type": "structure", + "members": { + "OutputBucketName": { + "target": "com.amazonaws.transcribestreaming#BucketName", + "traits": { + "smithy.api#documentation": "

The name of the Amazon S3 bucket where you want the output of Amazon Web Services HealthScribe post-stream analytics stored. Don't include the S3:// prefix of the specified bucket.

\n

HealthScribe outputs transcript and clinical note files under the prefix:\n S3://$output-bucket-name/healthscribe-streaming/session-id/post-stream-analytics/clinical-notes\n

\n

The role ResourceAccessRoleArn specified in the MedicalScribeConfigurationEvent must have\n permission to use the specified location. You can change Amazon S3 permissions using the \n Amazon Web Services Management Console\n . See also Permissions Required for IAM User Roles .

", + "smithy.api#required": {} + } + }, + "NoteTemplate": { + "target": "com.amazonaws.transcribestreaming#MedicalScribeNoteTemplate", + "traits": { + "smithy.api#documentation": "

Specify one of the following templates to use for the clinical note summary. The default is HISTORY_AND_PHYSICAL.

\n
    \n
  • \n

    HISTORY_AND_PHYSICAL: Provides summaries for key sections of the clinical documentation. Examples of sections include Chief Complaint, History of Present Illness, Review of Systems, Past Medical History, Assessment, and Plan.\n

    \n
  • \n
  • \n

    GIRPP: Provides summaries based on the patients progress toward goals. Examples of sections include Goal, Intervention,\n Response, Progress, and Plan.

    \n
  • \n
  • \n

    BIRP: Focuses on the patient's behavioral patterns and responses. Examples of sections include Behavior, Intervention, Response, and Plan.

    \n
  • \n
  • \n

    SIRP: Emphasizes the situational context of therapy. Examples of sections include Situation, Intervention, Response, and Plan.

    \n
  • \n
  • \n

    DAP: Provides a simplified format for clinical documentation. Examples of sections include Data, Assessment, and Plan.

    \n
  • \n
  • \n

    BEHAVIORAL_SOAP: Behavioral health focused documentation format. Examples of sections include Subjective, Objective, Assessment, and Plan.

    \n
  • \n
  • \n

    PHYSICAL_SOAP: Physical health focused documentation format. Examples of sections include Subjective, Objective, Assessment, and Plan.

    \n
  • \n
" + } + } + }, + "traits": { + "smithy.api#documentation": "

The output configuration for aggregated transcript and clinical note generation.

" + } + }, + "com.amazonaws.transcribestreaming#ClinicalNoteGenerationStatus": { + "type": "enum", + "members": { + "IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IN_PROGRESS" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + }, + "COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COMPLETED" + } + } + } + }, + "com.amazonaws.transcribestreaming#Confidence": { + "type": "double" + }, + "com.amazonaws.transcribestreaming#ConfigurationEvent": { + "type": "structure", + "members": { + "ChannelDefinitions": { + "target": "com.amazonaws.transcribestreaming#ChannelDefinitions", + "traits": { + "smithy.api#documentation": "

Indicates which speaker is on which audio channel.

" + } + }, + "PostCallAnalyticsSettings": { + "target": "com.amazonaws.transcribestreaming#PostCallAnalyticsSettings", + "traits": { + "smithy.api#documentation": "

Provides additional optional settings for your Call Analytics post-call request, including \n encryption and output locations for your redacted transcript.

\n

\n PostCallAnalyticsSettings provides you with the same insights as a \n Call Analytics post-call transcription. Refer to Post-call analytics for more information \n on this feature.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Allows you to set audio channel definitions and post-call analytics settings.

" + } + }, + "com.amazonaws.transcribestreaming#ConflictException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.transcribestreaming#String" + } + }, + "traits": { + "smithy.api#documentation": "

A new stream started with the same session ID. The current stream has been terminated.

", + "smithy.api#error": "client", + "smithy.api#httpError": 409 + } + }, + "com.amazonaws.transcribestreaming#ContentIdentificationType": { + "type": "enum", + "members": { + "PII": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PII" + } + } + } + }, + "com.amazonaws.transcribestreaming#ContentRedactionOutput": { + "type": "enum", + "members": { + "REDACTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "redacted" + } + }, + "REDACTED_AND_UNREDACTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "redacted_and_unredacted" + } + } + } + }, + "com.amazonaws.transcribestreaming#ContentRedactionType": { + "type": "enum", + "members": { + "PII": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PII" + } + } + } + }, + "com.amazonaws.transcribestreaming#DateTime": { + "type": "timestamp" + }, + "com.amazonaws.transcribestreaming#Double": { + "type": "double", + "traits": { + "smithy.api#default": 0 + } + }, + "com.amazonaws.transcribestreaming#Entity": { + "type": "structure", + "members": { + "StartTime": { + "target": "com.amazonaws.transcribestreaming#Double", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The start time of the utterance that was identified as PII in seconds, with millisecond precision (e.g., 1.056)

" + } + }, + "EndTime": { + "target": "com.amazonaws.transcribestreaming#Double", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The end time of the utterance that was identified as PII in seconds, with millisecond precision (e.g., 1.056)

" + } + }, + "Category": { + "target": "com.amazonaws.transcribestreaming#String", + "traits": { + "smithy.api#documentation": "

The category of information identified. The only category is PII.

" + } + }, + "Type": { + "target": "com.amazonaws.transcribestreaming#String", + "traits": { + "smithy.api#documentation": "

The type of PII identified. For example, NAME or \n CREDIT_DEBIT_NUMBER.

" + } + }, + "Content": { + "target": "com.amazonaws.transcribestreaming#String", + "traits": { + "smithy.api#documentation": "

The word or words identified as PII.

" + } + }, + "Confidence": { + "target": "com.amazonaws.transcribestreaming#Confidence", + "traits": { + "smithy.api#documentation": "

The confidence score associated with the identified PII entity in your audio.

\n

Confidence scores are values between 0 and 1. A larger value indicates a higher\n probability that the identified entity correctly matches the entity spoken in your\n media.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Contains entities identified as personally identifiable information (PII) in your\n transcription output, along with various associated attributes. Examples include category,\n confidence score, type, stability score, and start and end times.

" + } + }, + "com.amazonaws.transcribestreaming#EntityList": { + "type": "list", + "member": { + "target": "com.amazonaws.transcribestreaming#Entity" + } + }, + "com.amazonaws.transcribestreaming#GetMedicalScribeStream": { + "type": "operation", + "input": { + "target": "com.amazonaws.transcribestreaming#GetMedicalScribeStreamRequest" + }, + "output": { + "target": "com.amazonaws.transcribestreaming#GetMedicalScribeStreamResponse" + }, + "errors": [ + { + "target": "com.amazonaws.transcribestreaming#BadRequestException" + }, + { + "target": "com.amazonaws.transcribestreaming#InternalFailureException" + }, + { + "target": "com.amazonaws.transcribestreaming#LimitExceededException" + }, + { + "target": "com.amazonaws.transcribestreaming#ResourceNotFoundException" + } + ], + "traits": { + "smithy.api#documentation": "

Provides details about the specified Amazon Web Services HealthScribe streaming session.\n To view the status of the streaming session, check the StreamStatus field in the response. To get the\n details of post-stream analytics, including its status, check the PostStreamAnalyticsResult field in the response.\n

", + "smithy.api#http": { + "method": "GET", + "uri": "/medical-scribe-stream/{SessionId}", + "code": 200 + } + } + }, + "com.amazonaws.transcribestreaming#GetMedicalScribeStreamRequest": { + "type": "structure", + "members": { + "SessionId": { + "target": "com.amazonaws.transcribestreaming#SessionId", + "traits": { + "smithy.api#documentation": "

The identifier of the HealthScribe streaming session you want information about.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.transcribestreaming#GetMedicalScribeStreamResponse": { + "type": "structure", + "members": { + "MedicalScribeStreamDetails": { + "target": "com.amazonaws.transcribestreaming#MedicalScribeStreamDetails", + "traits": { + "smithy.api#documentation": "

Provides details about a HealthScribe streaming session.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.transcribestreaming#IamRoleArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 20, + "max": 2048 + }, + "smithy.api#pattern": "^arn:(aws|aws-cn|aws-us-gov|aws-iso-{0,1}[a-z]{0,1}):iam::[0-9]{0,63}:role/[A-Za-z0-9:_/+=,@.-]{0,1024}$" + } + }, + "com.amazonaws.transcribestreaming#Integer": { + "type": "integer" + }, + "com.amazonaws.transcribestreaming#InternalFailureException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.transcribestreaming#String" + } + }, + "traits": { + "smithy.api#documentation": "

A problem occurred while processing the audio. Amazon Transcribe terminated \n processing.

", + "smithy.api#error": "server", + "smithy.api#httpError": 500 + } + }, + "com.amazonaws.transcribestreaming#IssueDetected": { + "type": "structure", + "members": { + "CharacterOffsets": { + "target": "com.amazonaws.transcribestreaming#CharacterOffsets", + "traits": { + "smithy.api#documentation": "

Provides the timestamps that identify when in an audio segment the specified issue occurs.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Lists the issues that were identified in your audio segment.

" + } + }, + "com.amazonaws.transcribestreaming#IssuesDetected": { + "type": "list", + "member": { + "target": "com.amazonaws.transcribestreaming#IssueDetected" + } + }, + "com.amazonaws.transcribestreaming#Item": { + "type": "structure", + "members": { + "StartTime": { + "target": "com.amazonaws.transcribestreaming#Double", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The start time of the transcribed item in seconds, with millisecond precision (e.g., 1.056)

" + } + }, + "EndTime": { + "target": "com.amazonaws.transcribestreaming#Double", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The end time of the transcribed item in seconds, with millisecond precision (e.g., 1.056)

" + } + }, + "Type": { + "target": "com.amazonaws.transcribestreaming#ItemType", + "traits": { + "smithy.api#documentation": "

The type of item identified. Options are: PRONUNCIATION (spoken words) and\n PUNCTUATION.

" + } + }, + "Content": { + "target": "com.amazonaws.transcribestreaming#String", + "traits": { + "smithy.api#documentation": "

The word or punctuation that was transcribed.

" + } + }, + "VocabularyFilterMatch": { + "target": "com.amazonaws.transcribestreaming#Boolean", + "traits": { + "smithy.api#default": false, + "smithy.api#documentation": "

Indicates whether the specified item matches a word in the vocabulary filter included in\n your request. If true, there is a vocabulary filter match.

" + } + }, + "Speaker": { + "target": "com.amazonaws.transcribestreaming#String", + "traits": { + "smithy.api#documentation": "

If speaker partitioning is enabled, Speaker labels the speaker of the\n specified item.

" + } + }, + "Confidence": { + "target": "com.amazonaws.transcribestreaming#Confidence", + "traits": { + "smithy.api#documentation": "

The confidence score associated with a word or phrase in your transcript.

\n

Confidence scores are values between 0 and 1. A larger value indicates a higher\n probability that the identified item correctly matches the item spoken in your media.

" + } + }, + "Stable": { + "target": "com.amazonaws.transcribestreaming#Stable", + "traits": { + "smithy.api#documentation": "

If partial result stabilization is enabled, Stable indicates whether the specified \n item is stable (true) or if it may change when the segment is complete \n (false).

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A word, phrase, or punctuation mark in your transcription output, along with various associated\n attributes, such as confidence score, type, and start and end times.

" + } + }, + "com.amazonaws.transcribestreaming#ItemList": { + "type": "list", + "member": { + "target": "com.amazonaws.transcribestreaming#Item" + } + }, + "com.amazonaws.transcribestreaming#ItemType": { + "type": "enum", + "members": { + "PRONUNCIATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pronunciation" + } + }, + "PUNCTUATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "punctuation" + } + } + } + }, + "com.amazonaws.transcribestreaming#KMSEncryptionContextMap": { + "type": "map", + "key": { + "target": "com.amazonaws.transcribestreaming#NonEmptyString" + }, + "value": { + "target": "com.amazonaws.transcribestreaming#NonEmptyString" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 10 + } + } + }, + "com.amazonaws.transcribestreaming#KMSKeyId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + }, + "smithy.api#pattern": "^[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,2048}$" + } + }, + "com.amazonaws.transcribestreaming#LanguageCode": { + "type": "enum", + "members": { + "EN_US": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "en-US" + } + }, + "EN_GB": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "en-GB" + } + }, + "ES_US": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "es-US" + } + }, + "FR_CA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "fr-CA" + } + }, + "FR_FR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "fr-FR" + } + }, + "EN_AU": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "en-AU" + } + }, + "IT_IT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "it-IT" + } + }, + "DE_DE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "de-DE" + } + }, + "PT_BR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pt-BR" + } + }, + "JA_JP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ja-JP" + } + }, + "KO_KR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ko-KR" + } + }, + "ZH_CN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "zh-CN" + } + }, + "TH_TH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "th-TH" + } + }, + "ES_ES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "es-ES" + } + }, + "AR_SA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ar-SA" + } + }, + "PT_PT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pt-PT" + } + }, + "CA_ES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ca-ES" + } + }, + "AR_AE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ar-AE" + } + }, + "HI_IN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "hi-IN" + } + }, + "ZH_HK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "zh-HK" + } + }, + "NL_NL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "nl-NL" + } + }, + "NO_NO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "no-NO" + } + }, + "SV_SE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sv-SE" + } + }, + "PL_PL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pl-PL" + } + }, + "FI_FI": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "fi-FI" + } + }, + "ZH_TW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "zh-TW" + } + }, + "EN_IN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "en-IN" + } + }, + "EN_IE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "en-IE" + } + }, + "EN_NZ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "en-NZ" + } + }, + "EN_AB": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "en-AB" + } + }, + "EN_ZA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "en-ZA" + } + }, + "EN_WL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "en-WL" + } + }, + "DE_CH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "de-CH" + } + }, + "AF_ZA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "af-ZA" + } + }, + "EU_ES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "eu-ES" + } + }, + "HR_HR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "hr-HR" + } + }, + "CS_CZ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cs-CZ" + } + }, + "DA_DK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "da-DK" + } + }, + "FA_IR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "fa-IR" + } + }, + "GL_ES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "gl-ES" + } + }, + "EL_GR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "el-GR" + } + }, + "HE_IL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "he-IL" + } + }, + "ID_ID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "id-ID" + } + }, + "LV_LV": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "lv-LV" + } + }, + "MS_MY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ms-MY" + } + }, + "RO_RO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ro-RO" + } + }, + "RU_RU": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ru-RU" + } + }, + "SR_RS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sr-RS" + } + }, + "SK_SK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sk-SK" + } + }, + "SO_SO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "so-SO" + } + }, + "TL_PH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "tl-PH" + } + }, + "UK_UA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "uk-UA" + } + }, + "VI_VN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "vi-VN" + } + }, + "ZU_ZA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "zu-ZA" + } + } + } + }, + "com.amazonaws.transcribestreaming#LanguageIdentification": { + "type": "list", + "member": { + "target": "com.amazonaws.transcribestreaming#LanguageWithScore" + } + }, + "com.amazonaws.transcribestreaming#LanguageOptions": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 200 + }, + "smithy.api#pattern": "^[a-zA-Z-,]+$" + } + }, + "com.amazonaws.transcribestreaming#LanguageWithScore": { + "type": "structure", + "members": { + "LanguageCode": { + "target": "com.amazonaws.transcribestreaming#LanguageCode", + "traits": { + "smithy.api#documentation": "

The language code of the identified language.

" + } + }, + "Score": { + "target": "com.amazonaws.transcribestreaming#Double", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The confidence score associated with the identified language code. Confidence scores are values\n between zero and one; larger values indicate a higher confidence in the identified language.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The language code that represents the language identified in your audio, including the associated\n confidence score. If you enabled channel identification in your request and each channel contained a \n different language, you will have more than one LanguageWithScore result.

" + } + }, + "com.amazonaws.transcribestreaming#LimitExceededException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.transcribestreaming#String" + } + }, + "traits": { + "smithy.api#documentation": "

Your client has exceeded one of the Amazon Transcribe limits. This is typically the audio length\n limit. Break your audio stream into smaller chunks and try your request again.

", + "smithy.api#error": "client", + "smithy.api#httpError": 429 + } + }, + "com.amazonaws.transcribestreaming#Long": { + "type": "long" + }, + "com.amazonaws.transcribestreaming#MatchedCategoryDetails": { + "type": "map", + "key": { + "target": "com.amazonaws.transcribestreaming#String" + }, + "value": { + "target": "com.amazonaws.transcribestreaming#PointsOfInterest" + } + }, + "com.amazonaws.transcribestreaming#MediaEncoding": { + "type": "enum", + "members": { + "PCM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pcm" + } + }, + "OGG_OPUS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ogg-opus" + } + }, + "FLAC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "flac" + } + } + } + }, + "com.amazonaws.transcribestreaming#MediaSampleRateHertz": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 8000, + "max": 48000 + } + } + }, + "com.amazonaws.transcribestreaming#MedicalAlternative": { + "type": "structure", + "members": { + "Transcript": { + "target": "com.amazonaws.transcribestreaming#String", + "traits": { + "smithy.api#documentation": "

Contains transcribed text.

" + } + }, + "Items": { + "target": "com.amazonaws.transcribestreaming#MedicalItemList", + "traits": { + "smithy.api#documentation": "

Contains words, phrases, or punctuation marks in your transcription output.

" + } + }, + "Entities": { + "target": "com.amazonaws.transcribestreaming#MedicalEntityList", + "traits": { + "smithy.api#documentation": "

Contains entities identified as personal health information (PHI) in your transcription \n output.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A list of possible alternative transcriptions for the input audio. Each alternative may\n contain one or more of Items, Entities, or\n Transcript.

" + } + }, + "com.amazonaws.transcribestreaming#MedicalAlternativeList": { + "type": "list", + "member": { + "target": "com.amazonaws.transcribestreaming#MedicalAlternative" + } + }, + "com.amazonaws.transcribestreaming#MedicalContentIdentificationType": { + "type": "enum", + "members": { + "PHI": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PHI" + } + } + } + }, + "com.amazonaws.transcribestreaming#MedicalEntity": { + "type": "structure", + "members": { + "StartTime": { + "target": "com.amazonaws.transcribestreaming#Double", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The start time, in seconds, of the utterance that was identified as PHI.

" + } + }, + "EndTime": { + "target": "com.amazonaws.transcribestreaming#Double", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The end time, in seconds, of the utterance that was identified as PHI.

" + } + }, + "Category": { + "target": "com.amazonaws.transcribestreaming#String", + "traits": { + "smithy.api#documentation": "

The category of information identified. The only category is PHI.

" + } + }, + "Content": { + "target": "com.amazonaws.transcribestreaming#String", + "traits": { + "smithy.api#documentation": "

The word or words identified as PHI.

" + } + }, + "Confidence": { + "target": "com.amazonaws.transcribestreaming#Confidence", + "traits": { + "smithy.api#documentation": "

The confidence score associated with the identified PHI entity in your audio.

\n

Confidence scores are values between 0 and 1. A larger value indicates a higher\n probability that the identified entity correctly matches the entity spoken in your\n media.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Contains entities identified as personal health information (PHI) in your\n transcription output, along with various associated attributes. Examples include\n category, confidence score, type, stability score, and start and end times.

" + } + }, + "com.amazonaws.transcribestreaming#MedicalEntityList": { + "type": "list", + "member": { + "target": "com.amazonaws.transcribestreaming#MedicalEntity" + } + }, + "com.amazonaws.transcribestreaming#MedicalItem": { + "type": "structure", + "members": { + "StartTime": { + "target": "com.amazonaws.transcribestreaming#Double", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The start time, in seconds, of the transcribed item.

" + } + }, + "EndTime": { + "target": "com.amazonaws.transcribestreaming#Double", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The end time, in seconds, of the transcribed item.

" + } + }, + "Type": { + "target": "com.amazonaws.transcribestreaming#ItemType", + "traits": { + "smithy.api#documentation": "

The type of item identified. Options are: PRONUNCIATION (spoken \n words) and PUNCTUATION.

" + } + }, + "Content": { + "target": "com.amazonaws.transcribestreaming#String", + "traits": { + "smithy.api#documentation": "

The word or punctuation that was transcribed.

" + } + }, + "Confidence": { + "target": "com.amazonaws.transcribestreaming#Confidence", + "traits": { + "smithy.api#documentation": "

The confidence score associated with a word or phrase in your transcript.

\n

Confidence scores are values between 0 and 1. A larger value indicates a higher\n probability that the identified item correctly matches the item spoken in your\n media.

" + } + }, + "Speaker": { + "target": "com.amazonaws.transcribestreaming#String", + "traits": { + "smithy.api#documentation": "

If speaker partitioning is enabled, Speaker labels the speaker of the\n specified item.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A word, phrase, or punctuation mark in your transcription output, along with various \n associated attributes, such as confidence score, type, and start and end times.

" + } + }, + "com.amazonaws.transcribestreaming#MedicalItemList": { + "type": "list", + "member": { + "target": "com.amazonaws.transcribestreaming#MedicalItem" + } + }, + "com.amazonaws.transcribestreaming#MedicalResult": { + "type": "structure", + "members": { + "ResultId": { + "target": "com.amazonaws.transcribestreaming#String", + "traits": { + "smithy.api#documentation": "

Provides a unique identifier for the Result.

" + } + }, + "StartTime": { + "target": "com.amazonaws.transcribestreaming#Double", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The start time, in seconds, of the Result.

" + } + }, + "EndTime": { + "target": "com.amazonaws.transcribestreaming#Double", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The end time, in seconds, of the Result.

" + } + }, + "IsPartial": { + "target": "com.amazonaws.transcribestreaming#Boolean", + "traits": { + "smithy.api#default": false, + "smithy.api#documentation": "

Indicates if the segment is complete.

\n

If IsPartial is true, the segment is not complete. If\n IsPartial is false, the segment is complete.

" + } + }, + "Alternatives": { + "target": "com.amazonaws.transcribestreaming#MedicalAlternativeList", + "traits": { + "smithy.api#documentation": "

A list of possible alternative transcriptions for the input audio. Each alternative may \n contain one or more of Items, Entities, or\n Transcript.

" + } + }, + "ChannelId": { + "target": "com.amazonaws.transcribestreaming#String", + "traits": { + "smithy.api#documentation": "

Indicates the channel identified for the Result.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The Result associated with a \n .

\n

Contains a set of transcription results from one or more audio segments, along with\n additional information per your request parameters. This can include information relating to\n alternative transcriptions, channel identification, partial result stabilization, language \n identification, and other transcription-related data.

" + } + }, + "com.amazonaws.transcribestreaming#MedicalResultList": { + "type": "list", + "member": { + "target": "com.amazonaws.transcribestreaming#MedicalResult" + } + }, + "com.amazonaws.transcribestreaming#MedicalScribeAudioEvent": { + "type": "structure", + "members": { + "AudioChunk": { + "target": "com.amazonaws.transcribestreaming#AudioChunk", + "traits": { + "smithy.api#documentation": "

\n An audio blob containing the next segment of audio from your application,\n with a maximum duration of 1 second. \n The maximum size in bytes varies based on audio properties.\n

\n

Find recommended size in Transcribing streaming best practices.\n

\n

\n Size calculation: Duration (s) * Sample Rate (Hz) * Number of Channels * 2 (Bytes per Sample)\n

\n

\n For example, a 1-second chunk of 16 kHz, 2-channel, 16-bit audio would be \n 1 * 16000 * 2 * 2 = 64000 bytes.\n

\n

\n For 8 kHz, 1-channel, 16-bit audio, a 1-second chunk would be \n 1 * 8000 * 1 * 2 = 16000 bytes.\n

", + "smithy.api#eventPayload": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

A wrapper for your audio chunks

\n

For more information, see Event stream encoding.\n

" + } + }, + "com.amazonaws.transcribestreaming#MedicalScribeChannelDefinition": { + "type": "structure", + "members": { + "ChannelId": { + "target": "com.amazonaws.transcribestreaming#MedicalScribeChannelId", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Specify the audio channel you want to define.

", + "smithy.api#required": {} + } + }, + "ParticipantRole": { + "target": "com.amazonaws.transcribestreaming#MedicalScribeParticipantRole", + "traits": { + "smithy.api#documentation": "

Specify the participant that you want to flag.\n The allowed options are CLINICIAN and\n PATIENT.\n

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Makes it possible to specify which speaker is on which channel.\n For example, if the clinician is the first participant to speak, you would set the ChannelId of the first\n ChannelDefinition\n in the list to 0 (to indicate the first channel) and ParticipantRole to\n CLINICIAN\n (to indicate that it's the clinician speaking).\n Then you would set the ChannelId of the second ChannelDefinition in the list to\n 1\n (to indicate the second channel) and ParticipantRole to PATIENT (to indicate that it's the patient speaking).\n

\n

If you don't specify a channel definition, HealthScribe will diarize the transcription and identify speaker roles for each speaker.

" + } + }, + "com.amazonaws.transcribestreaming#MedicalScribeChannelDefinitions": { + "type": "list", + "member": { + "target": "com.amazonaws.transcribestreaming#MedicalScribeChannelDefinition" + }, + "traits": { + "smithy.api#length": { + "min": 2, + "max": 2 + } + } + }, + "com.amazonaws.transcribestreaming#MedicalScribeChannelId": { + "type": "integer", + "traits": { + "smithy.api#default": 0, + "smithy.api#range": { + "min": 0, + "max": 1 + } + } + }, + "com.amazonaws.transcribestreaming#MedicalScribeConfigurationEvent": { + "type": "structure", + "members": { + "VocabularyName": { + "target": "com.amazonaws.transcribestreaming#VocabularyName", + "traits": { + "smithy.api#documentation": "

Specify the name of the custom vocabulary you want to use for your streaming session.\n Custom vocabulary names are case-sensitive.\n

" + } + }, + "VocabularyFilterName": { + "target": "com.amazonaws.transcribestreaming#VocabularyFilterName", + "traits": { + "smithy.api#documentation": "

Specify the name of the custom vocabulary filter you want to include in your streaming session.\n Custom vocabulary filter names are case-sensitive.\n

\n

If you include VocabularyFilterName in the MedicalScribeConfigurationEvent,\n you must also include VocabularyFilterMethod.\n

" + } + }, + "VocabularyFilterMethod": { + "target": "com.amazonaws.transcribestreaming#MedicalScribeVocabularyFilterMethod", + "traits": { + "smithy.api#documentation": "

Specify how you want your custom vocabulary filter applied to the streaming session.

\n

To replace words with ***, specify mask.\n

\n

To delete words, specify remove.\n

\n

To flag words without changing them, specify tag.\n

" + } + }, + "ResourceAccessRoleArn": { + "target": "com.amazonaws.transcribestreaming#IamRoleArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of an IAM role that has permissions to access the Amazon S3 output\n bucket you specified, and use your KMS key if supplied. If the role that you specify doesn’t have the\n appropriate permissions, your request fails.

\n

\n IAM\n role ARNs have the format\n arn:partition:iam::account:role/role-name-with-path.\n For example: arn:aws:iam::111122223333:role/Admin.\n

\n

For more information, see Amazon Web Services HealthScribe.

", + "smithy.api#required": {} + } + }, + "ChannelDefinitions": { + "target": "com.amazonaws.transcribestreaming#MedicalScribeChannelDefinitions", + "traits": { + "smithy.api#documentation": "

Specify which speaker is on which audio channel.

" + } + }, + "EncryptionSettings": { + "target": "com.amazonaws.transcribestreaming#MedicalScribeEncryptionSettings", + "traits": { + "smithy.api#documentation": "

Specify the encryption settings for your streaming session.

" + } + }, + "PostStreamAnalyticsSettings": { + "target": "com.amazonaws.transcribestreaming#MedicalScribePostStreamAnalyticsSettings", + "traits": { + "smithy.api#documentation": "

Specify settings for post-stream analytics.

", + "smithy.api#required": {} + } + }, + "MedicalScribeContext": { + "target": "com.amazonaws.transcribestreaming#MedicalScribeContext", + "traits": { + "smithy.api#documentation": "

The MedicalScribeContext object that contains contextual information used to generate\n customized clinical notes.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specify details to configure the streaming session, including channel definitions, encryption settings, post-stream analytics\n settings, resource access role ARN and vocabulary settings.\n

\n

Whether you are starting a new session or resuming an existing session, \n your first event must be a MedicalScribeConfigurationEvent.\n If you are resuming a session, then this event must have the same configurations that you provided to start the session.\n

" + } + }, + "com.amazonaws.transcribestreaming#MedicalScribeContext": { + "type": "structure", + "members": { + "PatientContext": { + "target": "com.amazonaws.transcribestreaming#MedicalScribePatientContext", + "traits": { + "smithy.api#documentation": "

Contains patient-specific information used to customize the clinical note generation.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The MedicalScribeContext object that contains contextual information which is used during clinical note generation\n to add relevant context to the note.

" + } + }, + "com.amazonaws.transcribestreaming#MedicalScribeEncryptionSettings": { + "type": "structure", + "members": { + "KmsEncryptionContext": { + "target": "com.amazonaws.transcribestreaming#KMSEncryptionContextMap", + "traits": { + "smithy.api#documentation": "

A map of plain text, non-secret key:value pairs, known as encryption context pairs, that provide an added layer of\n security for your data. For more information, see KMSencryption context and Asymmetric keys in KMS\n .

" + } + }, + "KmsKeyId": { + "target": "com.amazonaws.transcribestreaming#KMSKeyId", + "traits": { + "smithy.api#documentation": "

The ID of the KMS key you want to use for your streaming session. You\n can specify its KMS key ID, key Amazon Resource Name (ARN), alias name, or alias ARN. When using an alias name, prefix it with \"alias/\". \n To specify a KMS key in a different Amazon Web Services account, you must use the key ARN or alias ARN.

\n

For example:

\n
    \n
  • \n

    Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

    \n
  • \n
  • \n

    Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

    \n
  • \n
  • \n

    \n Alias name: alias/ExampleAlias

    \n
  • \n
  • \n

    \n Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias \n

    \n
  • \n
\n

\n To get the key ID and key ARN for a KMS key, use the ListKeys or DescribeKey KMS API operations. \n To get the alias name and alias ARN, use ListKeys API operation. \n

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Contains encryption related settings to be used for data encryption with Key Management Service, including KmsEncryptionContext and KmsKeyId.\n The KmsKeyId is required, while KmsEncryptionContext is optional for additional layer of security.\n

\n

By default, Amazon Web Services HealthScribe provides encryption at rest to protect sensitive customer data using Amazon S3-managed keys. HealthScribe uses the KMS key you specify as a second layer of\n encryption.

\n

\n Your ResourceAccessRoleArn\n must permission to use your KMS key.\n For more information, see Data Encryption at rest for Amazon Web Services HealthScribe.\n

" + } + }, + "com.amazonaws.transcribestreaming#MedicalScribeInputStream": { + "type": "union", + "members": { + "AudioEvent": { + "target": "com.amazonaws.transcribestreaming#MedicalScribeAudioEvent" + }, + "SessionControlEvent": { + "target": "com.amazonaws.transcribestreaming#MedicalScribeSessionControlEvent", + "traits": { + "smithy.api#documentation": "

Specify the lifecycle of your streaming session, such as ending the session.

" + } + }, + "ConfigurationEvent": { + "target": "com.amazonaws.transcribestreaming#MedicalScribeConfigurationEvent", + "traits": { + "smithy.api#documentation": "

Specify additional streaming session configurations beyond those provided in your initial start request headers. For example, specify\n channel definitions, encryption settings, and post-stream analytics settings.\n

\n

Whether you are starting a new session or resuming an existing session, \n your first event must be a MedicalScribeConfigurationEvent.\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

An encoded stream of events. The stream is encoded as HTTP/2 data frames.

\n

An input stream consists of the following types of events. The first element of the input stream must be the MedicalScribeConfigurationEvent event type.

\n
    \n
  • \n

    \n MedicalScribeConfigurationEvent\n

    \n
  • \n
  • \n

    \n MedicalScribeAudioEvent\n

    \n
  • \n
  • \n

    \n MedicalScribeSessionControlEvent\n

    \n
  • \n
", + "smithy.api#streaming": {} + } + }, + "com.amazonaws.transcribestreaming#MedicalScribeLanguageCode": { + "type": "enum", + "members": { + "EN_US": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "en-US" + } + } + } + }, + "com.amazonaws.transcribestreaming#MedicalScribeMediaEncoding": { + "type": "enum", + "members": { + "PCM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pcm" + } + }, + "OGG_OPUS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ogg-opus" + } + }, + "FLAC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "flac" + } + } + } + }, + "com.amazonaws.transcribestreaming#MedicalScribeMediaSampleRateHertz": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 16000, + "max": 48000 + } + } + }, + "com.amazonaws.transcribestreaming#MedicalScribeNoteTemplate": { + "type": "enum", + "members": { + "HISTORY_AND_PHYSICAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HISTORY_AND_PHYSICAL" + } + }, + "GIRPP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GIRPP" + } + }, + "DAP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DAP" + } + }, + "SIRP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SIRP" + } + }, + "BIRP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BIRP" + } + }, + "BEHAVIORAL_SOAP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BEHAVIORAL_SOAP" + } + }, + "PHYSICAL_SOAP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PHYSICAL_SOAP" + } + } + } + }, + "com.amazonaws.transcribestreaming#MedicalScribeParticipantRole": { + "type": "enum", + "members": { + "PATIENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PATIENT" + } + }, + "CLINICIAN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CLINICIAN" + } + } + } + }, + "com.amazonaws.transcribestreaming#MedicalScribePatientContext": { + "type": "structure", + "members": { + "Pronouns": { + "target": "com.amazonaws.transcribestreaming#Pronouns", + "traits": { + "smithy.api#documentation": "

The patient's preferred pronouns that the user wants to provide as a context for clinical note generation .

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Contains patient-specific information.

" + } + }, + "com.amazonaws.transcribestreaming#MedicalScribePostStreamAnalyticsResult": { + "type": "structure", + "members": { + "ClinicalNoteGenerationResult": { + "target": "com.amazonaws.transcribestreaming#ClinicalNoteGenerationResult", + "traits": { + "smithy.api#documentation": "

Provides the Clinical Note Generation result for post-stream analytics.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Contains details for the result of post-stream analytics.\n

" + } + }, + "com.amazonaws.transcribestreaming#MedicalScribePostStreamAnalyticsSettings": { + "type": "structure", + "members": { + "ClinicalNoteGenerationSettings": { + "target": "com.amazonaws.transcribestreaming#ClinicalNoteGenerationSettings", + "traits": { + "smithy.api#documentation": "

Specify settings for the post-stream clinical note generation.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The settings for post-stream analytics.\n

" + } + }, + "com.amazonaws.transcribestreaming#MedicalScribeResultStream": { + "type": "union", + "members": { + "TranscriptEvent": { + "target": "com.amazonaws.transcribestreaming#MedicalScribeTranscriptEvent", + "traits": { + "smithy.api#documentation": "

The transcript event that contains real-time transcription results.\n

" + } + }, + "BadRequestException": { + "target": "com.amazonaws.transcribestreaming#BadRequestException" + }, + "LimitExceededException": { + "target": "com.amazonaws.transcribestreaming#LimitExceededException" + }, + "InternalFailureException": { + "target": "com.amazonaws.transcribestreaming#InternalFailureException" + }, + "ConflictException": { + "target": "com.amazonaws.transcribestreaming#ConflictException" + }, + "ServiceUnavailableException": { + "target": "com.amazonaws.transcribestreaming#ServiceUnavailableException" + } + }, + "traits": { + "smithy.api#documentation": "

Result stream where you will receive the output events.\n The details are provided in the MedicalScribeTranscriptEvent object.\n

", + "smithy.api#streaming": {} + } + }, + "com.amazonaws.transcribestreaming#MedicalScribeSessionControlEvent": { + "type": "structure", + "members": { + "Type": { + "target": "com.amazonaws.transcribestreaming#MedicalScribeSessionControlEventType", + "traits": { + "smithy.api#documentation": "

The type of MedicalScribeSessionControlEvent.\n

\n

Possible Values:

\n
    \n
  • \n

    \n END_OF_SESSION - Indicates the audio streaming is complete. After you\n send an END_OF_SESSION event, Amazon Web Services HealthScribe starts the post-stream analytics.\n The session can't be resumed after this event is sent. After Amazon Web Services HealthScribe processes the event, the real-time StreamStatus is COMPLETED.\n You get the StreamStatus and other stream details with the GetMedicalScribeStream API operation.\n For more information about different streaming statuses, see the StreamStatus description in the MedicalScribeStreamDetails. \n

    \n
  • \n
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Specify the lifecycle of your streaming session.

" + } + }, + "com.amazonaws.transcribestreaming#MedicalScribeSessionControlEventType": { + "type": "enum", + "members": { + "END_OF_SESSION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "END_OF_SESSION" + } + } + } + }, + "com.amazonaws.transcribestreaming#MedicalScribeStreamDetails": { + "type": "structure", + "members": { + "SessionId": { + "target": "com.amazonaws.transcribestreaming#SessionId", + "traits": { + "smithy.api#documentation": "

The identifier of the HealthScribe streaming session.

" + } + }, + "StreamCreatedAt": { + "target": "com.amazonaws.transcribestreaming#DateTime", + "traits": { + "smithy.api#documentation": "

The date and time when the HealthScribe streaming session was created.

" + } + }, + "StreamEndedAt": { + "target": "com.amazonaws.transcribestreaming#DateTime", + "traits": { + "smithy.api#documentation": "

The date and time when the HealthScribe streaming session was ended.

" + } + }, + "LanguageCode": { + "target": "com.amazonaws.transcribestreaming#MedicalScribeLanguageCode", + "traits": { + "smithy.api#documentation": "

The Language Code of the HealthScribe streaming session.

" + } + }, + "MediaSampleRateHertz": { + "target": "com.amazonaws.transcribestreaming#MedicalScribeMediaSampleRateHertz", + "traits": { + "smithy.api#documentation": "

The sample rate (in hertz) of the HealthScribe streaming session.

" + } + }, + "MediaEncoding": { + "target": "com.amazonaws.transcribestreaming#MedicalScribeMediaEncoding", + "traits": { + "smithy.api#documentation": "

The Media Encoding of the HealthScribe streaming session.

" + } + }, + "VocabularyName": { + "target": "com.amazonaws.transcribestreaming#VocabularyName", + "traits": { + "smithy.api#documentation": "

The vocabulary name of the HealthScribe streaming session.

" + } + }, + "VocabularyFilterName": { + "target": "com.amazonaws.transcribestreaming#VocabularyFilterName", + "traits": { + "smithy.api#documentation": "

The name of the vocabulary filter used for the HealthScribe streaming session .

" + } + }, + "VocabularyFilterMethod": { + "target": "com.amazonaws.transcribestreaming#MedicalScribeVocabularyFilterMethod", + "traits": { + "smithy.api#documentation": "

The method of the vocabulary filter for the HealthScribe streaming session.

" + } + }, + "ResourceAccessRoleArn": { + "target": "com.amazonaws.transcribestreaming#IamRoleArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the role used in the HealthScribe streaming session.

" + } + }, + "ChannelDefinitions": { + "target": "com.amazonaws.transcribestreaming#MedicalScribeChannelDefinitions", + "traits": { + "smithy.api#documentation": "

The Channel Definitions of the HealthScribe streaming session.

" + } + }, + "EncryptionSettings": { + "target": "com.amazonaws.transcribestreaming#MedicalScribeEncryptionSettings", + "traits": { + "smithy.api#documentation": "

The Encryption Settings of the HealthScribe streaming session.

" + } + }, + "StreamStatus": { + "target": "com.amazonaws.transcribestreaming#MedicalScribeStreamStatus", + "traits": { + "smithy.api#documentation": "

The streaming status of the HealthScribe streaming session.

\n

Possible Values:

\n
    \n
  • \n

    \n IN_PROGRESS\n

    \n
  • \n
  • \n

    \n PAUSED\n

    \n
  • \n
  • \n

    \n FAILED\n

    \n
  • \n
  • \n

    \n COMPLETED\n

    \n
  • \n
\n \n

This status is specific to real-time streaming.\n A COMPLETED status doesn't mean that the post-stream analytics is complete.\n To get status of an analytics result, check the Status field for the analytics result within the\n MedicalScribePostStreamAnalyticsResult. For example, you can view the status of the \n ClinicalNoteGenerationResult.\n

\n
" + } + }, + "PostStreamAnalyticsSettings": { + "target": "com.amazonaws.transcribestreaming#MedicalScribePostStreamAnalyticsSettings", + "traits": { + "smithy.api#documentation": "

The post-stream analytics settings of the HealthScribe streaming session.

" + } + }, + "PostStreamAnalyticsResult": { + "target": "com.amazonaws.transcribestreaming#MedicalScribePostStreamAnalyticsResult", + "traits": { + "smithy.api#documentation": "

The result of post-stream analytics for the HealthScribe streaming session.

" + } + }, + "MedicalScribeContextProvided": { + "target": "com.amazonaws.transcribestreaming#NullableBoolean", + "traits": { + "smithy.api#documentation": "

Indicates whether the MedicalScribeContext object was provided when the stream was started.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Contains details about a Amazon Web Services HealthScribe streaming session.

" + } + }, + "com.amazonaws.transcribestreaming#MedicalScribeStreamStatus": { + "type": "enum", + "members": { + "IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IN_PROGRESS" + } + }, + "PAUSED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PAUSED" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + }, + "COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COMPLETED" + } + } + } + }, + "com.amazonaws.transcribestreaming#MedicalScribeTranscriptEvent": { + "type": "structure", + "members": { + "TranscriptSegment": { + "target": "com.amazonaws.transcribestreaming#MedicalScribeTranscriptSegment", + "traits": { + "smithy.api#documentation": "

The TranscriptSegment associated with a MedicalScribeTranscriptEvent.\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The event associated with MedicalScribeResultStream.\n

\n

Contains MedicalScribeTranscriptSegment, which contains segment related information.\n

" + } + }, + "com.amazonaws.transcribestreaming#MedicalScribeTranscriptItem": { + "type": "structure", + "members": { + "BeginAudioTime": { + "target": "com.amazonaws.transcribestreaming#Double", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The start time, in milliseconds, of the transcribed item.

" + } + }, + "EndAudioTime": { + "target": "com.amazonaws.transcribestreaming#Double", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The end time, in milliseconds, of the transcribed item.

" + } + }, + "Type": { + "target": "com.amazonaws.transcribestreaming#MedicalScribeTranscriptItemType", + "traits": { + "smithy.api#documentation": "

The type of item identified. Options are: PRONUNCIATION (spoken words)\n and PUNCTUATION.\n

" + } + }, + "Confidence": { + "target": "com.amazonaws.transcribestreaming#Confidence", + "traits": { + "smithy.api#documentation": "

The confidence score associated with a word or phrase in your transcript.

\n

Confidence scores are values between 0 and 1. A larger value indicates a higher\n probability that the identified item correctly matches the item spoken in your media.\n

" + } + }, + "Content": { + "target": "com.amazonaws.transcribestreaming#String", + "traits": { + "smithy.api#documentation": "

The word, phrase or punctuation mark that was transcribed.

" + } + }, + "VocabularyFilterMatch": { + "target": "com.amazonaws.transcribestreaming#NullableBoolean", + "traits": { + "smithy.api#documentation": "

Indicates whether the specified item matches a word in the vocabulary filter included in\n your configuration event. If true, there is a vocabulary filter match.\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A word, phrase, or punctuation mark in your transcription output, along with various associated\n attributes, such as confidence score, type, and start and end times.\n

" + } + }, + "com.amazonaws.transcribestreaming#MedicalScribeTranscriptItemList": { + "type": "list", + "member": { + "target": "com.amazonaws.transcribestreaming#MedicalScribeTranscriptItem" + } + }, + "com.amazonaws.transcribestreaming#MedicalScribeTranscriptItemType": { + "type": "enum", + "members": { + "PRONUNCIATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pronunciation" + } + }, + "PUNCTUATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "punctuation" + } + } + } + }, + "com.amazonaws.transcribestreaming#MedicalScribeTranscriptSegment": { + "type": "structure", + "members": { + "SegmentId": { + "target": "com.amazonaws.transcribestreaming#String", + "traits": { + "smithy.api#documentation": "

The identifier of the segment.

" + } + }, + "BeginAudioTime": { + "target": "com.amazonaws.transcribestreaming#Double", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The start time, in milliseconds, of the segment.

" + } + }, + "EndAudioTime": { + "target": "com.amazonaws.transcribestreaming#Double", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The end time, in milliseconds, of the segment.

" + } + }, + "Content": { + "target": "com.amazonaws.transcribestreaming#String", + "traits": { + "smithy.api#documentation": "

Contains transcribed text of the segment.

" + } + }, + "Items": { + "target": "com.amazonaws.transcribestreaming#MedicalScribeTranscriptItemList", + "traits": { + "smithy.api#documentation": "

Contains words, phrases, or punctuation marks in your segment.

" + } + }, + "IsPartial": { + "target": "com.amazonaws.transcribestreaming#Boolean", + "traits": { + "smithy.api#default": false, + "smithy.api#documentation": "

Indicates if the segment is complete.

\n

If IsPartial is true, the segment is not complete.\n If IsPartial is false, the segment is complete.\n

" + } + }, + "ChannelId": { + "target": "com.amazonaws.transcribestreaming#String", + "traits": { + "smithy.api#documentation": "

Indicates which audio channel is associated with the MedicalScribeTranscriptSegment.\n

\n

If MedicalScribeChannelDefinition is not provided in the MedicalScribeConfigurationEvent,\n then this field will not be included.\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Contains a set of transcription results, along with additional information of the segment.

" + } + }, + "com.amazonaws.transcribestreaming#MedicalScribeVocabularyFilterMethod": { + "type": "enum", + "members": { + "REMOVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "remove" + } + }, + "MASK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "mask" + } + }, + "TAG": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "tag" + } + } + } + }, + "com.amazonaws.transcribestreaming#MedicalTranscript": { + "type": "structure", + "members": { + "Results": { + "target": "com.amazonaws.transcribestreaming#MedicalResultList", + "traits": { + "smithy.api#documentation": "

Contains a set of transcription results from one or more audio segments, along with \n additional information per your request parameters. This can include information relating to \n alternative transcriptions, channel identification, partial result stabilization, language \n identification, and other transcription-related data.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The MedicalTranscript associated with a \n .

\n

\n MedicalTranscript contains Results, which contains a set of \n transcription results from one or more audio segments, along with additional information per your \n request parameters.

" + } + }, + "com.amazonaws.transcribestreaming#MedicalTranscriptEvent": { + "type": "structure", + "members": { + "Transcript": { + "target": "com.amazonaws.transcribestreaming#MedicalTranscript", + "traits": { + "smithy.api#documentation": "

Contains Results, which contains a set of transcription results from one or \n more audio segments, along with additional information per your request parameters. This can\n include information relating to alternative transcriptions, channel identification, partial result \n stabilization, language identification, and other transcription-related data.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The MedicalTranscriptEvent associated with a \n MedicalTranscriptResultStream.

\n

Contains a set of transcription results from one or more audio segments, along with additional \n information per your request parameters.

" + } + }, + "com.amazonaws.transcribestreaming#MedicalTranscriptResultStream": { + "type": "union", + "members": { + "TranscriptEvent": { + "target": "com.amazonaws.transcribestreaming#MedicalTranscriptEvent", + "traits": { + "smithy.api#documentation": "

The MedicalTranscriptEvent associated with a \n MedicalTranscriptResultStream.

\n

Contains a set of transcription results from one or more audio segments, along with \n additional information per your request parameters. This can include information relating to\n alternative transcriptions, channel identification, partial result stabilization, language \n identification, and other transcription-related data.

" + } + }, + "BadRequestException": { + "target": "com.amazonaws.transcribestreaming#BadRequestException" + }, + "LimitExceededException": { + "target": "com.amazonaws.transcribestreaming#LimitExceededException" + }, + "InternalFailureException": { + "target": "com.amazonaws.transcribestreaming#InternalFailureException" + }, + "ConflictException": { + "target": "com.amazonaws.transcribestreaming#ConflictException" + }, + "ServiceUnavailableException": { + "target": "com.amazonaws.transcribestreaming#ServiceUnavailableException" + } + }, + "traits": { + "smithy.api#documentation": "

Contains detailed information about your streaming session.

", + "smithy.api#streaming": {} + } + }, + "com.amazonaws.transcribestreaming#ModelName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 200 + }, + "smithy.api#pattern": "^[0-9a-zA-Z._-]+$" + } + }, + "com.amazonaws.transcribestreaming#NonEmptyString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2000 + }, + "smithy.api#pattern": "\\S" + } + }, + "com.amazonaws.transcribestreaming#NullableBoolean": { + "type": "boolean" + }, + "com.amazonaws.transcribestreaming#NumberOfChannels": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 2 + } + } + }, + "com.amazonaws.transcribestreaming#PartialResultsStability": { + "type": "enum", + "members": { + "HIGH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "high" + } + }, + "MEDIUM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "medium" + } + }, + "LOW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "low" + } + } + } + }, + "com.amazonaws.transcribestreaming#ParticipantRole": { + "type": "enum", + "members": { + "AGENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AGENT" + } + }, + "CUSTOMER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CUSTOMER" + } + } + } + }, + "com.amazonaws.transcribestreaming#PiiEntityTypes": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 300 + }, + "smithy.api#pattern": "^[A-Z_, ]+$" + } + }, + "com.amazonaws.transcribestreaming#PointsOfInterest": { + "type": "structure", + "members": { + "TimestampRanges": { + "target": "com.amazonaws.transcribestreaming#TimestampRanges", + "traits": { + "smithy.api#documentation": "

Contains the timestamp ranges (start time through end time) of matched categories and rules.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Contains the timestamps of matched categories.

" + } + }, + "com.amazonaws.transcribestreaming#PostCallAnalyticsSettings": { + "type": "structure", + "members": { + "OutputLocation": { + "target": "com.amazonaws.transcribestreaming#String", + "traits": { + "smithy.api#documentation": "

The Amazon S3 location where you want your Call Analytics post-call \n transcription output stored. You can use any of the following formats to specify the output \n location:

\n
    \n
  1. \n

    s3://DOC-EXAMPLE-BUCKET

    \n
  2. \n
  3. \n

    s3://DOC-EXAMPLE-BUCKET/my-output-folder/

    \n
  4. \n
  5. \n

    s3://DOC-EXAMPLE-BUCKET/my-output-folder/my-call-analytics-job.json

    \n
  6. \n
", + "smithy.api#required": {} + } + }, + "DataAccessRoleArn": { + "target": "com.amazonaws.transcribestreaming#String", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of an IAM role that has permissions to\n access the Amazon S3 bucket that contains your input files. If the role that you\n specify doesn’t have the appropriate permissions to access the specified Amazon S3 \n location, your request fails.

\n

IAM role ARNs have the format\n arn:partition:iam::account:role/role-name-with-path. For example:\n arn:aws:iam::111122223333:role/Admin. For more information, see IAM\n ARNs.

", + "smithy.api#required": {} + } + }, + "ContentRedactionOutput": { + "target": "com.amazonaws.transcribestreaming#ContentRedactionOutput", + "traits": { + "smithy.api#documentation": "

Specify whether you want only a redacted transcript or both a redacted and an unredacted \n transcript. If you choose redacted and unredacted, two JSON files are generated and stored in the \n Amazon S3 output location you specify.

\n

Note that to include ContentRedactionOutput in your request, you must \n enable content redaction (ContentRedactionType).

" + } + }, + "OutputEncryptionKMSKeyId": { + "target": "com.amazonaws.transcribestreaming#String", + "traits": { + "smithy.api#documentation": "

The KMS key you want to use to encrypt your Call Analytics post-call\n output.

\n

If using a key located in the current\n Amazon Web Services account, you can specify your KMS key in one of four\n ways:

\n
    \n
  1. \n

    Use the KMS key ID itself. For example,\n 1234abcd-12ab-34cd-56ef-1234567890ab.

    \n
  2. \n
  3. \n

    Use an alias for the KMS key ID. For example,\n alias/ExampleAlias.

    \n
  4. \n
  5. \n

    Use the Amazon Resource Name (ARN) for the KMS key ID. For\n example,\n arn:aws:kms:region:account-ID:key/1234abcd-12ab-34cd-56ef-1234567890ab.

    \n
  6. \n
  7. \n

    Use the ARN for the KMS key alias. For example,\n arn:aws:kms:region:account-ID:alias/ExampleAlias.

    \n
  8. \n
\n

If using a key located in a different\n Amazon Web Services account than the current Amazon Web Services account, you can specify\n your KMS key in one of two ways:

\n
    \n
  1. \n

    Use the ARN for the KMS key ID. For example,\n arn:aws:kms:region:account-ID:key/1234abcd-12ab-34cd-56ef-1234567890ab.

    \n
  2. \n
  3. \n

    Use the ARN for the KMS key alias. For example,\n arn:aws:kms:region:account-ID:alias/ExampleAlias.

    \n
  4. \n
\n

Note that the role making the \n request must have permission to use the specified KMS key.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Allows you to specify additional settings for your Call Analytics post-call request, \n including output locations for your redacted transcript, which IAM role to use, \n and which encryption key to use.

\n

\n DataAccessRoleArn and OutputLocation are required \n fields.

\n

\n PostCallAnalyticsSettings provides you with the same insights as a \n Call Analytics post-call transcription. Refer to Post-call analytics for more information \n on this feature.

" + } + }, + "com.amazonaws.transcribestreaming#Pronouns": { + "type": "enum", + "members": { + "HE_HIM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HE_HIM" + } + }, + "SHE_HER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SHE_HER" + } + }, + "THEY_THEM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "THEY_THEM" + } + } + }, + "traits": { + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.transcribestreaming#RequestId": { + "type": "string" + }, + "com.amazonaws.transcribestreaming#ResourceNotFoundException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.transcribestreaming#String" + } + }, + "traits": { + "smithy.api#documentation": "

The request references a resource which doesn't exist.

", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, + "com.amazonaws.transcribestreaming#Result": { + "type": "structure", + "members": { + "ResultId": { + "target": "com.amazonaws.transcribestreaming#String", + "traits": { + "smithy.api#documentation": "

Provides a unique identifier for the Result.

" + } + }, + "StartTime": { + "target": "com.amazonaws.transcribestreaming#Double", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The start time of the Result in seconds, with millisecond precision (e.g., 1.056).

" + } + }, + "EndTime": { + "target": "com.amazonaws.transcribestreaming#Double", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The end time of the Result in seconds, with millisecond precision (e.g., 1.056).

" + } + }, + "IsPartial": { + "target": "com.amazonaws.transcribestreaming#Boolean", + "traits": { + "smithy.api#default": false, + "smithy.api#documentation": "

Indicates if the segment is complete.

\n

If IsPartial is true, the segment is not complete. If\n IsPartial is false, the segment is complete.

" + } + }, + "Alternatives": { + "target": "com.amazonaws.transcribestreaming#AlternativeList", + "traits": { + "smithy.api#documentation": "

A list of possible alternative transcriptions for the input audio. Each alternative may contain\n one or more of Items, Entities, or Transcript.

" + } + }, + "ChannelId": { + "target": "com.amazonaws.transcribestreaming#String", + "traits": { + "smithy.api#documentation": "

Indicates which audio channel is associated with the Result.

" + } + }, + "LanguageCode": { + "target": "com.amazonaws.transcribestreaming#LanguageCode", + "traits": { + "smithy.api#documentation": "

The language code that represents the language spoken in your audio stream.

" + } + }, + "LanguageIdentification": { + "target": "com.amazonaws.transcribestreaming#LanguageIdentification", + "traits": { + "smithy.api#documentation": "

The language code of the dominant language identified in your stream.

\n

If you enabled channel identification and each channel of your audio contains a different language,\n you may have more than one result.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The Result associated with a \n .

\n

Contains a set of transcription results from one or more audio segments, along with additional \n information per your request parameters. This can include information relating to alternative\n transcriptions, channel identification, partial result stabilization, language identification, and other\n transcription-related data.

" + } + }, + "com.amazonaws.transcribestreaming#ResultList": { + "type": "list", + "member": { + "target": "com.amazonaws.transcribestreaming#Result" + } + }, + "com.amazonaws.transcribestreaming#Sentiment": { + "type": "enum", + "members": { + "POSITIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "POSITIVE" + } + }, + "NEGATIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEGATIVE" + } + }, + "MIXED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MIXED" + } + }, + "NEUTRAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEUTRAL" + } + } + } + }, + "com.amazonaws.transcribestreaming#ServiceUnavailableException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.transcribestreaming#String" + } + }, + "traits": { + "smithy.api#documentation": "

The service is currently unavailable. Try your request later.

", + "smithy.api#error": "server", + "smithy.api#httpError": 503 + } + }, + "com.amazonaws.transcribestreaming#SessionId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 36, + "max": 36 + }, + "smithy.api#pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" + } + }, + "com.amazonaws.transcribestreaming#Specialty": { + "type": "enum", + "members": { + "PRIMARYCARE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PRIMARYCARE" + } + }, + "CARDIOLOGY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CARDIOLOGY" + } + }, + "NEUROLOGY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEUROLOGY" + } + }, + "ONCOLOGY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ONCOLOGY" + } + }, + "RADIOLOGY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RADIOLOGY" + } + }, + "UROLOGY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UROLOGY" + } + } + } + }, + "com.amazonaws.transcribestreaming#Stable": { + "type": "boolean" + }, + "com.amazonaws.transcribestreaming#StartCallAnalyticsStreamTranscription": { + "type": "operation", + "input": { + "target": "com.amazonaws.transcribestreaming#StartCallAnalyticsStreamTranscriptionRequest" + }, + "output": { + "target": "com.amazonaws.transcribestreaming#StartCallAnalyticsStreamTranscriptionResponse" + }, + "errors": [ + { + "target": "com.amazonaws.transcribestreaming#BadRequestException" + }, + { + "target": "com.amazonaws.transcribestreaming#ConflictException" + }, + { + "target": "com.amazonaws.transcribestreaming#InternalFailureException" + }, + { + "target": "com.amazonaws.transcribestreaming#LimitExceededException" + }, + { + "target": "com.amazonaws.transcribestreaming#ServiceUnavailableException" + } + ], + "traits": { + "smithy.api#documentation": "

Starts a bidirectional HTTP/2 or WebSocket stream where audio is streamed to \n Amazon Transcribe and the transcription results are streamed to your application. Use this operation\n for Call Analytics transcriptions.

\n

The following parameters are required:

\n
    \n
  • \n

    \n language-code or identify-language\n

    \n
  • \n
  • \n

    \n media-encoding\n

    \n
  • \n
  • \n

    \n sample-rate\n

    \n
  • \n
\n

For more information on streaming with Amazon Transcribe, see Transcribing streaming audio.

", + "smithy.api#http": { + "method": "POST", + "uri": "/call-analytics-stream-transcription", + "code": 200 + } + } + }, + "com.amazonaws.transcribestreaming#StartCallAnalyticsStreamTranscriptionRequest": { + "type": "structure", + "members": { + "LanguageCode": { + "target": "com.amazonaws.transcribestreaming#CallAnalyticsLanguageCode", + "traits": { + "smithy.api#documentation": "

Specify the language code that represents the language spoken in your audio.

\n

For a list of languages supported with real-time Call Analytics, refer to the \n Supported \n languages table.

", + "smithy.api#httpHeader": "x-amzn-transcribe-language-code" + } + }, + "MediaSampleRateHertz": { + "target": "com.amazonaws.transcribestreaming#MediaSampleRateHertz", + "traits": { + "smithy.api#documentation": "

The sample rate of the input audio (in hertz). Low-quality audio, such as telephone audio,\n is typically around 8,000 Hz. High-quality audio typically ranges from 16,000 Hz to 48,000 Hz.\n Note that the sample rate you specify must match that of your audio.

", + "smithy.api#httpHeader": "x-amzn-transcribe-sample-rate", + "smithy.api#required": {} + } + }, + "MediaEncoding": { + "target": "com.amazonaws.transcribestreaming#MediaEncoding", + "traits": { + "smithy.api#documentation": "

Specify the encoding of your input audio. Supported formats are:

\n
    \n
  • \n

    FLAC

    \n
  • \n
  • \n

    OPUS-encoded audio in an Ogg container

    \n
  • \n
  • \n

    PCM (only signed 16-bit little-endian audio formats, which does not include WAV)

    \n
  • \n
\n

For more information, see Media formats.

", + "smithy.api#httpHeader": "x-amzn-transcribe-media-encoding", + "smithy.api#required": {} + } + }, + "VocabularyName": { + "target": "com.amazonaws.transcribestreaming#VocabularyName", + "traits": { + "smithy.api#documentation": "

Specify the name of the custom vocabulary that you want to use when processing your\n transcription. Note that vocabulary names are case sensitive.

\n

If the language of the specified custom vocabulary doesn't match the language identified in\n your media, the custom vocabulary is not applied to your transcription.

\n

For more information, see Custom vocabularies.

", + "smithy.api#httpHeader": "x-amzn-transcribe-vocabulary-name" + } + }, + "SessionId": { + "target": "com.amazonaws.transcribestreaming#SessionId", + "traits": { + "smithy.api#documentation": "

Specify a name for your Call Analytics transcription session. If you don't include this parameter\n in your request, Amazon Transcribe generates an ID and returns it in the response.

", + "smithy.api#httpHeader": "x-amzn-transcribe-session-id" + } + }, + "AudioStream": { + "target": "com.amazonaws.transcribestreaming#AudioStream", + "traits": { + "smithy.api#documentation": "

An encoded stream of audio blobs. Audio streams are encoded as either HTTP/2 or WebSocket \n data frames.

\n

For more information, see Transcribing streaming audio.

", + "smithy.api#httpPayload": {}, + "smithy.api#required": {} + } + }, + "VocabularyFilterName": { + "target": "com.amazonaws.transcribestreaming#VocabularyFilterName", + "traits": { + "smithy.api#documentation": "

Specify the name of the custom vocabulary filter that you want to use when processing your\n transcription. Note that vocabulary filter names are case sensitive.

\n

If the language of the specified custom vocabulary filter doesn't match the language identified in\n your media, the vocabulary filter is not applied to your transcription.

\n

For more information, see Using vocabulary filtering with unwanted \n words.

", + "smithy.api#httpHeader": "x-amzn-transcribe-vocabulary-filter-name" + } + }, + "VocabularyFilterMethod": { + "target": "com.amazonaws.transcribestreaming#VocabularyFilterMethod", + "traits": { + "smithy.api#documentation": "

Specify how you want your vocabulary filter applied to your transcript.

\n

To replace words with ***, choose mask.

\n

To delete words, choose remove.

\n

To flag words without changing them, choose tag.

", + "smithy.api#httpHeader": "x-amzn-transcribe-vocabulary-filter-method" + } + }, + "LanguageModelName": { + "target": "com.amazonaws.transcribestreaming#ModelName", + "traits": { + "smithy.api#documentation": "

Specify the name of the custom language model that you want to use when processing your\n transcription. Note that language model names are case sensitive.

\n

The language of the specified language model must match the language code you specify\n in your transcription request. If the languages don't match, the custom language model isn't applied. \n There are no errors or warnings associated with a language mismatch.

\n

For more information, see Custom language models.

", + "smithy.api#httpHeader": "x-amzn-transcribe-language-model-name" + } + }, + "IdentifyLanguage": { + "target": "com.amazonaws.transcribestreaming#Boolean", + "traits": { + "smithy.api#default": false, + "smithy.api#documentation": "

Enables automatic language identification for your Call Analytics transcription.

\n

If you include IdentifyLanguage, you must include a list of\n language codes, using LanguageOptions, that you think may be present in \n your audio stream. You must provide a minimum of two language selections.

\n

You can also include a preferred language using PreferredLanguage. Adding a \n preferred language can help Amazon Transcribe identify the language faster than if you omit this \n parameter.

\n

Note that you must include either LanguageCode or \n IdentifyLanguage in your request. If you include both parameters, your transcription job\n fails.

", + "smithy.api#httpHeader": "x-amzn-transcribe-identify-language" + } + }, + "LanguageOptions": { + "target": "com.amazonaws.transcribestreaming#LanguageOptions", + "traits": { + "smithy.api#documentation": "

Specify two or more language codes that represent the languages you think may be present \n in your media.

\n

Including language options can improve the accuracy of language identification.

\n

If you include LanguageOptions in your request, you must also include \n IdentifyLanguage.

\n

For a list of languages supported with Call Analytics streaming, refer to the \n Supported \n languages table.

\n \n

You can only include one language dialect per language per stream. For example, you\n cannot include en-US and en-AU in the same request.

\n
", + "smithy.api#httpHeader": "x-amzn-transcribe-language-options" + } + }, + "PreferredLanguage": { + "target": "com.amazonaws.transcribestreaming#CallAnalyticsLanguageCode", + "traits": { + "smithy.api#documentation": "

Specify a preferred language from the subset of languages codes you specified in \n LanguageOptions.

\n

You can only use this parameter if you've included IdentifyLanguage and\n LanguageOptions in your request.

", + "smithy.api#httpHeader": "x-amzn-transcribe-preferred-language" + } + }, + "VocabularyNames": { + "target": "com.amazonaws.transcribestreaming#VocabularyNames", + "traits": { + "smithy.api#documentation": "

Specify the names of the custom vocabularies that you want to use when processing your\n Call Analytics transcription. Note that vocabulary names are case sensitive.

\n

If the custom vocabulary's language doesn't match the identified media language, it won't be applied to the transcription.

\n \n

This parameter is only intended for use with the\n IdentifyLanguage parameter. If you're not\n including IdentifyLanguage in your request and want to use a custom vocabulary\n with your transcription, use the VocabularyName parameter instead.

\n
\n

For more information, see Custom vocabularies.

", + "smithy.api#httpHeader": "x-amzn-transcribe-vocabulary-names" + } + }, + "VocabularyFilterNames": { + "target": "com.amazonaws.transcribestreaming#VocabularyFilterNames", + "traits": { + "smithy.api#documentation": "

Specify the names of the custom vocabulary filters that you want to use when processing\n your Call Analytics transcription. Note that vocabulary filter names are case sensitive.

\n

These filters serve to customize the transcript output.

\n \n

This parameter is only intended for use with \n the IdentifyLanguage parameter. If you're not \n including IdentifyLanguage in your request and want to use a custom vocabulary filter \n with your transcription, use the VocabularyFilterName parameter instead.

\n
\n

For more information, see Using vocabulary filtering with unwanted \n words.

", + "smithy.api#httpHeader": "x-amzn-transcribe-vocabulary-filter-names" + } + }, + "EnablePartialResultsStabilization": { + "target": "com.amazonaws.transcribestreaming#Boolean", + "traits": { + "smithy.api#default": false, + "smithy.api#documentation": "

Enables partial result stabilization for your transcription. Partial result stabilization can reduce\n latency in your output, but may impact accuracy. For more information, see \n Partial-result \n stabilization.

", + "smithy.api#httpHeader": "x-amzn-transcribe-enable-partial-results-stabilization" + } + }, + "PartialResultsStability": { + "target": "com.amazonaws.transcribestreaming#PartialResultsStability", + "traits": { + "smithy.api#documentation": "

Specify the level of stability to use when you enable partial results stabilization \n (EnablePartialResultsStabilization).

\n

Low stability provides the highest accuracy. High stability transcribes faster, but with slightly\n lower accuracy.

\n

For more information, see Partial-result \n stabilization.

", + "smithy.api#httpHeader": "x-amzn-transcribe-partial-results-stability" + } + }, + "ContentIdentificationType": { + "target": "com.amazonaws.transcribestreaming#ContentIdentificationType", + "traits": { + "smithy.api#documentation": "

Labels all personally identifiable information (PII) identified in your transcript.

\n

Content identification is performed at the segment level; PII specified in \n PiiEntityTypes is flagged upon complete transcription of an audio segment. If you don't\n include PiiEntityTypes in your request, all PII is identified.

\n

You can’t set ContentIdentificationType and ContentRedactionType\n in the same request. If you set both, your request returns a\n BadRequestException.

\n

For more information, see Redacting or identifying personally identifiable\n information.

", + "smithy.api#httpHeader": "x-amzn-transcribe-content-identification-type" + } + }, + "ContentRedactionType": { + "target": "com.amazonaws.transcribestreaming#ContentRedactionType", + "traits": { + "smithy.api#documentation": "

Redacts all personally identifiable information (PII) identified in your transcript.

\n

Content redaction is performed at the segment level; PII specified in \n PiiEntityTypes is redacted upon complete transcription of an audio segment. If you don't\n include PiiEntityTypes in your request, all PII is redacted.

\n

You can’t set ContentRedactionType and ContentIdentificationType\n in the same request. If you set both, your request returns a BadRequestException.

\n

For more information, see Redacting or identifying personally identifiable\n information.

", + "smithy.api#httpHeader": "x-amzn-transcribe-content-redaction-type" + } + }, + "PiiEntityTypes": { + "target": "com.amazonaws.transcribestreaming#PiiEntityTypes", + "traits": { + "smithy.api#documentation": "

Specify which types of personally identifiable information (PII) you want to redact in your \n transcript. You can include as many types as you'd like, or you can select \n ALL.

\n

Values must be comma-separated and can include: ADDRESS, \n BANK_ACCOUNT_NUMBER, BANK_ROUTING,\n CREDIT_DEBIT_CVV, CREDIT_DEBIT_EXPIRY,\n CREDIT_DEBIT_NUMBER, EMAIL, \n NAME, PHONE, PIN, \n SSN, or ALL.

\n

Note that if you include PiiEntityTypes in your request, you must also include \n ContentIdentificationType or ContentRedactionType.

\n

If you include ContentRedactionType or \n ContentIdentificationType in your request, but do not include \n PiiEntityTypes, all PII is redacted or identified.

", + "smithy.api#httpHeader": "x-amzn-transcribe-pii-entity-types" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.transcribestreaming#StartCallAnalyticsStreamTranscriptionResponse": { + "type": "structure", + "members": { + "RequestId": { + "target": "com.amazonaws.transcribestreaming#RequestId", + "traits": { + "smithy.api#documentation": "

Provides the identifier for your real-time Call Analytics request.

", + "smithy.api#httpHeader": "x-amzn-request-id" + } + }, + "LanguageCode": { + "target": "com.amazonaws.transcribestreaming#CallAnalyticsLanguageCode", + "traits": { + "smithy.api#documentation": "

Provides the language code that you specified in your Call Analytics request.

", + "smithy.api#httpHeader": "x-amzn-transcribe-language-code" + } + }, + "MediaSampleRateHertz": { + "target": "com.amazonaws.transcribestreaming#MediaSampleRateHertz", + "traits": { + "smithy.api#documentation": "

Provides the sample rate that you specified in your Call Analytics request.

", + "smithy.api#httpHeader": "x-amzn-transcribe-sample-rate" + } + }, + "MediaEncoding": { + "target": "com.amazonaws.transcribestreaming#MediaEncoding", + "traits": { + "smithy.api#documentation": "

Provides the media encoding you specified in your Call Analytics request.

", + "smithy.api#httpHeader": "x-amzn-transcribe-media-encoding" + } + }, + "VocabularyName": { + "target": "com.amazonaws.transcribestreaming#VocabularyName", + "traits": { + "smithy.api#documentation": "

Provides the name of the custom vocabulary that you specified in your Call Analytics request.

", + "smithy.api#httpHeader": "x-amzn-transcribe-vocabulary-name" + } + }, + "SessionId": { + "target": "com.amazonaws.transcribestreaming#SessionId", + "traits": { + "smithy.api#documentation": "

Provides the identifier for your Call Analytics transcription session.

", + "smithy.api#httpHeader": "x-amzn-transcribe-session-id" + } + }, + "CallAnalyticsTranscriptResultStream": { + "target": "com.amazonaws.transcribestreaming#CallAnalyticsTranscriptResultStream", + "traits": { + "smithy.api#documentation": "

Provides detailed information about your real-time Call Analytics session.

", + "smithy.api#httpPayload": {} + } + }, + "VocabularyFilterName": { + "target": "com.amazonaws.transcribestreaming#VocabularyFilterName", + "traits": { + "smithy.api#documentation": "

Provides the name of the custom vocabulary filter that you specified in your Call Analytics\n request.

", + "smithy.api#httpHeader": "x-amzn-transcribe-vocabulary-filter-name" + } + }, + "VocabularyFilterMethod": { + "target": "com.amazonaws.transcribestreaming#VocabularyFilterMethod", + "traits": { + "smithy.api#documentation": "

Provides the vocabulary filtering method used in your Call Analytics transcription.

", + "smithy.api#httpHeader": "x-amzn-transcribe-vocabulary-filter-method" + } + }, + "LanguageModelName": { + "target": "com.amazonaws.transcribestreaming#ModelName", + "traits": { + "smithy.api#documentation": "

Provides the name of the custom language model that you specified in your Call Analytics \n request.

", + "smithy.api#httpHeader": "x-amzn-transcribe-language-model-name" + } + }, + "IdentifyLanguage": { + "target": "com.amazonaws.transcribestreaming#Boolean", + "traits": { + "smithy.api#default": false, + "smithy.api#documentation": "

Shows whether automatic language identification was enabled for your Call Analytics transcription.

", + "smithy.api#httpHeader": "x-amzn-transcribe-identify-language" + } + }, + "LanguageOptions": { + "target": "com.amazonaws.transcribestreaming#LanguageOptions", + "traits": { + "smithy.api#documentation": "

Provides the language codes that you specified in your Call Analytics request.

", + "smithy.api#httpHeader": "x-amzn-transcribe-language-options" + } + }, + "PreferredLanguage": { + "target": "com.amazonaws.transcribestreaming#CallAnalyticsLanguageCode", + "traits": { + "smithy.api#documentation": "

Provides the preferred language that you specified in your Call Analytics request.

", + "smithy.api#httpHeader": "x-amzn-transcribe-preferred-language" + } + }, + "VocabularyNames": { + "target": "com.amazonaws.transcribestreaming#VocabularyNames", + "traits": { + "smithy.api#documentation": "

Provides the names of the custom vocabularies that you specified in your Call Analytics request.

", + "smithy.api#httpHeader": "x-amzn-transcribe-vocabulary-names" + } + }, + "VocabularyFilterNames": { + "target": "com.amazonaws.transcribestreaming#VocabularyFilterNames", + "traits": { + "smithy.api#documentation": "

Provides the names of the custom vocabulary filters that you specified in your Call Analytics request.

", + "smithy.api#httpHeader": "x-amzn-transcribe-vocabulary-filter-names" + } + }, + "EnablePartialResultsStabilization": { + "target": "com.amazonaws.transcribestreaming#Boolean", + "traits": { + "smithy.api#default": false, + "smithy.api#documentation": "

Shows whether partial results stabilization was enabled for your Call Analytics transcription.

", + "smithy.api#httpHeader": "x-amzn-transcribe-enable-partial-results-stabilization" + } + }, + "PartialResultsStability": { + "target": "com.amazonaws.transcribestreaming#PartialResultsStability", + "traits": { + "smithy.api#documentation": "

Provides the stabilization level used for your transcription.

", + "smithy.api#httpHeader": "x-amzn-transcribe-partial-results-stability" + } + }, + "ContentIdentificationType": { + "target": "com.amazonaws.transcribestreaming#ContentIdentificationType", + "traits": { + "smithy.api#documentation": "

Shows whether content identification was enabled for your Call Analytics transcription.

", + "smithy.api#httpHeader": "x-amzn-transcribe-content-identification-type" + } + }, + "ContentRedactionType": { + "target": "com.amazonaws.transcribestreaming#ContentRedactionType", + "traits": { + "smithy.api#documentation": "

Shows whether content redaction was enabled for your Call Analytics transcription.

", + "smithy.api#httpHeader": "x-amzn-transcribe-content-redaction-type" + } + }, + "PiiEntityTypes": { + "target": "com.amazonaws.transcribestreaming#PiiEntityTypes", + "traits": { + "smithy.api#documentation": "

Lists the PII entity types you specified in your Call Analytics request.

", + "smithy.api#httpHeader": "x-amzn-transcribe-pii-entity-types" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.transcribestreaming#StartMedicalScribeStream": { + "type": "operation", + "input": { + "target": "com.amazonaws.transcribestreaming#StartMedicalScribeStreamRequest" + }, + "output": { + "target": "com.amazonaws.transcribestreaming#StartMedicalScribeStreamResponse" + }, + "errors": [ + { + "target": "com.amazonaws.transcribestreaming#BadRequestException" + }, + { + "target": "com.amazonaws.transcribestreaming#ConflictException" + }, + { + "target": "com.amazonaws.transcribestreaming#InternalFailureException" + }, + { + "target": "com.amazonaws.transcribestreaming#LimitExceededException" + }, + { + "target": "com.amazonaws.transcribestreaming#ServiceUnavailableException" + } + ], + "traits": { + "smithy.api#documentation": "

Starts a bidirectional HTTP/2 stream, where audio is streamed to\n Amazon Web Services HealthScribe\n and the transcription results are streamed to your application.

\n

When you start a stream, you first specify the stream configuration in a MedicalScribeConfigurationEvent. \n This event includes channel definitions, encryption settings, medical scribe context, and post-stream analytics settings, such as the output configuration for aggregated transcript and clinical note generation. These are additional\n streaming session configurations beyond those provided in your initial start request headers. Whether you are starting a new session or resuming an existing session, \n your first event must be a MedicalScribeConfigurationEvent.

\n

\n After you send a MedicalScribeConfigurationEvent, you start AudioEvents and Amazon Web Services HealthScribe \n responds with real-time transcription results. When you are finished, to start processing the results with the post-stream analytics, send a MedicalScribeSessionControlEvent with a Type of \n END_OF_SESSION and Amazon Web Services HealthScribe starts the analytics.\n

\n

You can pause or resume streaming.\n To pause streaming, complete the input stream without sending the\n MedicalScribeSessionControlEvent.\n To resume streaming, call the StartMedicalScribeStream and specify the same SessionId you used to start the stream.\n

\n

The following parameters are required:

\n
    \n
  • \n

    \n language-code\n

    \n
  • \n
  • \n

    \n media-encoding\n

    \n
  • \n
  • \n

    \n media-sample-rate-hertz\n

    \n
  • \n
\n

\n

For more information on streaming with\n Amazon Web Services HealthScribe,\n see Amazon Web Services HealthScribe.\n

", + "smithy.api#http": { + "method": "POST", + "uri": "/medical-scribe-stream", + "code": 200 + } + } + }, + "com.amazonaws.transcribestreaming#StartMedicalScribeStreamRequest": { + "type": "structure", + "members": { + "SessionId": { + "target": "com.amazonaws.transcribestreaming#SessionId", + "traits": { + "smithy.api#documentation": "

Specify an identifier for your streaming session (in UUID format).\n If you don't include a SessionId in your request,\n Amazon Web Services HealthScribe generates an ID and returns it in the response.\n

", + "smithy.api#httpHeader": "x-amzn-transcribe-session-id" + } + }, + "LanguageCode": { + "target": "com.amazonaws.transcribestreaming#MedicalScribeLanguageCode", + "traits": { + "smithy.api#documentation": "

Specify the language code for your HealthScribe streaming session.

", + "smithy.api#httpHeader": "x-amzn-transcribe-language-code", + "smithy.api#required": {} + } + }, + "MediaSampleRateHertz": { + "target": "com.amazonaws.transcribestreaming#MedicalScribeMediaSampleRateHertz", + "traits": { + "smithy.api#documentation": "

Specify the sample rate of the input audio (in hertz).\n Amazon Web Services HealthScribe supports a range from 16,000 Hz to 48,000 Hz.\n The sample rate you specify must match that of your audio.\n

", + "smithy.api#httpHeader": "x-amzn-transcribe-sample-rate", + "smithy.api#required": {} + } + }, + "MediaEncoding": { + "target": "com.amazonaws.transcribestreaming#MedicalScribeMediaEncoding", + "traits": { + "smithy.api#documentation": "

Specify the encoding used for the input audio.

\n

Supported formats are:

\n
    \n
  • \n

    FLAC

    \n
  • \n
  • \n

    OPUS-encoded audio in an Ogg container

    \n
  • \n
  • \n

    PCM (only signed 16-bit little-endian audio formats, which does not include\n WAV)\n

    \n
  • \n
\n

For more information, see Media\n formats.\n

", + "smithy.api#httpHeader": "x-amzn-transcribe-media-encoding", + "smithy.api#required": {} + } + }, + "InputStream": { + "target": "com.amazonaws.transcribestreaming#MedicalScribeInputStream", + "traits": { + "smithy.api#documentation": "

Specify the input stream where you will send events in real time.

\n

The first element of the input stream must be a MedicalScribeConfigurationEvent.\n

", + "smithy.api#httpPayload": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.transcribestreaming#StartMedicalScribeStreamResponse": { + "type": "structure", + "members": { + "SessionId": { + "target": "com.amazonaws.transcribestreaming#SessionId", + "traits": { + "smithy.api#documentation": "

The identifier (in UUID format) for your streaming session.

\n

If you already started streaming, this is same ID as the one you specified in your initial StartMedicalScribeStreamRequest.\n

", + "smithy.api#httpHeader": "x-amzn-transcribe-session-id" + } + }, + "RequestId": { + "target": "com.amazonaws.transcribestreaming#RequestId", + "traits": { + "smithy.api#documentation": "

The unique identifier for your streaming request.\n

", + "smithy.api#httpHeader": "x-amzn-request-id" + } + }, + "LanguageCode": { + "target": "com.amazonaws.transcribestreaming#MedicalScribeLanguageCode", + "traits": { + "smithy.api#documentation": "

The Language Code that you specified in your request.\n Same as provided in the StartMedicalScribeStreamRequest.\n

", + "smithy.api#httpHeader": "x-amzn-transcribe-language-code" + } + }, + "MediaSampleRateHertz": { + "target": "com.amazonaws.transcribestreaming#MedicalScribeMediaSampleRateHertz", + "traits": { + "smithy.api#documentation": "

The sample rate (in hertz) that you specified in your request.\n Same as provided in the\n StartMedicalScribeStreamRequest\n

", + "smithy.api#httpHeader": "x-amzn-transcribe-sample-rate" + } + }, + "MediaEncoding": { + "target": "com.amazonaws.transcribestreaming#MedicalScribeMediaEncoding", + "traits": { + "smithy.api#documentation": "

The Media Encoding you specified in your request.\n Same as provided in the\n StartMedicalScribeStreamRequest\n

", + "smithy.api#httpHeader": "x-amzn-transcribe-media-encoding" + } + }, + "ResultStream": { + "target": "com.amazonaws.transcribestreaming#MedicalScribeResultStream", + "traits": { + "smithy.api#documentation": "

The result stream where you will receive the output events.\n

", + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.transcribestreaming#StartMedicalStreamTranscription": { + "type": "operation", + "input": { + "target": "com.amazonaws.transcribestreaming#StartMedicalStreamTranscriptionRequest" + }, + "output": { + "target": "com.amazonaws.transcribestreaming#StartMedicalStreamTranscriptionResponse" + }, + "errors": [ + { + "target": "com.amazonaws.transcribestreaming#BadRequestException" + }, + { + "target": "com.amazonaws.transcribestreaming#ConflictException" + }, + { + "target": "com.amazonaws.transcribestreaming#InternalFailureException" + }, + { + "target": "com.amazonaws.transcribestreaming#LimitExceededException" + }, + { + "target": "com.amazonaws.transcribestreaming#ServiceUnavailableException" + } + ], + "traits": { + "smithy.api#documentation": "

Starts a bidirectional HTTP/2 or WebSocket stream where audio is streamed to \n Amazon Transcribe Medical and the transcription results are streamed to your\n application.

\n

The following parameters are required:

\n
    \n
  • \n

    \n language-code\n

    \n
  • \n
  • \n

    \n media-encoding\n

    \n
  • \n
  • \n

    \n sample-rate\n

    \n
  • \n
\n

For more information on streaming with Amazon Transcribe Medical, see \n Transcribing\n streaming audio.

", + "smithy.api#http": { + "method": "POST", + "uri": "/medical-stream-transcription", + "code": 200 + } + } + }, + "com.amazonaws.transcribestreaming#StartMedicalStreamTranscriptionRequest": { + "type": "structure", + "members": { + "LanguageCode": { + "target": "com.amazonaws.transcribestreaming#LanguageCode", + "traits": { + "smithy.api#documentation": "

Specify the language code that represents the language spoken in your audio.

\n \n

Amazon Transcribe Medical only supports US English (en-US).

\n
", + "smithy.api#httpHeader": "x-amzn-transcribe-language-code", + "smithy.api#required": {} + } + }, + "MediaSampleRateHertz": { + "target": "com.amazonaws.transcribestreaming#MediaSampleRateHertz", + "traits": { + "smithy.api#documentation": "

The sample rate of the input audio (in hertz). Amazon Transcribe Medical supports a\n range from 16,000 Hz to 48,000 Hz. Note that the sample rate you specify must match that\n of your audio.

", + "smithy.api#httpHeader": "x-amzn-transcribe-sample-rate", + "smithy.api#required": {} + } + }, + "MediaEncoding": { + "target": "com.amazonaws.transcribestreaming#MediaEncoding", + "traits": { + "smithy.api#documentation": "

Specify the encoding used for the input audio. Supported formats are:

\n
    \n
  • \n

    FLAC

    \n
  • \n
  • \n

    OPUS-encoded audio in an Ogg container

    \n
  • \n
  • \n

    PCM (only signed 16-bit little-endian audio formats, which does not include\n WAV)

    \n
  • \n
\n

For more information, see Media formats.

", + "smithy.api#httpHeader": "x-amzn-transcribe-media-encoding", + "smithy.api#required": {} + } + }, + "VocabularyName": { + "target": "com.amazonaws.transcribestreaming#VocabularyName", + "traits": { + "smithy.api#documentation": "

Specify the name of the custom vocabulary that you want to use when processing your\n transcription. Note that vocabulary names are case sensitive.

", + "smithy.api#httpHeader": "x-amzn-transcribe-vocabulary-name" + } + }, + "Specialty": { + "target": "com.amazonaws.transcribestreaming#Specialty", + "traits": { + "smithy.api#documentation": "

Specify the medical specialty contained in your audio.

", + "smithy.api#httpHeader": "x-amzn-transcribe-specialty", + "smithy.api#required": {} + } + }, + "Type": { + "target": "com.amazonaws.transcribestreaming#Type", + "traits": { + "smithy.api#documentation": "

Specify the type of input audio. For example, choose DICTATION for a \n provider dictating patient notes and CONVERSATION for a dialogue between a\n patient and a medical professional.

", + "smithy.api#httpHeader": "x-amzn-transcribe-type", + "smithy.api#required": {} + } + }, + "ShowSpeakerLabel": { + "target": "com.amazonaws.transcribestreaming#Boolean", + "traits": { + "smithy.api#default": false, + "smithy.api#documentation": "

Enables speaker partitioning (diarization) in your transcription output. Speaker\n partitioning labels the speech from individual speakers in your media file.

\n

For more information, see Partitioning speakers (diarization).

", + "smithy.api#httpHeader": "x-amzn-transcribe-show-speaker-label" + } + }, + "SessionId": { + "target": "com.amazonaws.transcribestreaming#SessionId", + "traits": { + "smithy.api#documentation": "

Specify a name for your transcription session. If you don't include this parameter in \n your request, Amazon Transcribe Medical generates an ID and returns it in the\n response.

", + "smithy.api#httpHeader": "x-amzn-transcribe-session-id" + } + }, + "AudioStream": { + "target": "com.amazonaws.transcribestreaming#AudioStream", + "traits": { + "smithy.api#httpPayload": {}, + "smithy.api#required": {} + } + }, + "EnableChannelIdentification": { + "target": "com.amazonaws.transcribestreaming#Boolean", + "traits": { + "smithy.api#default": false, + "smithy.api#documentation": "

Enables channel identification in multi-channel audio.

\n

Channel identification transcribes the audio on each channel independently, then appends\n the output for each channel into one transcript.

\n

If you have multi-channel audio and do not enable channel identification, your audio is \n transcribed in a continuous manner and your transcript is not separated by channel.

\n

If you include EnableChannelIdentification in your request, you must also \n include NumberOfChannels.

\n

For more information, see Transcribing multi-channel audio.

", + "smithy.api#httpHeader": "x-amzn-transcribe-enable-channel-identification" + } + }, + "NumberOfChannels": { + "target": "com.amazonaws.transcribestreaming#NumberOfChannels", + "traits": { + "smithy.api#documentation": "

Specify the number of channels in your audio stream. This value must be \n 2, as only two channels are supported. If your audio doesn't contain \n multiple channels, do not include this parameter in your request.

\n

If you include NumberOfChannels in your request, you must also \n include EnableChannelIdentification.

", + "smithy.api#httpHeader": "x-amzn-transcribe-number-of-channels" + } + }, + "ContentIdentificationType": { + "target": "com.amazonaws.transcribestreaming#MedicalContentIdentificationType", + "traits": { + "smithy.api#documentation": "

Labels all personal health information (PHI) identified in your transcript.

\n

Content identification is performed at the segment level; PHI is flagged upon complete\n transcription of an audio segment.

\n

For more information, see Identifying personal health information (PHI) in a\n transcription.

", + "smithy.api#httpHeader": "x-amzn-transcribe-content-identification-type" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.transcribestreaming#StartMedicalStreamTranscriptionResponse": { + "type": "structure", + "members": { + "RequestId": { + "target": "com.amazonaws.transcribestreaming#RequestId", + "traits": { + "smithy.api#documentation": "

Provides the identifier for your streaming request.

", + "smithy.api#httpHeader": "x-amzn-request-id" + } + }, + "LanguageCode": { + "target": "com.amazonaws.transcribestreaming#LanguageCode", + "traits": { + "smithy.api#documentation": "

Provides the language code that you specified in your request. This must be\n en-US.

", + "smithy.api#httpHeader": "x-amzn-transcribe-language-code" + } + }, + "MediaSampleRateHertz": { + "target": "com.amazonaws.transcribestreaming#MediaSampleRateHertz", + "traits": { + "smithy.api#documentation": "

Provides the sample rate that you specified in your request.

", + "smithy.api#httpHeader": "x-amzn-transcribe-sample-rate" + } + }, + "MediaEncoding": { + "target": "com.amazonaws.transcribestreaming#MediaEncoding", + "traits": { + "smithy.api#documentation": "

Provides the media encoding you specified in your request.

", + "smithy.api#httpHeader": "x-amzn-transcribe-media-encoding" + } + }, + "VocabularyName": { + "target": "com.amazonaws.transcribestreaming#VocabularyName", + "traits": { + "smithy.api#documentation": "

Provides the name of the custom vocabulary that you specified in your request.

", + "smithy.api#httpHeader": "x-amzn-transcribe-vocabulary-name" + } + }, + "Specialty": { + "target": "com.amazonaws.transcribestreaming#Specialty", + "traits": { + "smithy.api#documentation": "

Provides the medical specialty that you specified in your request.

", + "smithy.api#httpHeader": "x-amzn-transcribe-specialty" + } + }, + "Type": { + "target": "com.amazonaws.transcribestreaming#Type", + "traits": { + "smithy.api#documentation": "

Provides the type of audio you specified in your request.

", + "smithy.api#httpHeader": "x-amzn-transcribe-type" + } + }, + "ShowSpeakerLabel": { + "target": "com.amazonaws.transcribestreaming#Boolean", + "traits": { + "smithy.api#default": false, + "smithy.api#documentation": "

Shows whether speaker partitioning was enabled for your transcription.

", + "smithy.api#httpHeader": "x-amzn-transcribe-show-speaker-label" + } + }, + "SessionId": { + "target": "com.amazonaws.transcribestreaming#SessionId", + "traits": { + "smithy.api#documentation": "

Provides the identifier for your transcription session.

", + "smithy.api#httpHeader": "x-amzn-transcribe-session-id" + } + }, + "TranscriptResultStream": { + "target": "com.amazonaws.transcribestreaming#MedicalTranscriptResultStream", + "traits": { + "smithy.api#documentation": "

Provides detailed information about your streaming session.

", + "smithy.api#httpPayload": {} + } + }, + "EnableChannelIdentification": { + "target": "com.amazonaws.transcribestreaming#Boolean", + "traits": { + "smithy.api#default": false, + "smithy.api#documentation": "

Shows whether channel identification was enabled for your transcription.

", + "smithy.api#httpHeader": "x-amzn-transcribe-enable-channel-identification" + } + }, + "NumberOfChannels": { + "target": "com.amazonaws.transcribestreaming#NumberOfChannels", + "traits": { + "smithy.api#documentation": "

Provides the number of channels that you specified in your request.

", + "smithy.api#httpHeader": "x-amzn-transcribe-number-of-channels" + } + }, + "ContentIdentificationType": { + "target": "com.amazonaws.transcribestreaming#MedicalContentIdentificationType", + "traits": { + "smithy.api#documentation": "

Shows whether content identification was enabled for your transcription.

", + "smithy.api#httpHeader": "x-amzn-transcribe-content-identification-type" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.transcribestreaming#StartStreamTranscription": { + "type": "operation", + "input": { + "target": "com.amazonaws.transcribestreaming#StartStreamTranscriptionRequest" + }, + "output": { + "target": "com.amazonaws.transcribestreaming#StartStreamTranscriptionResponse" + }, + "errors": [ + { + "target": "com.amazonaws.transcribestreaming#BadRequestException" + }, + { + "target": "com.amazonaws.transcribestreaming#ConflictException" + }, + { + "target": "com.amazonaws.transcribestreaming#InternalFailureException" + }, + { + "target": "com.amazonaws.transcribestreaming#LimitExceededException" + }, + { + "target": "com.amazonaws.transcribestreaming#ServiceUnavailableException" + } + ], + "traits": { + "smithy.api#documentation": "

Starts a bidirectional HTTP/2 or WebSocket stream where audio is streamed to \n Amazon Transcribe and the transcription results are streamed to your application.

\n

The following parameters are required:

\n
    \n
  • \n

    \n language-code or identify-language or identify-multiple-language\n

    \n
  • \n
  • \n

    \n media-encoding\n

    \n
  • \n
  • \n

    \n sample-rate\n

    \n
  • \n
\n

For more information on streaming with Amazon Transcribe, see Transcribing streaming audio.

", + "smithy.api#http": { + "method": "POST", + "uri": "/stream-transcription", + "code": 200 + } + } + }, + "com.amazonaws.transcribestreaming#StartStreamTranscriptionRequest": { + "type": "structure", + "members": { + "LanguageCode": { + "target": "com.amazonaws.transcribestreaming#LanguageCode", + "traits": { + "smithy.api#documentation": "

Specify the language code that represents the language spoken in your audio.

\n

If you're unsure of the language spoken in your audio, consider using \n IdentifyLanguage to enable automatic language identification.

\n

For a list of languages supported with Amazon Transcribe streaming, refer to the \n Supported \n languages table.

", + "smithy.api#httpHeader": "x-amzn-transcribe-language-code" + } + }, + "MediaSampleRateHertz": { + "target": "com.amazonaws.transcribestreaming#MediaSampleRateHertz", + "traits": { + "smithy.api#documentation": "

The sample rate of the input audio (in hertz). Low-quality audio, such as telephone audio,\n is typically around 8,000 Hz. High-quality audio typically ranges from 16,000 Hz to 48,000 Hz.\n Note that the sample rate you specify must match that of your audio.

", + "smithy.api#httpHeader": "x-amzn-transcribe-sample-rate", + "smithy.api#required": {} + } + }, + "MediaEncoding": { + "target": "com.amazonaws.transcribestreaming#MediaEncoding", + "traits": { + "smithy.api#documentation": "

Specify the encoding of your input audio. Supported formats are:

\n
    \n
  • \n

    FLAC

    \n
  • \n
  • \n

    OPUS-encoded audio in an Ogg container

    \n
  • \n
  • \n

    PCM (only signed 16-bit little-endian audio formats, which does not include WAV)

    \n
  • \n
\n

For more information, see Media formats.

", + "smithy.api#httpHeader": "x-amzn-transcribe-media-encoding", + "smithy.api#required": {} + } + }, + "VocabularyName": { + "target": "com.amazonaws.transcribestreaming#VocabularyName", + "traits": { + "smithy.api#documentation": "

Specify the name of the custom vocabulary that you want to use when processing your\n transcription. Note that vocabulary names are case sensitive.

\n

If the language of the specified custom vocabulary doesn't match the language identified in\n your media, the custom vocabulary is not applied to your transcription.

\n \n

This parameter is not intended for use with the\n IdentifyLanguage parameter. If you're including IdentifyLanguage\n in your request and want to use one or more custom vocabularies with your transcription, use\n the VocabularyNames parameter instead.

\n
\n

For more information, see Custom vocabularies.

", + "smithy.api#httpHeader": "x-amzn-transcribe-vocabulary-name" + } + }, + "SessionId": { + "target": "com.amazonaws.transcribestreaming#SessionId", + "traits": { + "smithy.api#documentation": "

Specify a name for your transcription session. If you don't include this parameter in your request, \n Amazon Transcribe generates an ID and returns it in the response.

", + "smithy.api#httpHeader": "x-amzn-transcribe-session-id" + } + }, + "AudioStream": { + "target": "com.amazonaws.transcribestreaming#AudioStream", + "traits": { + "smithy.api#documentation": "

An encoded stream of audio blobs. Audio streams are encoded as either HTTP/2 or WebSocket \n data frames.

\n

For more information, see Transcribing streaming audio.

", + "smithy.api#httpPayload": {}, + "smithy.api#required": {} + } + }, + "VocabularyFilterName": { + "target": "com.amazonaws.transcribestreaming#VocabularyFilterName", + "traits": { + "smithy.api#documentation": "

Specify the name of the custom vocabulary filter that you want to use when processing your\n transcription. Note that vocabulary filter names are case sensitive.

\n

If the language of the specified custom vocabulary filter doesn't match the language identified in\n your media, the vocabulary filter is not applied to your transcription.

\n \n

This parameter is not intended for use with the\n IdentifyLanguage parameter. If you're including IdentifyLanguage\n in your request and want to use one or more vocabulary filters with your transcription, use\n the VocabularyFilterNames parameter instead.

\n
\n

For more information, see Using vocabulary filtering with unwanted \n words.

", + "smithy.api#httpHeader": "x-amzn-transcribe-vocabulary-filter-name" + } + }, + "VocabularyFilterMethod": { + "target": "com.amazonaws.transcribestreaming#VocabularyFilterMethod", + "traits": { + "smithy.api#documentation": "

Specify how you want your vocabulary filter applied to your transcript.

\n

To replace words with ***, choose mask.

\n

To delete words, choose remove.

\n

To flag words without changing them, choose tag.

", + "smithy.api#httpHeader": "x-amzn-transcribe-vocabulary-filter-method" + } + }, + "ShowSpeakerLabel": { + "target": "com.amazonaws.transcribestreaming#Boolean", + "traits": { + "smithy.api#default": false, + "smithy.api#documentation": "

Enables speaker partitioning (diarization) in your transcription output. Speaker partitioning \n labels the speech from individual speakers in your media file.

\n

For more information, see Partitioning speakers (diarization).

", + "smithy.api#httpHeader": "x-amzn-transcribe-show-speaker-label" + } + }, + "EnableChannelIdentification": { + "target": "com.amazonaws.transcribestreaming#Boolean", + "traits": { + "smithy.api#default": false, + "smithy.api#documentation": "

Enables channel identification in multi-channel audio.

\n

Channel identification transcribes the audio on each channel independently, then appends the \n output for each channel into one transcript.

\n

If you have multi-channel audio and do not enable channel identification, your audio is \n transcribed in a continuous manner and your transcript is not separated by channel.

\n

If you include EnableChannelIdentification in your request, you must also \n include NumberOfChannels.

\n

For more information, see Transcribing multi-channel audio.

", + "smithy.api#httpHeader": "x-amzn-transcribe-enable-channel-identification" + } + }, + "NumberOfChannels": { + "target": "com.amazonaws.transcribestreaming#NumberOfChannels", + "traits": { + "smithy.api#documentation": "

Specify the number of channels in your audio stream. This value must be \n 2, as only two channels are supported. If your audio doesn't contain \n multiple channels, do not include this parameter in your request.

\n

If you include NumberOfChannels in your request, you must also \n include EnableChannelIdentification.

", + "smithy.api#httpHeader": "x-amzn-transcribe-number-of-channels" + } + }, + "EnablePartialResultsStabilization": { + "target": "com.amazonaws.transcribestreaming#Boolean", + "traits": { + "smithy.api#default": false, + "smithy.api#documentation": "

Enables partial result stabilization for your transcription. Partial result stabilization can reduce\n latency in your output, but may impact accuracy. For more information, see \n Partial-result \n stabilization.

", + "smithy.api#httpHeader": "x-amzn-transcribe-enable-partial-results-stabilization" + } + }, + "PartialResultsStability": { + "target": "com.amazonaws.transcribestreaming#PartialResultsStability", + "traits": { + "smithy.api#documentation": "

Specify the level of stability to use when you enable partial results stabilization \n (EnablePartialResultsStabilization).

\n

Low stability provides the highest accuracy. High stability transcribes faster, but with slightly\n lower accuracy.

\n

For more information, see Partial-result \n stabilization.

", + "smithy.api#httpHeader": "x-amzn-transcribe-partial-results-stability" + } + }, + "ContentIdentificationType": { + "target": "com.amazonaws.transcribestreaming#ContentIdentificationType", + "traits": { + "smithy.api#documentation": "

Labels all personally identifiable information (PII) identified in your transcript.

\n

Content identification is performed at the segment level; PII specified in \n PiiEntityTypes is flagged upon complete transcription of an audio segment. If you don't\n include PiiEntityTypes in your request, all PII is identified.

\n

You can’t set ContentIdentificationType and ContentRedactionType\n in the same request. If you set both, your request returns a\n BadRequestException.

\n

For more information, see Redacting or identifying personally identifiable\n information.

", + "smithy.api#httpHeader": "x-amzn-transcribe-content-identification-type" + } + }, + "ContentRedactionType": { + "target": "com.amazonaws.transcribestreaming#ContentRedactionType", + "traits": { + "smithy.api#documentation": "

Redacts all personally identifiable information (PII) identified in your transcript.

\n

Content redaction is performed at the segment level; PII specified in \n PiiEntityTypes is redacted upon complete transcription of an audio segment. If you don't\n include PiiEntityTypes in your request, all PII is redacted.

\n

You can’t set ContentRedactionType and ContentIdentificationType\n in the same request. If you set both, your request returns a BadRequestException.

\n

For more information, see Redacting or identifying personally identifiable\n information.

", + "smithy.api#httpHeader": "x-amzn-transcribe-content-redaction-type" + } + }, + "PiiEntityTypes": { + "target": "com.amazonaws.transcribestreaming#PiiEntityTypes", + "traits": { + "smithy.api#documentation": "

Specify which types of personally identifiable information (PII) you want to redact in your \n transcript. You can include as many types as you'd like, or you can select \n ALL.

\n

Values must be comma-separated and can include: ADDRESS, \n BANK_ACCOUNT_NUMBER, BANK_ROUTING,\n CREDIT_DEBIT_CVV, CREDIT_DEBIT_EXPIRY,\n CREDIT_DEBIT_NUMBER, EMAIL, \n NAME, PHONE, PIN, \n SSN, or ALL.

\n

Note that if you include PiiEntityTypes in your request, you must also include \n ContentIdentificationType or ContentRedactionType.

\n

If you include ContentRedactionType or \n ContentIdentificationType in your request, but do not include \n PiiEntityTypes, all PII is redacted or identified.

", + "smithy.api#httpHeader": "x-amzn-transcribe-pii-entity-types" + } + }, + "LanguageModelName": { + "target": "com.amazonaws.transcribestreaming#ModelName", + "traits": { + "smithy.api#documentation": "

Specify the name of the custom language model that you want to use when processing your\n transcription. Note that language model names are case sensitive.

\n

The language of the specified language model must match the language code you specify\n in your transcription request. If the languages don't match, the custom language model isn't applied. \n There are no errors or warnings associated with a language mismatch.

\n

For more information, see Custom language models.

", + "smithy.api#httpHeader": "x-amzn-transcribe-language-model-name" + } + }, + "IdentifyLanguage": { + "target": "com.amazonaws.transcribestreaming#Boolean", + "traits": { + "smithy.api#default": false, + "smithy.api#documentation": "

Enables automatic language identification for your transcription.

\n

If you include IdentifyLanguage, you must include a list of\n language codes, using LanguageOptions, that you think may be present in \n your audio stream.

\n

You can also include a preferred language using PreferredLanguage. Adding a \n preferred language can help Amazon Transcribe identify the language faster than if you omit this \n parameter.

\n

If you have multi-channel audio that contains different languages on each channel, and you've \n enabled channel identification, automatic language identification identifies the dominant language on \n each audio channel.

\n

Note that you must include either LanguageCode or \n IdentifyLanguage or IdentifyMultipleLanguages in your request. If you include more than one of these parameters, your transcription job\n fails.

\n

Streaming language identification can't be combined with custom language models or \n redaction.

", + "smithy.api#httpHeader": "x-amzn-transcribe-identify-language" + } + }, + "LanguageOptions": { + "target": "com.amazonaws.transcribestreaming#LanguageOptions", + "traits": { + "smithy.api#documentation": "

Specify two or more language codes that represent the languages you think may be present \n in your media; including more than five is not recommended.

\n

Including language options can improve the accuracy of language identification.

\n

If you include LanguageOptions in your request, you must also include \n IdentifyLanguage or IdentifyMultipleLanguages.

\n

For a list of languages supported with Amazon Transcribe streaming, refer to the \n Supported \n languages table.

\n \n

You can only include one language dialect per language per stream. For example, you\n cannot include en-US and en-AU in the same request.

\n
", + "smithy.api#httpHeader": "x-amzn-transcribe-language-options" + } + }, + "PreferredLanguage": { + "target": "com.amazonaws.transcribestreaming#LanguageCode", + "traits": { + "smithy.api#documentation": "

Specify a preferred language from the subset of languages codes you specified in \n LanguageOptions.

\n

You can only use this parameter if you've included IdentifyLanguage and\n LanguageOptions in your request.

", + "smithy.api#httpHeader": "x-amzn-transcribe-preferred-language" + } + }, + "IdentifyMultipleLanguages": { + "target": "com.amazonaws.transcribestreaming#Boolean", + "traits": { + "smithy.api#default": false, + "smithy.api#documentation": "

Enables automatic multi-language identification in your transcription job request. Use this parameter if your stream contains more than one language. If your stream contains only one language, use IdentifyLanguage instead.

\n

If you include IdentifyMultipleLanguages, you must include a list of language codes, using LanguageOptions, that you think may be present in your stream.

\n

If you want to apply a custom vocabulary or a custom vocabulary filter to your automatic multiple language identification request, include VocabularyNames or VocabularyFilterNames.

\n

Note that you must include one of LanguageCode, IdentifyLanguage, or IdentifyMultipleLanguages in your request. If you include more than one of these parameters, your transcription job fails.

", + "smithy.api#httpHeader": "x-amzn-transcribe-identify-multiple-languages" + } + }, + "VocabularyNames": { + "target": "com.amazonaws.transcribestreaming#VocabularyNames", + "traits": { + "smithy.api#documentation": "

Specify the names of the custom vocabularies that you want to use when processing your\n transcription. Note that vocabulary names are case sensitive.

\n

If none of the languages of the specified custom vocabularies match the language identified in \n your media, your job fails.

\n \n

This parameter is only intended for use with the\n IdentifyLanguage parameter. If you're not\n including IdentifyLanguage in your request and want to use a custom vocabulary\n with your transcription, use the VocabularyName parameter instead.

\n
\n

For more information, see Custom vocabularies.

", + "smithy.api#httpHeader": "x-amzn-transcribe-vocabulary-names" + } + }, + "VocabularyFilterNames": { + "target": "com.amazonaws.transcribestreaming#VocabularyFilterNames", + "traits": { + "smithy.api#documentation": "

Specify the names of the custom vocabulary filters that you want to use when processing\n your transcription. Note that vocabulary filter names are case sensitive.

\n

If none of the languages of the specified custom vocabulary filters match the language identified\n in your media, your job fails.

\n \n

This parameter is only intended for use with \n the IdentifyLanguage parameter. If you're not \n including IdentifyLanguage in your request and want to use a custom vocabulary filter \n with your transcription, use the VocabularyFilterName parameter instead.

\n
\n

For more information, see Using vocabulary filtering with unwanted \n words.

", + "smithy.api#httpHeader": "x-amzn-transcribe-vocabulary-filter-names" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.transcribestreaming#StartStreamTranscriptionResponse": { + "type": "structure", + "members": { + "RequestId": { + "target": "com.amazonaws.transcribestreaming#RequestId", + "traits": { + "smithy.api#documentation": "

Provides the identifier for your streaming request.

", + "smithy.api#httpHeader": "x-amzn-request-id" + } + }, + "LanguageCode": { + "target": "com.amazonaws.transcribestreaming#LanguageCode", + "traits": { + "smithy.api#documentation": "

Provides the language code that you specified in your request.

", + "smithy.api#httpHeader": "x-amzn-transcribe-language-code" + } + }, + "MediaSampleRateHertz": { + "target": "com.amazonaws.transcribestreaming#MediaSampleRateHertz", + "traits": { + "smithy.api#documentation": "

Provides the sample rate that you specified in your request.

", + "smithy.api#httpHeader": "x-amzn-transcribe-sample-rate" + } + }, + "MediaEncoding": { + "target": "com.amazonaws.transcribestreaming#MediaEncoding", + "traits": { + "smithy.api#documentation": "

Provides the media encoding you specified in your request.

", + "smithy.api#httpHeader": "x-amzn-transcribe-media-encoding" + } + }, + "VocabularyName": { + "target": "com.amazonaws.transcribestreaming#VocabularyName", + "traits": { + "smithy.api#documentation": "

Provides the name of the custom vocabulary that you specified in your request.

", + "smithy.api#httpHeader": "x-amzn-transcribe-vocabulary-name" + } + }, + "SessionId": { + "target": "com.amazonaws.transcribestreaming#SessionId", + "traits": { + "smithy.api#documentation": "

Provides the identifier for your transcription session.

", + "smithy.api#httpHeader": "x-amzn-transcribe-session-id" + } + }, + "TranscriptResultStream": { + "target": "com.amazonaws.transcribestreaming#TranscriptResultStream", + "traits": { + "smithy.api#documentation": "

Provides detailed information about your streaming session.

", + "smithy.api#httpPayload": {} + } + }, + "VocabularyFilterName": { + "target": "com.amazonaws.transcribestreaming#VocabularyFilterName", + "traits": { + "smithy.api#documentation": "

Provides the name of the custom vocabulary filter that you specified in your\n request.

", + "smithy.api#httpHeader": "x-amzn-transcribe-vocabulary-filter-name" + } + }, + "VocabularyFilterMethod": { + "target": "com.amazonaws.transcribestreaming#VocabularyFilterMethod", + "traits": { + "smithy.api#documentation": "

Provides the vocabulary filtering method used in your transcription.

", + "smithy.api#httpHeader": "x-amzn-transcribe-vocabulary-filter-method" + } + }, + "ShowSpeakerLabel": { + "target": "com.amazonaws.transcribestreaming#Boolean", + "traits": { + "smithy.api#default": false, + "smithy.api#documentation": "

Shows whether speaker partitioning was enabled for your transcription.

", + "smithy.api#httpHeader": "x-amzn-transcribe-show-speaker-label" + } + }, + "EnableChannelIdentification": { + "target": "com.amazonaws.transcribestreaming#Boolean", + "traits": { + "smithy.api#default": false, + "smithy.api#documentation": "

Shows whether channel identification was enabled for your transcription.

", + "smithy.api#httpHeader": "x-amzn-transcribe-enable-channel-identification" + } + }, + "NumberOfChannels": { + "target": "com.amazonaws.transcribestreaming#NumberOfChannels", + "traits": { + "smithy.api#documentation": "

Provides the number of channels that you specified in your request.

", + "smithy.api#httpHeader": "x-amzn-transcribe-number-of-channels" + } + }, + "EnablePartialResultsStabilization": { + "target": "com.amazonaws.transcribestreaming#Boolean", + "traits": { + "smithy.api#default": false, + "smithy.api#documentation": "

Shows whether partial results stabilization was enabled for your transcription.

", + "smithy.api#httpHeader": "x-amzn-transcribe-enable-partial-results-stabilization" + } + }, + "PartialResultsStability": { + "target": "com.amazonaws.transcribestreaming#PartialResultsStability", + "traits": { + "smithy.api#documentation": "

Provides the stabilization level used for your transcription.

", + "smithy.api#httpHeader": "x-amzn-transcribe-partial-results-stability" + } + }, + "ContentIdentificationType": { + "target": "com.amazonaws.transcribestreaming#ContentIdentificationType", + "traits": { + "smithy.api#documentation": "

Shows whether content identification was enabled for your transcription.

", + "smithy.api#httpHeader": "x-amzn-transcribe-content-identification-type" + } + }, + "ContentRedactionType": { + "target": "com.amazonaws.transcribestreaming#ContentRedactionType", + "traits": { + "smithy.api#documentation": "

Shows whether content redaction was enabled for your transcription.

", + "smithy.api#httpHeader": "x-amzn-transcribe-content-redaction-type" + } + }, + "PiiEntityTypes": { + "target": "com.amazonaws.transcribestreaming#PiiEntityTypes", + "traits": { + "smithy.api#documentation": "

Lists the PII entity types you specified in your request.

", + "smithy.api#httpHeader": "x-amzn-transcribe-pii-entity-types" + } + }, + "LanguageModelName": { + "target": "com.amazonaws.transcribestreaming#ModelName", + "traits": { + "smithy.api#documentation": "

Provides the name of the custom language model that you specified in your request.

", + "smithy.api#httpHeader": "x-amzn-transcribe-language-model-name" + } + }, + "IdentifyLanguage": { + "target": "com.amazonaws.transcribestreaming#Boolean", + "traits": { + "smithy.api#default": false, + "smithy.api#documentation": "

Shows whether automatic language identification was enabled for your \n transcription.

", + "smithy.api#httpHeader": "x-amzn-transcribe-identify-language" + } + }, + "LanguageOptions": { + "target": "com.amazonaws.transcribestreaming#LanguageOptions", + "traits": { + "smithy.api#documentation": "

Provides the language codes that you specified in your request.

", + "smithy.api#httpHeader": "x-amzn-transcribe-language-options" + } + }, + "PreferredLanguage": { + "target": "com.amazonaws.transcribestreaming#LanguageCode", + "traits": { + "smithy.api#documentation": "

Provides the preferred language that you specified in your request.

", + "smithy.api#httpHeader": "x-amzn-transcribe-preferred-language" + } + }, + "IdentifyMultipleLanguages": { + "target": "com.amazonaws.transcribestreaming#Boolean", + "traits": { + "smithy.api#default": false, + "smithy.api#documentation": "

Shows whether automatic multi-language identification was enabled for your transcription.

", + "smithy.api#httpHeader": "x-amzn-transcribe-identify-multiple-languages" + } + }, + "VocabularyNames": { + "target": "com.amazonaws.transcribestreaming#VocabularyNames", + "traits": { + "smithy.api#documentation": "

Provides the names of the custom vocabularies that you specified in your request.

", + "smithy.api#httpHeader": "x-amzn-transcribe-vocabulary-names" + } + }, + "VocabularyFilterNames": { + "target": "com.amazonaws.transcribestreaming#VocabularyFilterNames", + "traits": { + "smithy.api#documentation": "

Provides the names of the custom vocabulary filters that you specified in your\n request.

", + "smithy.api#httpHeader": "x-amzn-transcribe-vocabulary-filter-names" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.transcribestreaming#String": { + "type": "string" + }, + "com.amazonaws.transcribestreaming#StringList": { + "type": "list", + "member": { + "target": "com.amazonaws.transcribestreaming#String" + } + }, + "com.amazonaws.transcribestreaming#TimestampRange": { + "type": "structure", + "members": { + "BeginOffsetMillis": { + "target": "com.amazonaws.transcribestreaming#Long", + "traits": { + "smithy.api#documentation": "

The time, in milliseconds, from the beginning of the audio stream to the start of the category \n match.

" + } + }, + "EndOffsetMillis": { + "target": "com.amazonaws.transcribestreaming#Long", + "traits": { + "smithy.api#documentation": "

The time, in milliseconds, from the beginning of the audio stream to the end of the category \n match.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Contains the timestamp range (start time through end time) of a matched category.

" + } + }, + "com.amazonaws.transcribestreaming#TimestampRanges": { + "type": "list", + "member": { + "target": "com.amazonaws.transcribestreaming#TimestampRange" + } + }, + "com.amazonaws.transcribestreaming#Transcribe": { + "type": "service", + "version": "2017-10-26", + "operations": [ + { + "target": "com.amazonaws.transcribestreaming#GetMedicalScribeStream" + }, + { + "target": "com.amazonaws.transcribestreaming#StartCallAnalyticsStreamTranscription" + }, + { + "target": "com.amazonaws.transcribestreaming#StartMedicalScribeStream" + }, + { + "target": "com.amazonaws.transcribestreaming#StartMedicalStreamTranscription" + }, + { + "target": "com.amazonaws.transcribestreaming#StartStreamTranscription" + } + ], + "traits": { + "aws.api#service": { + "sdkId": "Transcribe Streaming", + "arnNamespace": "transcribe", + "cloudFormationName": "TranscribeStreaming", + "cloudTrailEventSource": "transcribestreaming.amazonaws.com", + "endpointPrefix": "transcribestreaming" + }, + "aws.auth#sigv4": { + "name": "transcribe" + }, + "aws.protocols#restJson1": { + "http": [ + "http/1.1", + "h2" + ], + "eventStreamHttp": [ + "h2" + ] + }, + "smithy.api#documentation": "

Amazon Transcribe streaming offers four main types of real-time transcription:\n Standard, Medical,\n Call Analytics,\n and Health Scribe.

\n
    \n
  • \n

    \n Standard transcriptions are the most common option. Refer\n to for details.

    \n
  • \n
  • \n

    \n Medical transcriptions are tailored to medical professionals \n and incorporate medical terms. A common use case for this service is transcribing doctor-patient \n dialogue in real time, so doctors can focus on their patient instead of taking notes. Refer to\n for details.

    \n
  • \n
  • \n

    \n Call Analytics transcriptions are designed for use with call\n center audio on two different channels; if you're looking for insight into customer service calls, use this \n option. Refer to for details.

    \n
  • \n
  • \n

    \n HealthScribe transcriptions are designed to\n automatically create clinical notes from patient-clinician conversations using generative AI.\n Refer to [here] for details.

    \n
  • \n
", + "smithy.api#title": "Amazon Transcribe Streaming Service", + "smithy.rules#endpointRuleSet": { + "version": "1.0", + "parameters": { + "Region": { + "builtIn": "AWS::Region", + "required": false, + "documentation": "The AWS region used to dispatch the request.", + "type": "string" + }, + "UseDualStack": { + "builtIn": "AWS::UseDualStack", + "required": true, + "default": false, + "documentation": "When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.", + "type": "boolean" + }, + "UseFIPS": { + "builtIn": "AWS::UseFIPS", + "required": true, + "default": false, + "documentation": "When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.", + "type": "boolean" + }, + "Endpoint": { + "builtIn": "SDK::Endpoint", + "required": false, + "documentation": "Override the endpoint used to send this request", + "type": "string" + } + }, + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "error": "Invalid Configuration: FIPS and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "aws.partition", + "argv": [ + { + "ref": "Region" + } + ], + "assign": "PartitionResult" + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } + ] + } + ], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://transcribestreaming-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + }, + true + ] + } + ], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://transcribestreaming-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } + ] + } + ], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://transcribestreaming.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [], + "endpoint": { + "url": "https://transcribestreaming.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" + } + ] + }, + "smithy.rules#endpointTests": { + "testCases": [ + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transcribestreaming.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transcribestreaming.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transcribestreaming.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transcribestreaming.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transcribestreaming.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transcribestreaming.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transcribestreaming.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transcribestreaming.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transcribestreaming.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transcribestreaming.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transcribestreaming.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://transcribestreaming-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transcribestreaming-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://transcribestreaming.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transcribestreaming.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transcribestreaming.cn-northwest-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://transcribestreaming-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transcribestreaming-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://transcribestreaming.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transcribestreaming.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transcribestreaming.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://transcribestreaming-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transcribestreaming-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://transcribestreaming.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transcribestreaming.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transcribestreaming-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transcribestreaming-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://transcribestreaming.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" + } + } + }, + "com.amazonaws.transcribestreaming#Transcript": { + "type": "structure", + "members": { + "Results": { + "target": "com.amazonaws.transcribestreaming#ResultList", + "traits": { + "smithy.api#documentation": "

Contains a set of transcription results from one or more audio segments, along with additional \n information per your request parameters. This can include information relating to alternative\n transcriptions, channel identification, partial result stabilization, language identification, and other\n transcription-related data.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The Transcript associated with a \n .

\n

\n Transcript contains Results, which contains a set of transcription\n results from one or more audio segments, along with additional information per your request \n parameters.

" + } + }, + "com.amazonaws.transcribestreaming#TranscriptEvent": { + "type": "structure", + "members": { + "Transcript": { + "target": "com.amazonaws.transcribestreaming#Transcript", + "traits": { + "smithy.api#documentation": "

Contains Results, which contains a set of transcription results from one or\n more audio segments, along with additional information per your request parameters. This can\n include information relating to alternative transcriptions, channel identification, partial\n result stabilization, language identification, and other transcription-related data.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The TranscriptEvent associated with a \n TranscriptResultStream.

\n

Contains a set of transcription results from one or more audio segments, along with additional \n information per your request parameters.

" + } + }, + "com.amazonaws.transcribestreaming#TranscriptResultStream": { + "type": "union", + "members": { + "TranscriptEvent": { + "target": "com.amazonaws.transcribestreaming#TranscriptEvent", + "traits": { + "smithy.api#documentation": "

Contains Transcript, which contains Results. The \n object contains a set of transcription \n results from one or more audio segments, along with additional information per your request \n parameters.

" + } + }, + "BadRequestException": { + "target": "com.amazonaws.transcribestreaming#BadRequestException", + "traits": { + "smithy.api#documentation": "

A client error occurred when the stream was created. Check the parameters of the request\n and try your request again.

" + } + }, + "LimitExceededException": { + "target": "com.amazonaws.transcribestreaming#LimitExceededException", + "traits": { + "smithy.api#documentation": "

Your client has exceeded one of the Amazon Transcribe limits. This is typically the audio length\n limit. Break your audio stream into smaller chunks and try your request again.

" + } + }, + "InternalFailureException": { + "target": "com.amazonaws.transcribestreaming#InternalFailureException", + "traits": { + "smithy.api#documentation": "

A problem occurred while processing the audio. Amazon Transcribe terminated \n processing.

" + } + }, + "ConflictException": { + "target": "com.amazonaws.transcribestreaming#ConflictException", + "traits": { + "smithy.api#documentation": "

A new stream started with the same session ID. The current stream has been\n terminated.

" + } + }, + "ServiceUnavailableException": { + "target": "com.amazonaws.transcribestreaming#ServiceUnavailableException", + "traits": { + "smithy.api#documentation": "

The service is currently unavailable. Try your request later.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Contains detailed information about your streaming session.

", + "smithy.api#streaming": {} + } + }, + "com.amazonaws.transcribestreaming#Type": { + "type": "enum", + "members": { + "CONVERSATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CONVERSATION" + } + }, + "DICTATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DICTATION" + } + } + } + }, + "com.amazonaws.transcribestreaming#Uri": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2000 + }, + "smithy.api#pattern": "^(s3://|http(s*)://).+$" + } + }, + "com.amazonaws.transcribestreaming#UtteranceEvent": { + "type": "structure", + "members": { + "UtteranceId": { + "target": "com.amazonaws.transcribestreaming#String", + "traits": { + "smithy.api#documentation": "

The unique identifier that is associated with the specified UtteranceEvent.

" + } + }, + "IsPartial": { + "target": "com.amazonaws.transcribestreaming#Boolean", + "traits": { + "smithy.api#default": false, + "smithy.api#documentation": "

Indicates whether the segment in the UtteranceEvent is complete \n (FALSE) or partial (TRUE).

" + } + }, + "ParticipantRole": { + "target": "com.amazonaws.transcribestreaming#ParticipantRole", + "traits": { + "smithy.api#documentation": "

Provides the role of the speaker for each audio channel, either CUSTOMER or \n AGENT.

" + } + }, + "BeginOffsetMillis": { + "target": "com.amazonaws.transcribestreaming#Long", + "traits": { + "smithy.api#documentation": "

The time, in milliseconds, from the beginning of the audio stream to the start of the\n UtteranceEvent.

" + } + }, + "EndOffsetMillis": { + "target": "com.amazonaws.transcribestreaming#Long", + "traits": { + "smithy.api#documentation": "

The time, in milliseconds, from the beginning of the audio stream to the start of the \n UtteranceEvent.

" + } + }, + "Transcript": { + "target": "com.amazonaws.transcribestreaming#String", + "traits": { + "smithy.api#documentation": "

Contains transcribed text.

" + } + }, + "Items": { + "target": "com.amazonaws.transcribestreaming#CallAnalyticsItemList", + "traits": { + "smithy.api#documentation": "

Contains words, phrases, or punctuation marks that are associated with the specified \n UtteranceEvent.

" + } + }, + "Entities": { + "target": "com.amazonaws.transcribestreaming#CallAnalyticsEntityList", + "traits": { + "smithy.api#documentation": "

Contains entities identified as personally identifiable information (PII) in your transcription \n output.

" + } + }, + "Sentiment": { + "target": "com.amazonaws.transcribestreaming#Sentiment", + "traits": { + "smithy.api#documentation": "

Provides the sentiment that was detected in the specified segment.

" + } + }, + "IssuesDetected": { + "target": "com.amazonaws.transcribestreaming#IssuesDetected", + "traits": { + "smithy.api#documentation": "

Provides the issue that was detected in the specified segment.

" + } + }, + "LanguageCode": { + "target": "com.amazonaws.transcribestreaming#CallAnalyticsLanguageCode", + "traits": { + "smithy.api#documentation": "

The language code that represents the language spoken in your audio stream.

" + } + }, + "LanguageIdentification": { + "target": "com.amazonaws.transcribestreaming#CallAnalyticsLanguageIdentification", + "traits": { + "smithy.api#documentation": "

The language code of the dominant language identified in your stream.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Contains set of transcription results from one or more audio segments, along with additional \n information about the parameters included in your request. For example, channel definitions, partial result \n stabilization, sentiment, and issue detection.

" + } + }, + "com.amazonaws.transcribestreaming#VocabularyFilterMethod": { + "type": "enum", + "members": { + "REMOVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "remove" + } + }, + "MASK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "mask" + } + }, + "TAG": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "tag" + } + } + } + }, + "com.amazonaws.transcribestreaming#VocabularyFilterName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 200 + }, + "smithy.api#pattern": "^[0-9a-zA-Z._-]+$" + } + }, + "com.amazonaws.transcribestreaming#VocabularyFilterNames": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 3000 + }, + "smithy.api#pattern": "^[a-zA-Z0-9,-._]+$" + } + }, + "com.amazonaws.transcribestreaming#VocabularyName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 200 + }, + "smithy.api#pattern": "^[0-9a-zA-Z._-]+$" + } + }, + "com.amazonaws.transcribestreaming#VocabularyNames": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 3000 + }, + "smithy.api#pattern": "^[a-zA-Z0-9,-._]+$" + } + } + } +}