Fix blankerror
@@ -20,6 +20,7 @@ from osr2mp4 import log_stream
Audio2p = recordclass("Audio2p", "rate audio")
+SilentHitsound = AudioSegment.silent(duration=1)
def from_notwav(filename, settings):
@@ -27,9 +28,12 @@ def from_notwav(filename, settings):
raise FileNotFoundError
stream = log_stream()
+ try:
subprocess.check_call([settings.ffmpeg, '-i', filename, '-ar', '44100', os.path.join(settings.temp, 'converted.wav'), '-y'], stdout=stream, stderr=stream)
-
a = AudioSegment.from_file(settings.temp + 'converted.wav')
+ except:
+ a = SilentHitsound
+
return a
