feat: audio surfaces (TTS + transcription), imagegen.Editor, llamaswap health probe
- New leaf package `audio` (ADR-0017): SpeechModel/SpeechProvider and TranscriptionModel/TranscriptionProvider with imagegen conventions (zero value = backend default, functional options + Apply, bytes in/out, never URLs). Root re-exports added. - imagegen.Editor (ADR-0018): optional image-to-image interface — EditRequest carries the generation knobs plus Init image and denoising Strength; separate interface so existing Models keep compiling. - provider/llamaswap implements all of it: POST /v1/audio/speech (JSON, raw-audio response, MIME from Content-Type with format fallback), POST /v1/audio/transcriptions (multipart, response_format=json), ListVoices (GET /v1/audio/voices?model=, tolerant of string-list and object-list shapes), POST /sdapi/v1/img2img (txt2img wire + init_images/denoising_strength, shared image decode), and Health(ctx) (GET /health) — a cheap liveness probe for often-offline hosts. - Hermetic httptest coverage for every new wire shape and validation path; README sections + support-matrix footnote updated in the same commit (also corrects the stale /v1/images/generations claim — the image path has been SDAPI since the seed fix). First consumer: mort's llamaswap media tool cluster (status / image / TTS / STT agent tools against the netherstorm host). Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01AXQxVhXBw8PwFAtsVrXSmj
This commit is contained in:
@@ -26,6 +26,7 @@ import (
|
||||
"encoding/json"
|
||||
"sync"
|
||||
|
||||
"gitea.stevedudenhoeffer.com/steve/majordomo/audio"
|
||||
"gitea.stevedudenhoeffer.com/steve/majordomo/imagegen"
|
||||
"gitea.stevedudenhoeffer.com/steve/majordomo/llm"
|
||||
)
|
||||
@@ -67,6 +68,26 @@ type (
|
||||
ImageResult = imagegen.Result
|
||||
ImageOption = imagegen.Option
|
||||
ImageModelOption = imagegen.ModelOption
|
||||
ImageEditor = imagegen.Editor
|
||||
ImageEditRequest = imagegen.EditRequest
|
||||
ImageEditOption = imagegen.EditOption
|
||||
)
|
||||
|
||||
// Re-exported canonical speech types. See the audio package for
|
||||
// documentation. Speech synthesis and transcription are separate contracts
|
||||
// from llm, mirroring imagegen (ADR-0017); the first backend is
|
||||
// provider/llamaswap.
|
||||
type (
|
||||
SpeechModel = audio.SpeechModel
|
||||
SpeechProvider = audio.SpeechProvider
|
||||
SpeechRequest = audio.SpeechRequest
|
||||
SpeechResult = audio.SpeechResult
|
||||
SpeechOption = audio.SpeechOption
|
||||
TranscriptionModel = audio.TranscriptionModel
|
||||
TranscriptionProvider = audio.TranscriptionProvider
|
||||
TranscriptionRequest = audio.TranscriptionRequest
|
||||
TranscriptionResult = audio.TranscriptionResult
|
||||
TranscriptionOption = audio.TranscriptionOption
|
||||
)
|
||||
|
||||
// Re-exported role and finish-reason constants.
|
||||
|
||||
Reference in New Issue
Block a user