mirror of
https://github.com/OwO-Network/DeepLX.git
synced 2024-11-16 18:22:20 +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 {
|
type CommonJobParams struct {
|
||||||
WasSpoken bool `json:"wasSpoken"`
|
WasSpoken bool `json:"wasSpoken"`
|
||||||
TranscribeAS string `json:"transcribe_as"`
|
TranscribeAS string `json:"transcribe_as"`
|
||||||
RegionalVariant string `json:"regionalVariant"`
|
// RegionalVariant string `json:"regionalVariant"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Params struct {
|
type Params struct {
|
||||||
|
@ -57,9 +57,9 @@ func init_data(source_lang string, target_lang string) *PostData {
|
||||||
TargetLang: target_lang,
|
TargetLang: target_lang,
|
||||||
},
|
},
|
||||||
CommonJobParams: CommonJobParams{
|
CommonJobParams: CommonJobParams{
|
||||||
WasSpoken: false,
|
WasSpoken: false,
|
||||||
TranscribeAS: "",
|
TranscribeAS: "",
|
||||||
RegionalVariant: "en-US",
|
// RegionalVariant: "en-US",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -131,7 +131,7 @@ func main() {
|
||||||
post_data := init_data(source_lang, target_lang)
|
post_data := init_data(source_lang, target_lang)
|
||||||
text := Text{
|
text := Text{
|
||||||
Text: translate_text,
|
Text: translate_text,
|
||||||
RequestAlternatives: 0,
|
RequestAlternatives: 3,
|
||||||
}
|
}
|
||||||
// set id
|
// set id
|
||||||
post_data.ID = id
|
post_data.ID = id
|
||||||
|
|
Loading…
Reference in New Issue
Block a user