diff --git a/README.md b/README.md index a7eca91..a472a49 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ Browser demo (served from the same process when `server.serve_webpage` is true in `config.json`): ```text -http://localhost:8000/demo/ +http://localhost:8000/voice-demo/ ``` See `examples/webpage/README.md` for details. diff --git a/config.json b/config.json index 57e3a93..64f64af 100644 --- a/config.json +++ b/config.json @@ -4,7 +4,7 @@ "port": 8000, "cors_origins": ["http://localhost:3000", "http://localhost:8080"], "serve_webpage": true, - "webpage_mount": "/demo" + "webpage_mount": "/voice-demo" }, "audio": { "sample_rate_hz": 16000, diff --git a/docs/product-ws.md b/docs/product-ws.md index b93c704..501c5db 100644 --- a/docs/product-ws.md +++ b/docs/product-ws.md @@ -170,8 +170,8 @@ ws://:/ws-product ```json "server": { "serve_webpage": true, - "webpage_mount": "/demo" + "webpage_mount": "/voice-demo" } ``` -启动服务后访问 `http://localhost:8000/demo/`,默认连接同源的 `/ws-product`。参考实现见 `examples/webpage/`。 +启动服务后访问 `http://localhost:8000/voice-demo/`,默认连接同源的 `/ws-product`。参考实现见 `examples/webpage/`。 diff --git a/engine/config.py b/engine/config.py index acd3875..edc4518 100644 --- a/engine/config.py +++ b/engine/config.py @@ -14,7 +14,7 @@ class ServerConfig: port: int = 8000 cors_origins: list[str] = field(default_factory=list) serve_webpage: bool = True - webpage_mount: str = "/demo" + webpage_mount: str = "/voice-demo" @dataclass(frozen=True) diff --git a/engine/main.py b/engine/main.py index d7e49a7..0839a68 100644 --- a/engine/main.py +++ b/engine/main.py @@ -20,7 +20,7 @@ def get_config(path: str = "config.json") -> EngineConfig: def _normalize_mount_path(path: str) -> str: - normalized = path.strip() or "/demo" + normalized = path.strip() or "/voice-demo" if not normalized.startswith("/"): normalized = f"/{normalized}" return normalized.rstrip("/") or "/" diff --git a/examples/webpage/README.md b/examples/webpage/README.md index 8832eb8..ed38697 100644 --- a/examples/webpage/README.md +++ b/examples/webpage/README.md @@ -51,7 +51,7 @@ examples/webpage/ 2. Open the demo page served by the same process: ```text - http://127.0.0.1:8000/demo/ + http://127.0.0.1:8000/voice-demo/ ``` The default websocket URL is derived from the page host @@ -63,7 +63,7 @@ examples/webpage/ ```json "server": { "serve_webpage": true, - "webpage_mount": "/demo" + "webpage_mount": "/voice-demo" } ```