feat: Mono-Funktion hinzugefügt
Co-authored-by: aider (ollama/qwen2.5-coder:14b) <aider@aider.chat>
This commit is contained in:
1 parent
c4c5ff0b20
commit
8b1bd21c2e
1 file changed
+4
-2
@@ -79,8 +79,10 @@ class MainWindow(QMainWindow):
|
||||
if file_path:
|
||||
try:
|
||||
self.audio_data, self.sample_rate = sf.read(file_path)
|
||||
if len(self.audio_data.shape) != 2:
|
||||
raise ValueError("Die WAV-Datei muss Stereo sein.")
|
||||
if len(self.audio_data.shape) == 1:
|
||||
self.audio_data = self.audio_data.reshape(-1, 1) # Mono zu Stereo konvertieren
|
||||
elif len(self.audio_data.shape) != 2:
|
||||
raise ValueError("Die WAV-Datei muss Stereo oder Mono sein.")
|
||||
except Exception as e:
|
||||
print(f"Fehler beim Laden der WAV-Datei: {e}")
|
||||
self.audio_data = None
|
||||
|
||||
Reference in new issue
Block a user