🐛[bugfix] Model : print文削除/speaker energy のエラー発生問題を修正
This commit is contained in:
1
model.py
1
model.py
@@ -139,7 +139,6 @@ class Model:
|
|||||||
return engine_name
|
return engine_name
|
||||||
|
|
||||||
def getInputTranslate(self, message):
|
def getInputTranslate(self, message):
|
||||||
print(config.CHOICE_TRANSLATOR, config.AUTH_KEYS)
|
|
||||||
if config.CHOICE_TRANSLATOR == "DeepL_API":
|
if config.CHOICE_TRANSLATOR == "DeepL_API":
|
||||||
if config.TARGET_LANGUAGE == "English":
|
if config.TARGET_LANGUAGE == "English":
|
||||||
if config.TARGET_COUNTRY in ["United States", "Canada", "Philippines"]:
|
if config.TARGET_COUNTRY in ["United States", "Canada", "Philippines"]:
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ class SelectedSpeakeEnergyRecorder(BaseEnergyRecorder):
|
|||||||
source = Microphone(speaker=True,
|
source = Microphone(speaker=True,
|
||||||
device_index= device["index"],
|
device_index= device["index"],
|
||||||
sample_rate=int(device["defaultSampleRate"]),
|
sample_rate=int(device["defaultSampleRate"]),
|
||||||
|
channels=device["maxInputChannels"]
|
||||||
)
|
)
|
||||||
super().__init__(source=source)
|
super().__init__(source=source)
|
||||||
# self.adjustForNoise()
|
# self.adjustForNoise()
|
||||||
@@ -21,7 +21,6 @@ class Translator():
|
|||||||
return result
|
return result
|
||||||
|
|
||||||
def translate(self, translator_name, source_language, target_language, message):
|
def translate(self, translator_name, source_language, target_language, message):
|
||||||
print(translator_name, source_language, target_language, message)
|
|
||||||
try:
|
try:
|
||||||
result = ""
|
result = ""
|
||||||
source_language=translation_lang[translator_name]["source"][source_language]
|
source_language=translation_lang[translator_name]["source"][source_language]
|
||||||
|
|||||||
Reference in New Issue
Block a user