Skip to content

Commit

Permalink
Update asr.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jonafeucht committed Jun 13, 2024
1 parent 085c661 commit 5576522
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/routes/api/asr.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ async def asr(
file: UploadFile = File(),
model_name: str = Query(None),
word_timestamps: bool = Query(False),
beam_size: int = Query(1),
language: str = Query(
None,
enum=LANGUAGE_CODES,
Expand All @@ -32,7 +33,7 @@ async def asr(

segments, info = model.transcribe(
audio_file,
beam_size=5,
beam_size=beam_size,
word_timestamps=True if word_timestamps else False,
language=language,
)
Expand Down

0 comments on commit 5576522

Please sign in to comment.