23 lines
572 B
Go
23 lines
572 B
Go
package recognizer
|
|
|
|
import (
|
|
"io"
|
|
|
|
"git.vakhrushev.me/av/transcriber/internal/entity"
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
type MemoryAudioRecognizer struct{}
|
|
|
|
func (r *MemoryAudioRecognizer) Recognize(file io.Reader, fileName string) (operationID string, err error) {
|
|
return uuid.NewString(), nil
|
|
}
|
|
|
|
func (r *MemoryAudioRecognizer) GetRecognitionText(operationID string) (string, error) {
|
|
return "Foo bar, Baz.", nil
|
|
}
|
|
|
|
func (r *MemoryAudioRecognizer) CheckRecognitionStatus(operationID string) (*entity.RecognitionResult, error) {
|
|
return entity.NewCompletedResult(), nil
|
|
}
|