From 0532327aede56e3e9784010f0be9234c78a2f388 Mon Sep 17 00:00:00 2001 From: Vincent Young Date: Sat, 18 Feb 2023 20:14:02 +0800 Subject: [PATCH] fix: Bug when the source language is English --- main.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/main.go b/main.go index 999ef5f..45c6018 100644 --- a/main.go +++ b/main.go @@ -21,9 +21,9 @@ type Lang struct { } type CommonJobParams struct { - WasSpoken bool `json:"wasSpoken"` - TranscribeAS string `json:"transcribe_as"` - RegionalVariant string `json:"regionalVariant"` + WasSpoken bool `json:"wasSpoken"` + TranscribeAS string `json:"transcribe_as"` + // RegionalVariant string `json:"regionalVariant"` } type Params struct { @@ -57,9 +57,9 @@ func init_data(source_lang string, target_lang string) *PostData { TargetLang: target_lang, }, CommonJobParams: CommonJobParams{ - WasSpoken: false, - TranscribeAS: "", - RegionalVariant: "en-US", + WasSpoken: false, + TranscribeAS: "", + // RegionalVariant: "en-US", }, }, } @@ -131,7 +131,7 @@ func main() { post_data := init_data(source_lang, target_lang) text := Text{ Text: translate_text, - RequestAlternatives: 0, + RequestAlternatives: 3, } // set id post_data.ID = id