-
Notifications
You must be signed in to change notification settings - Fork 44
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
Add headers for multiple language identification #99
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -84,6 +84,10 @@ async def start_stream_transcription( | |||||
enable_partial_results_stabilization: Optional[bool] = None, | ||||||
partial_results_stability: Optional[str] = None, | ||||||
language_model_name: Optional[str] = None, | ||||||
identify_language: Optional[bool] = False, | ||||||
preferred_language: Optional[str] = None, | ||||||
identify_multiple_languages=False, | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
language_options=None, | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not familiar with AWS coding standards, but is there a reason why there isn't type hiting on There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
) -> StartStreamTranscriptionEventStream: | ||||||
"""Coordinate transcription settings and start stream. | ||||||
|
||||||
|
@@ -100,7 +104,8 @@ async def start_stream_transcription( | |||||
than 5 minutes. | ||||||
|
||||||
:param language_code: | ||||||
Indicates the source language used in the input audio stream. | ||||||
Indicates the source language used in the input audio stream. Set to | ||||||
None if identify_multiple_languages is set to True | ||||||
:param media_sample_rate_hz: | ||||||
The sample rate, in Hertz, of the input audio. We suggest that you | ||||||
use 8000 Hz for low quality audio and 16000 Hz for high quality audio. | ||||||
|
@@ -144,6 +149,22 @@ async def start_stream_transcription( | |||||
overall transcription accuracy. Defaults to "high" if not set explicitly. | ||||||
:param language_model_name: | ||||||
The name of the language model you want to use. | ||||||
:param identify_language: | ||||||
if True, the language of the stream will be automatically detected. Set | ||||||
language_code to None and provide at least two language_options when | ||||||
identify_language is True. | ||||||
:param preferred_language: | ||||||
Adding a preferred language can speed up the language identification | ||||||
process, which is helpful for short audio clips. | ||||||
:param identify_multiple_languages: | ||||||
If true, all languages spoken in the stream are identified. A multilingual | ||||||
transcripts is created your transcript using each identified language. | ||||||
You must also provide at least two language_options and set | ||||||
language_code to None | ||||||
:param language_options: | ||||||
A list of possible language to use when identify_multiple_languages is | ||||||
set to True. Note that not all languages supported by Transcribe are | ||||||
supported for multiple language identification | ||||||
""" | ||||||
transcribe_streaming_request = StartStreamTranscriptionRequest( | ||||||
language_code, | ||||||
|
@@ -159,6 +180,10 @@ async def start_stream_transcription( | |||||
enable_partial_results_stabilization, | ||||||
partial_results_stability, | ||||||
language_model_name, | ||||||
identify_language, | ||||||
preferred_language, | ||||||
identify_multiple_languages, | ||||||
language_options, | ||||||
) | ||||||
endpoint = await self._endpoint_resolver.resolve(self.region) | ||||||
|
||||||
|
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.