Skip to content

Commit

Permalink
コメントを追加する
Browse files Browse the repository at this point in the history
  • Loading branch information
Hexa committed Feb 15, 2024
1 parent 6f26dcb commit 2174edf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions speech_to_text.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,15 @@ func (stt SpeechToText) Start(ctx context.Context, r io.Reader) (speechpb.Speech
client, err := speech.NewClient(ctx, opts...)
if err != nil {
return nil, &SuzuError{
// TODO: 適切な StatusCode に変更する
Code: 500,
Message: err.Error(),
}
}
stream, err := client.StreamingRecognize(ctx)
if err != nil {
return nil, &SuzuError{
// TODO: 適切な StatusCode に変更する
Code: 500,
Message: err.Error(),
}
Expand All @@ -60,6 +62,7 @@ func (stt SpeechToText) Start(ctx context.Context, r io.Reader) (speechpb.Speech
StreamingRequest: streamingRecognitionConfig,
}); err != nil {
return nil, &SuzuError{
// TODO: 適切な StatusCode に変更する
Code: 500,
Message: err.Error(),
}
Expand Down

0 comments on commit 2174edf

Please sign in to comment.