🐛[bugfix] Model : speaker channel audio_sources["channels"] -> 2 に固定

This commit is contained in:
misyaguziya
2024-06-19 17:34:57 +09:00
parent bf77195210
commit 593eed7988

View File

@@ -99,7 +99,7 @@ class AudioTranscriber:
def processSpeakerData(self):
temp_file = BytesIO()
with wave.open(temp_file, 'wb') as wf:
wf.setnchannels(self.audio_sources["channels"])
wf.setnchannels(2)
wf.setsampwidth(get_sample_size(paInt16))
wf.setframerate(self.audio_sources["sample_rate"])
wf.writeframes(self.audio_sources["last_sample"])