-
Notifications
You must be signed in to change notification settings - Fork 8
Release: Amazon Transcribe Streaming Client #26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this intentional? I wouldn't expect this to be a package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bug in the code generator. Will be addressed in a seperate PR! I'll update this PR to remove all __init__.py file under the docs directory once the fix is up.
| """ | ||
| 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refer to for details.
Refer to what? Is this a source docs issue or are we missing something in the generator?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't an issue with the code generator. The issue is in the service model documentation:
| * **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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refer to [here] for details.
Hmm, this isn't great either. It looks like this is an issue in the upstream docs. We should make sure the service team is aware.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, same as I mentioned above. I'll reach out to them. Thanks for catching this!
| :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. | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like an issue in the docstring generator for operations? We're getting an unnecessary newline here but not in the top level class docstring.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll check to see if these doc issue go away after https://github.com/smithy-lang/smithy-python/pull/592/files
| * ``sample-rate`` | ||
| For more information on streaming with Amazon Transcribe, see `Transcribing streaming audio <https://docs.aws.amazon.com/transcribe/latest/dg/streaming.html>`_ | ||
| . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This newline also seems potentially wrong?
|
|
||
| @dataclass(init=False) | ||
| class Config: | ||
| """Configuration for Transcribe.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What'd we use to generate this? It's strange we've named the client correctly (TranscribeStreamingClient) but this is Transcribe which would be a different client. It seems like we potentially have a mismatch or Transcribe themselves may not be making the distinction we expect. Is this the signing name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, this is using the name of the service type in the smithy model. The bedrock Config object also has a weird docstring.
I just put up a PR to fix this. The description has the before/after docstrings for bedrock runtime and transcribe streaming.
smithy-lang/smithy-python#595
| 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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did we generate this? If not, we should be using the fixtures from @alexgromero's PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah this is generated. I asked Jordon about this file and whether it was intentional to generate this in codegen/protocol-test and in the generated clients. He mentioned "It's intentional in that any service can have protocol tests. But the actual file could be omitted if there’s no trait"
This PR adds a new client for the Amazon Transcribe Streaming Service.
Summary
Add support for the Amazon Transcribe Streaming service by adding the latest Smithy model and code-generating a new client package (
aws-sdk-transcribe-streaming).Changes
transcribe-streaming.jsonmodel definition tocodegen/aws-models/Testing
cd clients/aws-sdk-transcribe-streaminguv venv -p 3.14source .venv/bin/activatesounddevice:uv pip install . sounddeviceEnvironmentCredentialsResolver)By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.