Skip to content
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

fix: simplify A2T return_timestamps type #239

Merged
merged 1 commit into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions runner/app/routes/audio_to_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,13 @@ async def audio_to_text(
] = "",
pipeline: Pipeline = Depends(get_pipeline),
return_timestamps: Annotated[
Union[str, bool],
str,
Form(
description=(
"Return timestamps for the transcribed text. Supported values: "
"'sentence', 'word', or a boolean. Default is True ('sentence'). "
"False means no timestamps. 'word' means word-based timestamps."
"'sentence', 'word', or a string boolean ('true' or 'false'). Default "
"is 'true' ('sentence'). 'false' means no timestamps. 'word' means "
"word-based timestamps."
)
),
] = "true",
Expand Down
9 changes: 4 additions & 5 deletions runner/gateway.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -437,13 +437,12 @@ components:
description: Hugging Face model ID used for transcription.
default: ''
return_timestamps:
anyOf:
- type: string
- type: boolean
type: string
title: Return Timestamps
description: 'Return timestamps for the transcribed text. Supported values:
''sentence'', ''word'', or a boolean. Default is True (''sentence'').
False means no timestamps. ''word'' means word-based timestamps.'
''sentence'', ''word'', or a string boolean (''true'' or ''false''). Default
is ''true'' (''sentence''). ''false'' means no timestamps. ''word'' means
word-based timestamps.'
default: 'true'
type: object
required:
Expand Down
9 changes: 4 additions & 5 deletions runner/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -448,13 +448,12 @@ components:
description: Hugging Face model ID used for transcription.
default: ''
return_timestamps:
anyOf:
- type: string
- type: boolean
type: string
title: Return Timestamps
description: 'Return timestamps for the transcribed text. Supported values:
''sentence'', ''word'', or a boolean. Default is True (''sentence'').
False means no timestamps. ''word'' means word-based timestamps.'
''sentence'', ''word'', or a string boolean (''true'' or ''false''). Default
is ''true'' (''sentence''). ''false'' means no timestamps. ''word'' means
word-based timestamps.'
default: 'true'
type: object
required:
Expand Down
199 changes: 63 additions & 136 deletions worker/runner.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading