### Installing Development Dependencies for Ruff Source: https://github.com/roryeckel/wyoming_openai/blob/main/README.md This command installs the necessary development dependencies for the project, specifically enabling the use of Ruff for linting and code quality checks. The `.[dev]` syntax ensures that optional development-specific packages are included. ```bash pip install -e ".[dev]" ``` -------------------------------- ### Running the Wyoming OpenAI Proxy Server with Command Line Arguments (Bash) Source: https://github.com/roryeckel/wyoming_openai/blob/main/README.md This command demonstrates how to start the Wyoming OpenAI proxy server, configuring both Speech-to-Text (STT) and Text-to-Speech (TTS) services using OpenAI. It specifies the server URI, logging level, supported languages, API keys, OpenAI URLs, models, TTS voices, and speech speed. Replace placeholder API keys with actual ones. ```bash python -m wyoming_openai \ --uri tcp://0.0.0.0:10300 \ --log-level INFO \ --languages en \ --stt-openai-key YOUR_STT_API_KEY_HERE \ --stt-openai-url https://api.openai.com/v1 \ --stt-models whisper-1 \ --stt-backend OPENAI \ --tts-openai-key YOUR_TTS_API_KEY_HERE \ --tts-openai-url https://api.openai.com/v1 \ --tts-models tts-1 \ --tts-voices alloy echo fable onyx nova shimmer \ --tts-backend OPENAI \ --tts-speed 1.0 ``` -------------------------------- ### Installing Wyoming OpenAI as a Regular Production Package (Bash) Source: https://github.com/roryeckel/wyoming_openai/blob/main/README.md This command installs the `wyoming_openai` package in a standard, non-editable mode. This is typically used for production deployments or when the package is installed globally, as it does not link back to the source directory for live changes. ```bash pip install . ``` -------------------------------- ### Deploying Wyoming OpenAI with Kokoro-FastAPI and Speaches (Bash) Source: https://github.com/roryeckel/wyoming_openai/blob/main/README.md This command deploys the Wyoming OpenAI proxy server, Kokoro-FastAPI for TTS, and Speaches for STT, by combining two Docker Compose files: `docker-compose.speaches.yml` and `docker-compose.kokoro-fastapi.yml`. This setup provides a comprehensive local speech processing environment, running all services in detached mode. ```bash docker compose -f docker-compose.speaches.yml -f docker-compose.kokoro-fastapi.yml up -d ``` -------------------------------- ### Cloning the Wyoming OpenAI Repository (Bash) Source: https://github.com/roryeckel/wyoming_openai/blob/main/README.md This command sequence clones the Wyoming OpenAI project repository from GitHub and navigates into the newly created directory. It's the first step for local development setup. ```bash git clone https://github.com/roryeckel/wyoming-openai.git cd wyoming-openai ``` -------------------------------- ### Installing Wyoming OpenAI in Editable Development Mode (Bash) Source: https://github.com/roryeckel/wyoming_openai/blob/main/README.md This command installs the `wyoming_openai` package in editable mode within an activated virtual environment. This allows developers to make changes to the source code without needing to reinstall the package after each modification, facilitating rapid iteration during development. ```bash pip install -e . ``` -------------------------------- ### Deploying Wyoming OpenAI Proxy with Docker Compose Source: https://github.com/roryeckel/wyoming_openai/blob/main/README.md This command starts the Wyoming OpenAI proxy server as a detached Docker container using the `docker-compose.yml` configuration. It ensures the service runs in the background, making it available for use. ```bash docker compose -f docker-compose.yml up -d ``` -------------------------------- ### Developing Wyoming OpenAI Proxy Server with Docker (Bash) Source: https://github.com/roryeckel/wyoming_openai/blob/main/README.md This command is used for developing the Wyoming OpenAI proxy server, building it from source. It combines the base `docker-compose.yml` with the development-specific `docker-compose.dev.yml` to set up the environment. The `--build` flag ensures that the service images are rebuilt, incorporating any local code changes, and `-d` runs them in detached mode. ```bash docker compose -f docker-compose.yml -f docker-compose.dev.yml up -d --build ``` -------------------------------- ### Creating and Activating a Python Virtual Environment (Bash) Source: https://github.com/roryeckel/wyoming_openai/blob/main/README.md These commands create a new Python virtual environment named 'venv' and then activate it. Using a virtual environment isolates project dependencies, preventing conflicts with global Python packages. The activation command differs for Windows. ```bash python3 -m venv venv source venv/bin/activate ``` -------------------------------- ### Developing Wyoming OpenAI with Speaches Local Service (Bash) Source: https://github.com/roryeckel/wyoming_openai/blob/main/README.md This command sets up a development environment for the Wyoming OpenAI proxy server while integrating the Speaches local service. It combines `docker-compose.speaches.yml` for STT/TTS capabilities with `docker-compose.dev.yml` for development-specific configurations. The `--build` flag ensures that the images are rebuilt from source, and `-d` runs them in detached mode. ```bash docker compose -f docker-compose.speaches.yml -f docker-compose.dev.yml up -d --build ``` -------------------------------- ### Deploying Wyoming OpenAI with Speaches Local Service (Bash) Source: https://github.com/roryeckel/wyoming_openai/blob/main/README.md This command deploys the Wyoming OpenAI proxy server along with the Speaches local service using Docker Compose. It utilizes the `docker-compose.speaches.yml` file, which configures both services for Speech-to-Text (STT) and Text-to-Speech (TTS) capabilities, enabling local processing instead of official OpenAI services. The `-d` flag runs the services in detached mode. ```bash docker compose -f docker-compose.speaches.yml up -d ``` -------------------------------- ### Communication Flow: Home Assistant with Wyoming OpenAI and OpenAI API (ASR/TTS) Source: https://github.com/roryeckel/wyoming_openai/blob/main/README.md This sequence diagram illustrates the communication flow between Home Assistant, the `wyoming_openai` proxy server, and the OpenAI API for both Speech-to-Text (ASR) and Text-to-Speech (TTS) tasks. It details how audio chunks are streamed and processed. ```mermaid sequenceDiagram participant HA as Home Assistant participant WY as wyoming_openai participant OAPI as OpenAI API Note over HA,OAPI: Speech-to-Text (STT/ASR) Flow HA->>WY: Transcribe event HA->>WY: AudioStart event loop Audio Streaming HA->>WY: AudioChunk events Note over WY: Buffers WAV data end HA->>WY: AudioStop event WY->>OAPI: Send complete audio file OAPI-->>WY: Text transcript response WY-->>HA: Transcript event Note over HA,OAPI: Text-to-Speech (TTS) Flow HA->>WY: Synthesize event (text + voice) WY->>OAPI: Speech synthesis request WY->>HA: AudioStart event loop Audio Streaming OAPI-->>WY: Audio stream chunks WY-->>HA: AudioChunk events end WY->>HA: AudioStop event ``` -------------------------------- ### Running Ruff for Code Quality Checks Source: https://github.com/roryeckel/wyoming_openai/blob/main/README.md This command executes Ruff, a fast Python linter, to perform code quality checks across the entire project directory. It helps maintain code standards and identify potential issues. ```bash ruff check . ``` -------------------------------- ### Communication Flow: Open WebUI with OpenAI API (ASR/TTS) Source: https://github.com/roryeckel/wyoming_openai/blob/main/README.md This sequence diagram shows the direct communication flow between Open WebUI and the OpenAI API for Speech-to-Text (ASR) and Text-to-Speech (TTS) tasks, highlighting that no proxy is required due to native OpenAI-compatible endpoint support. ```mermaid sequenceDiagram participant OW as Open WebUI participant OAPI as OpenAI API Note over OW,OAPI: Speech-to-Text (STT/ASR) Flow OW->>OAPI: Direct audio transcription request OAPI-->>OW: Text transcript response Note over OW,OAPI: Text-to-Speech (TTS) Flow OW->>OAPI: Direct speech synthesis request OAPI-->>OW: Audio stream response ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.