Rename browser demo mount path from /demo to /voice-demo.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -170,8 +170,8 @@ ws://<host>:<port>/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/`。
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 "/"
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user