diff --git a/amazon_transcribe_handler.go b/amazon_transcribe_handler.go index 6803f78..32214b2 100644 --- a/amazon_transcribe_handler.go +++ b/amazon_transcribe_handler.go @@ -3,6 +3,7 @@ package suzu import ( "context" "encoding/json" + "errors" "io" "github.com/aws/aws-sdk-go/service/transcribestreamingservice" @@ -73,7 +74,7 @@ func (h *AmazonTranscribeHandler) Handle(ctx context.Context, reader io.Reader) go func() { defer oggWriter.Close() if err := opus2ogg(ctx, reader, oggWriter, h.SampleRate, h.ChannelCount, h.Config); err != nil { - if err != io.EOF { + if !errors.Is(err, io.EOF) { zlog.Error(). Err(err). Str("channel_id", h.ChannelID).