mirror of
https://github.com/OwO-Network/DeepLX.git
synced 2024-11-16 13:32:39 +08:00
fix: Bug when the source language is English
This commit is contained in:
parent
7f0919c4c9
commit
0532327aed
14
main.go
14
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
|
||||
|
|
Loading…
Reference in New Issue
Block a user