mirror of
https://github.com/ollama/ollama.git
synced 2026-11-12 03:46:14 -06:00
* mlxrunner: add Phonon text-to-speech support Add Phonon text-to-speech through the existing MLX runner, with an OpenAI-compatible speech endpoint and CLI playback. Include model loading, text preprocessing, streaming audio, and regression tests. * docs: add speech models * fix min version --------- Co-authored-by: Daniel Hiltgen <daniel@ollama.com>
14 lines
341 B
Go
14 lines
341 B
Go
package model
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/ollama/ollama/llm"
|
|
)
|
|
|
|
// SpeechModel generates speech instead of text. The runner loads it like any
|
|
// model and serves it with Speak, which emits 24 kHz mono samples.
|
|
type SpeechModel interface {
|
|
Speak(ctx context.Context, req llm.SpeechRequest, emit func(samples []float32) error) error
|
|
}
|