• Y
  • List All
  • Feedback
    • This Project
    • All Projects
Profile Account settings Log out
  • Favorite
  • Project
  • All
Loading...
  • Log in
  • Sign up
yjyoon / whisper_server_speaches star
  • Project homeH
  • CodeC
  • IssueI
  • Pull requestP
  • Review R
  • MilestoneM
  • BoardB
  • Files
  • Commit
  • Branches
whisper_server_speachessrcfaster_whisper_servermain.py
Download as .zip file
File name
Commit message
Commit date
.github/workflows
chore(deps): update astral-sh/setup-uv action to v3
2024-10-13
docs
docs: initialize mkdocs
2024-10-03
examples
Update script.sh
2024-09-03
scripts
chore: misc changes
2024-10-03
src/speaches
feat: tts
2024-11-01
tests
feat: tts
2024-11-01
.dockerignore
chore: update .dockerignore
2024-11-01
.envrc
init
2024-05-20
.gitattributes
docs: add live-transcription demo
2024-05-28
.gitignore
chore: update .gitignore
2024-07-03
.pre-commit-config.yaml
deps: update `ruff`
2024-11-01
Dockerfile.cpu
chore(deps): update ghcr.io/astral-sh/uv docker tag to v0.4.20
2024-10-13
Dockerfile.cuda
chore(deps): update ghcr.io/astral-sh/uv docker tag to v0.4.20
2024-10-13
LICENSE
init
2024-05-20
README.md
Improved readability in README.md
2024-10-09
Taskfile.yaml
chore: Taskfile changes
2024-11-01
audio.wav
docs: update README.md
2024-05-27
compose.yaml
chore: format compose
2024-09-11
flake.lock
deps: update flake
2024-11-01
flake.nix
Add `pre-commit` to pyproject.toml
2024-10-13
mkdocs.yml
docs: initialize mkdocs
2024-10-03
pyproject.toml
deps: add `piper-tts`
2024-11-01
renovate.json
Add renovate.json
2024-10-13
uv.lock
deps: add `piper-tts`
2024-11-01
File name
Commit message
Commit date
routers
feat: tts
2024-11-01
__init__.py
feat: use `uv` package manager, pin dependencies
2024-09-08
api_models.py
refactor: update response model names and module name
2024-10-01
asr.py
refactor: update response model names and module name
2024-10-01
audio.py
feat: dependency injection
2024-09-22
config.py
feat: model unloading
2024-10-01
dependencies.py
feat: tts
2024-11-01
gradio_app.py
chore: fix some ruff errors
2024-10-01
hf_utils.py
feat: tts
2024-11-01
logger.py
chore: include line number in log messages
2024-11-01
main.py
feat: tts
2024-11-01
model_manager.py
feat: tts
2024-11-01
text_utils.py
feat: tts
2024-11-01
text_utils_test.py
refactor: update response model names and module name
2024-10-01
transcriber.py
refactor: update response model names and module name
2024-10-01
Fedir Zadniprovskyi 2024-11-01 1d2b518 feat: tts UNIX
Raw Open in browser Change history
from __future__ import annotations from contextlib import asynccontextmanager import logging import platform from typing import TYPE_CHECKING from fastapi import ( FastAPI, ) from fastapi.middleware.cors import CORSMiddleware from faster_whisper_server.dependencies import get_config, get_model_manager from faster_whisper_server.logger import setup_logger from faster_whisper_server.routers.list_models import ( router as list_models_router, ) from faster_whisper_server.routers.misc import ( router as misc_router, ) from faster_whisper_server.routers.stt import ( router as stt_router, ) if TYPE_CHECKING: from collections.abc import AsyncGenerator def create_app() -> FastAPI: setup_logger() logger = logging.getLogger(__name__) if platform.machine() == "x86_64": from faster_whisper_server.routers.speech import ( router as speech_router, ) else: logger.warning("`/v1/audio/speech` is only supported on x86_64 machines") speech_router = None config = get_config() # HACK logger.debug(f"Config: {config}") model_manager = get_model_manager() # HACK @asynccontextmanager async def lifespan(_app: FastAPI) -> AsyncGenerator[None, None]: for model_name in config.preload_models: model_manager.load_model(model_name) yield app = FastAPI(lifespan=lifespan) app.include_router(stt_router) app.include_router(list_models_router) app.include_router(misc_router) if speech_router is not None: app.include_router(speech_router) if config.allow_origins is not None: app.add_middleware( CORSMiddleware, allow_origins=config.allow_origins, allow_credentials=True, allow_methods=["*"], allow_headers=["*"], ) if config.enable_ui: import gradio as gr from faster_whisper_server.gradio_app import create_gradio_demo app = gr.mount_gradio_app(app, create_gradio_demo(config), path="/") return app

          
        
    
    
Copyright Yona authors & © NAVER Corp. & NAVER LABS Supported by NAVER CLOUD PLATFORM

or
Sign in with github login with Google Sign in with Google
Reset password | Sign up