Simple fixes and translations

This commit is contained in:
Fireblade 2025-03-08 22:48:52 -05:00
parent 70c0d506de
commit 3e6ee65482
4 changed files with 4 additions and 4 deletions

View file

@ -145,7 +145,7 @@ Example usage with authentication:
# Using curl
curl -X POST "http://localhost:8880/v1/audio/speech" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-kokoro-your-api-key" \
-H "Authorization: Bearer sk-kokoro-your-api-key-1" \
-d '{"model":"kokoro", "input":"Hello world", "voice":"af_heart"}'
# Using Python with OpenAI client

View file

@ -27,7 +27,7 @@ class AudioChunk:
if output.word_timestamps is not None:
output.word_timestamps+=audio_chunk.word_timestamps
# 从float32转换为int16使用音频的方式
# Convert audio data from float32 to int16 format.
if output.audio.dtype == np.float32:
output.audio = (output.audio * 32767).astype(np.int16)

View file

@ -67,6 +67,6 @@ class StreamingAudioWriter:
for packet in self.stream.encode(frame):
self.container.mux(packet)
# 仅返回空字节,保持容器开放
# Only return a null byte and keep the container running.
return b""

View file

@ -13,4 +13,4 @@ export WEB_PLAYER_PATH=$PROJECT_ROOT/web
# Run FastAPI with GPU extras using uv run
uv pip install -e ".[gpu]"
uv run --no-sync uvicorn api.src.main:app --host 0.0.0.0 --port 50888
uv run --no-sync uvicorn api.src.main:app --host 0.0.0.0 --port 8880