replace two letter codes with three letter codes

This commit is contained in:
Sara
2023-10-13 23:36:02 +02:00
parent 47fc52af11
commit 90c6824f52
12 changed files with 91 additions and 140 deletions

View File

@@ -178,7 +178,7 @@ def web():
@app.post("/transcribe", dependencies=[Depends(apikey_auth)])
async def transcribe(
file: UploadFile,
source_language: Annotated[str, Body(...)] = "en",
source_language: Annotated[str, Body(...)] = "eng",
timestamp: Annotated[float, Body()] = 0.0
) -> TranscriptResponse:
audio_data = await file.read()

View File

@@ -219,8 +219,8 @@ def web():
@app.post("/translate", dependencies=[Depends(apikey_auth)])
async def translate(
text: str,
source_language: Annotated[str, Body(...)] = "en",
target_language: Annotated[str, Body(...)] = "fr",
source_language: Annotated[str, Body(...)] = "eng",
target_language: Annotated[str, Body(...)] = "fra",
) -> TranslateResponse:
func = translatorstub.translate_text.spawn(
text=text,