Switch file to io stream in recognizer interface
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package contract
|
||||
|
||||
import (
|
||||
"io"
|
||||
|
||||
"git.vakhrushev.me/av/transcriber/internal/entity"
|
||||
)
|
||||
|
||||
@@ -8,13 +10,8 @@ type AudioFileConverter interface {
|
||||
Convert(src, dest string) error
|
||||
}
|
||||
|
||||
type YandexS3Uploader interface {
|
||||
UploadFile(filePath, fileName string) error
|
||||
FileUrl(fileName string) string
|
||||
}
|
||||
|
||||
type AudioRecognizer interface {
|
||||
RecognizeFile(filePath string) (operationID string, err error)
|
||||
Recognize(file io.Reader, fileName string) (operationID string, err error)
|
||||
GetRecognitionText(operationID string) (string, error)
|
||||
CheckRecognitionStatus(operationID string) (*entity.RecognitionResult, error)
|
||||
}
|
||||
|
Reference in New Issue
Block a user