Skip to content

Commit 9cd1579

Browse files
committed
Disable Speaches VAD by default and bump version to 0.3.4
Updated the handler to set 'vad_filter=False' for the Speaches backend, disabling VAD as it is not yet compatible with the Wyoming protocol. Also updated documentation to note this behavior and incremented the project version to 0.3.4.
1 parent 3d5c30a commit 9cd1579

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ If you prefer using a local service like Speaches instead of official OpenAI ser
173173
- The Speaches container is configured with specific model settings (`Systran/faster-distil-whisper-large-v3` for STT and `speaches-ai/Kokoro-82M-v1.0-ONNX` for TTS).
174174
- It uses a local port (8000) to expose the Speaches service.
175175
- NVIDIA GPU support is enabled, so ensure your system has an appropriate setup if you plan to utilize GPU resources.
176+
- Note: wyoming_openai disables Speaches VAD (Voice Activity Detection) by default, as it is not yet compatible with the Wyoming protocol.
176177
177178
- **Command**:
178179
@@ -228,7 +229,7 @@ We follow specific tagging conventions for our Docker images. These tags help in
228229
229230
- **`main`**: This tag points to the latest commit on the main code branch. It is suitable for users who want to experiment with the most up-to-date features and changes, but may include unstable or experimental code.
230231
231-
- **`major.minor.patch version`**: Specific version tags (e.g., `0.3.3`) correspond to specific stable releases of the Wyoming OpenAI proxy server. These tags are ideal for users who need a consistent, reproducible environment and want to avoid breaking changes introduced in newer versions.
232+
- **`major.minor.patch version`**: Specific version tags (e.g., `0.3.4`) correspond to specific stable releases of the Wyoming OpenAI proxy server. These tags are ideal for users who need a consistent, reproducible environment and want to avoid breaking changes introduced in newer versions.
232233
233234
- **`major.minor version`**: Tags that follow the `major.minor` format (e.g., `0.3`) represent a range of patch-level updates within the same minor version series. These tags are useful for users who want to stay updated with bug fixes and minor improvements without upgrading to a new major or minor version.
234235

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "wyoming_openai"
7-
version = "0.3.3"
7+
version = "0.3.4"
88
description = "OpenAI-Compatible Proxy Middleware for the Wyoming Protocol"
99
authors = [
1010
{ name = "Rory Eckel" }

src/wyoming_openai/handler.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from wyoming.server import AsyncEventHandler
1818
from wyoming.tts import Synthesize
1919

20-
from .compatibility import CustomAsyncOpenAI, TtsVoiceModel
20+
from .compatibility import CustomAsyncOpenAI, OpenAIBackend, TtsVoiceModel
2121
from .utilities import NamedBytesIO
2222

2323
_LOGGER = logging.getLogger(__name__)
@@ -169,13 +169,20 @@ async def _handle_audio_stop(self) -> None:
169169
async with self._client_lock:
170170
use_streaming = self._is_asr_model_streaming(self._current_asr_model.name)
171171

172+
# Prepare extra_body for SPEACHES backend
173+
extra_body = {}
174+
if hasattr(self._stt_client, 'backend') and self._stt_client.backend == OpenAIBackend.SPEACHES:
175+
extra_body["vad_filter"] = False
176+
_LOGGER.debug("Adding vad_filter=False for SPEACHES backend")
177+
172178
transcription = await self._stt_client.audio.transcriptions.create(
173179
file=self._wav_buffer,
174180
model=self._current_asr_model.name,
175181
temperature=self._stt_temperature or NOT_GIVEN,
176182
prompt=self._stt_prompt or NOT_GIVEN,
177183
response_format="json",
178-
stream=use_streaming
184+
stream=use_streaming,
185+
extra_body=extra_body if extra_body else None
179186
)
180187

181188
await self.write_event(TranscriptStart().event())

0 commit comments

Comments
 (0)