Skip to content

Commit

Permalink
修正: エンジン名のハードコードをマニフェスト参照に変更 (#1229)
Browse files Browse the repository at this point in the history
* fix: エンジン名のハードコードをマニフェスト参照に変更

* fix: スナップショットを更新
  • Loading branch information
tarepan authored May 14, 2024
1 parent 418a9d3 commit 9751d6e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions voicevox_engine/app/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,18 @@ def generate_app(
if root_dir is None:
root_dir = engine_root()

engine_manifest_data = EngineManifestLoader(
engine_root() / "engine_manifest.json", engine_root()
).load_manifest()

@asynccontextmanager
async def lifespan(app: FastAPI) -> AsyncIterator[None]:
user_dict.update_dict()
yield

app = FastAPI(
title="VOICEVOX Engine",
description="VOICEVOXの音声合成エンジンです。",
title=engine_manifest_data.name,
description=f"{engine_manifest_data.brand_name} の音声合成エンジンです。",
version=__version__,
lifespan=lifespan,
)
Expand All @@ -63,9 +67,6 @@ async def lifespan(app: FastAPI) -> AsyncIterator[None]:
if disable_mutable_api:
deprecated_mutable_api.enable = False

engine_manifest_data = EngineManifestLoader(
engine_root() / "engine_manifest.json", engine_root()
).load_manifest()
library_manager = LibraryManager(
get_save_dir() / "installed_libraries",
engine_manifest_data.supported_vvlib_manifest_version,
Expand Down

0 comments on commit 9751d6e

Please sign in to comment.