Documentation
¶
Overview ¶
Package speech is the official voice-dictation module: speech-to-text transcription over Meta Model API or any OpenAI-compatible endpoint, enhanced into TipTap content by the text generation service.
Index ¶
- Constants
- type Module
- func (m *Module) AdminManifest() kernel.AdminExtensionManifest
- func (m *Module) Handler() *api.SpeechHandler
- func (m *Module) Init(_ kernel.Kernel) error
- func (m *Module) Name() string
- func (m *Module) Optional() []string
- func (m *Module) Requires() []string
- func (m *Module) Service() speechdomain.SpeechToTextService
- func (m *Module) Shutdown() error
- func (m *Module) Version() string
- type Option
Constants ¶
const Name = "speech"
Name is the registry key for this module.
const Version = "0.1.0"
Version is the module version reported via Module.Version.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
Module is the speech kernel module.
func New ¶
New builds the module, adopting the composition root's wiring. The handler is built once here so routes serve the same instance.
func (*Module) AdminManifest ¶
func (m *Module) AdminManifest() kernel.AdminExtensionManifest
AdminManifest declares this module's admin-shell extensions. The Dictate button renders data-driven from the /api/health feature flags, so the module declares no menu entries, settings sections, or editor extensions.
func (*Module) Handler ¶
func (m *Module) Handler() *api.SpeechHandler
Handler exposes the speech handler for core mounting. Core mounts it explicitly (rather than via RouteProvider) because the surface is gated by the speechEnabled feature flag, which a single RegisterRoutes call cannot express.
func (*Module) Init ¶
Init wires the module. The handler is already built by New; Init only validates presence.
func (*Module) Optional ¶
Optional lists soft dependencies. The text generation service is adopted directly (not via the registry), so no module coordination is needed.
func (*Module) Requires ¶
Requires lists hard dependencies. Dictation degrades to unmounted when the providers are unconfigured, so nothing is required.
func (*Module) Service ¶
func (m *Module) Service() speechdomain.SpeechToTextService
Service exposes the adopted transcription service. It stays valid for the module's lifetime.
type Option ¶
type Option func(*Module)
Option configures a Module. The composition root supplies every option; direct construction without options yields a standalone module that serves nothing (the handler built over nil dependencies must not be invoked).
func WithEnhancer ¶
func WithEnhancer(enhancer api.TranscriptionEnhancer) Option
WithEnhancer adopts the transcription enhancer (the text generation service from the composition root, nil when unconfigured). Without one the handler cannot shape transcripts into content.
func WithLogger ¶
WithLogger attaches the module logger. Without one handler failures are dropped (discard sink).
func WithTranscriber ¶
func WithTranscriber(service speechdomain.SpeechToTextService) Option
WithTranscriber adopts the speech-to-text service (composition root, nil when unconfigured). The handler is only mounted when a transcriber exists.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package admin owns this module's admin-shell extensions: the declarative UI the single admin SPA renders for voice dictation.
|
Package admin owns this module's admin-shell extensions: the declarative UI the single admin SPA renders for voice dictation. |
|
Package speech is the voice-dictation module's domain layer: the speech-to-text port, its result value types, and the WAV validator that keeps unbilled garbage audio from reaching the provider.
|
Package speech is the voice-dictation module's domain layer: the speech-to-text port, its result value types, and the WAV validator that keeps unbilled garbage audio from reaching the provider. |
|
Package infrastructure adapts the speech module's domain port onto speech-to-text provider APIs.
|
Package infrastructure adapts the speech module's domain port onto speech-to-text provider APIs. |
|
Package testutil provides the kernel fixture module tests run against.
|
Package testutil provides the kernel fixture module tests run against. |