api

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2026 License: MIT Imports: 10 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SpeechHandler

type SpeechHandler struct {
	// contains filtered or unexported fields
}

SpeechHandler handles voice-dictation transcription requests.

func NewSpeechHandler

func NewSpeechHandler(
	transcriber SpeechTranscriber,
	enhancer TranscriptionEnhancer,
	logger kernel.Logger,
) *SpeechHandler

NewSpeechHandler creates a new SpeechHandler. A nil logger degrades to a discard sink so the handler is safe to construct in any context.

func (*SpeechHandler) Transcribe

func (h *SpeechHandler) Transcribe(w http.ResponseWriter, r *http.Request)

Transcribe handles the "Dictate with AI" endpoint: it transcribes the uploaded WAV, enhances the transcript into TipTap content, and returns both plus SEO metadata.

type SpeechTranscriber

type SpeechTranscriber interface {
	Transcribe(
		ctx context.Context,
		audio []byte,
		language string,
	) (speechdomain.Transcription, error)
}

SpeechTranscriber is the speech-to-text port the handler transcribes uploads with. Provider adapters implement it in infrastructure.

type TranscriptionEnhancer

type TranscriptionEnhancer interface {
	EnhanceTranscription(
		ctx context.Context,
		transcript string,
	) (textgendomain.EnhanceResult, error)
}

TranscriptionEnhancer turns a raw transcript into a polished TipTap document. The text generation service satisfies it structurally once the dictation prompt ships.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL