Skip to content
Open
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
3 changes: 2 additions & 1 deletion api.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ async def turn_audio_to_text(
files: Annotated[List[UploadFile], File(description="wav or mp3 audios in 16KHz")],
keys: Annotated[str, Form(description="name of each audio joined with comma")] = None,
lang: Annotated[Language, Form(description="language of audio content")] = "auto",
use_itn: Annotated[bool, Form(description="apply inverse text normalization")] = False,
):
audios = []
for file in files:
Expand All @@ -80,7 +81,7 @@ async def turn_audio_to_text(
res = m.inference(
data_in=audios,
language=lang, # "zh", "en", "yue", "ja", "ko", "nospeech"
use_itn=False,
use_itn=use_itn,
ban_emo_unk=False,
key=key,
fs=TARGET_FS,
Expand Down