Metadata-Version: 2.4
Name: wyoming-mlx-whisper
Version: 1.0.0
Summary: Wyoming Server for MLX whisper
Project-URL: Homepage, https://github.com/basnijholt/wyoming-mlx-whisper
Project-URL: Repository, https://github.com/basnijholt/wyoming-mlx-whisper.git
Author: Vincent Lin
Author-email: Bas Nijholt <bas@nijholt.com>
License-Expression: MIT
License-File: LICENSE
Keywords: mlx,rhasspy,stt,whisper,wyoming
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Text Processing :: Linguistic
Requires-Python: <3.14,>=3.10
Requires-Dist: mlx-whisper
Requires-Dist: numpy
Requires-Dist: typer
Requires-Dist: wyoming
Provides-Extra: dev
Requires-Dist: mypy; extra == 'dev'
Requires-Dist: pre-commit; extra == 'dev'
Requires-Dist: pytest; extra == 'dev'
Requires-Dist: pytest-asyncio; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Description-Content-Type: text/markdown

# Wyoming MLX Whisper

[Wyoming protocol](https://github.com/rhasspy/wyoming) server for [mlx-whisper](https://pypi.org/project/mlx-whisper) speech-to-text on Apple Silicon.

Uses `mlx-community/whisper-large-v3-turbo` by default, which runs near real-time on M1 Pro and newer.

<details><summary><b><u>[ToC]</u></b> 📚</summary>

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

- [Requirements](#requirements)
- [Installation](#installation)
  - [Using uv (recommended)](#using-uv-recommended)
  - [Using pip](#using-pip)
- [Usage](#usage)
  - [Run directly](#run-directly)
  - [Run as macOS service (launchd)](#run-as-macos-service-launchd)
- [Options](#options)
- [Development](#development)
- [Acknowledgements](#acknowledgements)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

</details>

## Requirements

- macOS with Apple Silicon (M1/M2/M3)
- Python 3.10-3.13
- [uv](https://docs.astral.sh/uv/) (recommended) or pip

## Installation

### Using uv (recommended)

```sh
git clone https://github.com/basnijholt/wyoming-mlx-whisper.git
cd wyoming-mlx-whisper
uv sync
```

### Using pip

```sh
git clone https://github.com/basnijholt/wyoming-mlx-whisper.git
cd wyoming-mlx-whisper
pip install .
```

## Usage

### Run directly

```sh
# With uv
uv run wyoming-mlx-whisper --uri tcp://0.0.0.0:7891

# Or if installed with pip
wyoming-mlx-whisper --uri tcp://0.0.0.0:7891
```

### Run as macOS service (launchd)

Install the service (starts automatically on login):

```sh
./scripts/install_service.sh
```

The server runs at `tcp://localhost:7891` by default.

Uninstall the service:

```sh
./scripts/uninstall_service.sh
```

View logs:

```sh
tail -f log/run.out log/run.err
```

## Options

<details>
<summary>See the output of <code>wyoming-mlx-whisper --help</code></summary>

<!-- CODE:BASH:START -->
<!-- echo '```' -->
<!-- uv run wyoming-mlx-whisper --help -->
<!-- echo '```' -->
<!-- CODE:END -->
<!-- OUTPUT:START -->
<!-- ⚠️ This content is auto-generated by `markdown-code-runner`. -->
```

 Usage: wyoming-mlx-whisper [OPTIONS]

 Run the Wyoming MLX Whisper server.

╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --uri                           TEXT  unix:// or tcp://                      │
│                                       [env var: WHISPER_URI]                 │
│                                       [default: tcp://0.0.0.0:10300]         │
│ --model                         TEXT  Name of MLX Whisper model to use       │
│                                       [env var: WHISPER_MODEL]               │
│                                       [default:                              │
│                                       mlx-community/whisper-large-v3-turbo]  │
│ --language                      TEXT  Language code (e.g., 'en')             │
│                                       [env var: WHISPER_LANGUAGE]            │
│ --debug           --no-debug          Log DEBUG messages                     │
│                                       [env var: WHISPER_DEBUG]               │
│                                       [default: no-debug]                    │
│ --log-format                    TEXT  Format for log messages                │
│                                       [default:                              │
│                                       %(levelname)s:%(name)s:%(message)s]    │
│ --version                             Print version and exit                 │
│ --help        -h                      Show this message and exit.            │
╰──────────────────────────────────────────────────────────────────────────────╯

```

<!-- OUTPUT:END -->

</details>

## Development

```sh
uv sync
uv run pre-commit install
```

## Acknowledgements

- Forked from [vincent861223/wyoming-mlx-whisper](https://github.com/vincent861223/wyoming-mlx-whisper) by Vincent Lin
- Based on [wyoming-whisper-api-client](https://github.com/ser/wyoming-whisper-api-client) by Dr. Serge Victor
