mirror of https://github.com/usememos/memos
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
596 B
Go
30 lines
596 B
Go
package ai
|
|
|
|
import (
|
|
"context"
|
|
"io"
|
|
)
|
|
|
|
// Transcriber transcribes audio into text.
|
|
type Transcriber interface {
|
|
Transcribe(ctx context.Context, request TranscribeRequest) (*TranscribeResponse, error)
|
|
}
|
|
|
|
// TranscribeRequest contains an audio transcription request.
|
|
type TranscribeRequest struct {
|
|
Model string
|
|
Filename string
|
|
ContentType string
|
|
Audio io.Reader
|
|
Size int64
|
|
Prompt string
|
|
Language string
|
|
}
|
|
|
|
// TranscribeResponse contains an audio transcription response.
|
|
type TranscribeResponse struct {
|
|
Text string
|
|
Language string
|
|
Duration float64
|
|
}
|