[Refactor] Simplify conditional checks for transcript retrieval in Model class
This commit is contained in:
@@ -452,9 +452,9 @@ class Model:
|
|||||||
config.MIC_AVG_LOGPROB,
|
config.MIC_AVG_LOGPROB,
|
||||||
config.MIC_NO_SPEECH_PROB
|
config.MIC_NO_SPEECH_PROB
|
||||||
)
|
)
|
||||||
if res:
|
if res:
|
||||||
result = self.mic_transcriber.getTranscript()
|
result = self.mic_transcriber.getTranscript()
|
||||||
fnc(result)
|
fnc(result)
|
||||||
except Exception:
|
except Exception:
|
||||||
errorLogging()
|
errorLogging()
|
||||||
|
|
||||||
@@ -635,9 +635,9 @@ class Model:
|
|||||||
config.SPEAKER_AVG_LOGPROB,
|
config.SPEAKER_AVG_LOGPROB,
|
||||||
config.SPEAKER_NO_SPEECH_PROB
|
config.SPEAKER_NO_SPEECH_PROB
|
||||||
)
|
)
|
||||||
if res:
|
if res:
|
||||||
result = self.speaker_transcriber.getTranscript()
|
result = self.speaker_transcriber.getTranscript()
|
||||||
fnc(result)
|
fnc(result)
|
||||||
except Exception:
|
except Exception:
|
||||||
errorLogging()
|
errorLogging()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user