diff --git a/README.md b/README.md index 5310895..91db1b2 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/api/src/inference/base.py b/api/src/inference/base.py index 506e700..b2ebd32 100644 --- a/api/src/inference/base.py +++ b/api/src/inference/base.py @@ -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) diff --git a/api/src/services/streaming_audio_writer.py b/api/src/services/streaming_audio_writer.py index fec420f..83a20a7 100644 --- a/api/src/services/streaming_audio_writer.py +++ b/api/src/services/streaming_audio_writer.py @@ -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"" diff --git a/start-gpu.sh b/start-gpu.sh index bd8701c..b079978 100755 --- a/start-gpu.sh +++ b/start-gpu.sh @@ -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