Compare commits

...

3 Commits

Author SHA1 Message Date
5addf3a75c
fix: use 'api.TranscribeFromFile' instead of 'api.Transcribe' (#4)
This is a temporary fix as the 'api.Transcribe' function is not working correctly. Further investigation is required, which I don't have time for at the moment. Details of the problem are described in #4
2024-12-26 19:51:47 +03:00
bf82643090
fix: disable 'mouse trap' by cobra. lol 2024-12-26 02:02:19 +03:00
f58c2e2dd8
style: missing new line 2024-12-26 01:50:19 +03:00
2 changed files with 4 additions and 2 deletions

View File

@ -66,6 +66,8 @@ func ParseFlags() (*ParsedArguments, error) {
var parsedArgs *ParsedArguments
cobra.MousetrapHelpText = ""
rootCmd := &cobra.Command{
Use: "whisper",
Short: "Audio transcription using the OpenAI Whisper models",
@ -73,7 +75,7 @@ func ParseFlags() (*ParsedArguments, error) {
// Process language code with fallback
languageCode, err := processLanguageAndCode(args.Language)
if err != nil {
fmt.Printf("Error setting language, defaulting to English")
fmt.Println("Error setting language, defaulting to English")
// Default to English
languageCode = 0x6E65
}

View File

@ -63,7 +63,7 @@ func main() {
}
e.POST("/v1/audio/transcriptions", func(c echo.Context) error {
return api.Transcribe(c, whisperState)
return api.TranscribeFromFile(c, whisperState)
})
address := fmt.Sprintf("127.0.0.1:%d", args.Port)