demo: Update translator bot example (#1005)

* docs: Update translator bot example

Updates the translator bot to do the following:

- Allow you to specify the in and out languages
- Uses TranscriptionProcessor to handle transcriptions

* Simplify the example, improve performance

---------

Co-authored-by: Mark Backman <mark@daily.co>
This commit is contained in:
James Hush
2025-01-17 10:08:15 +08:00
committed by GitHub
parent 3e178fd46f
commit 221e044046
2 changed files with 109 additions and 38 deletions

View File

@@ -121,7 +121,7 @@ if __name__ == "__main__":
default_host = os.getenv("HOST", "0.0.0.0")
default_port = int(os.getenv("FAST_API_PORT", "7860"))
parser = argparse.ArgumentParser(description="Daily Storyteller FastAPI server")
parser = argparse.ArgumentParser(description="Daily Translator FastAPI server")
parser.add_argument("--host", type=str, default=default_host, help="Host address")
parser.add_argument("--port", type=int, default=default_port, help="Port number")
parser.add_argument("--reload", action="store_true", help="Reload code on change")