From 5828e846169ce243d68b119c830c4135d3799b52 Mon Sep 17 00:00:00 2001 From: Yoshida Hiroshi Date: Wed, 14 Feb 2024 16:25:17 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=B3=E3=82=B9=E3=83=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- amazon_transcribe_handler.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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).