From 0e96522cfd75dd56d41066bb01d406b46ae9d2b7 Mon Sep 17 00:00:00 2001 From: xaloc Date: Sun, 12 Nov 2023 00:44:50 +0100 Subject: [PATCH] fix white spaces in app.py --- app.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app.py b/app.py index d87c7fb..946dd2d 100644 --- a/app.py +++ b/app.py @@ -1,5 +1,5 @@ import speech_recognition as sr -import os +import os from pydub import AudioSegment from pydub.silence import split_on_silence @@ -21,13 +21,13 @@ def large_audio(path, minutes=5): """Splitting the large audio file into fixed interval chunks and apply speech recognition on each of these chunks""" print("Loading file") - sound = AudioSegment.from_file(path) + sound = AudioSegment.from_file(path) print(len(sound)) print("Splitting file") chunk_length_ms = int(1000 * 60 * minutes) # convert to milliseconds chunks = [sound[i:i + chunk_length_ms] for i in range(0, len(sound), chunk_length_ms)] folder_name = "audio-fixed-chunks" - + if not os.path.isdir(folder_name): os.mkdir(folder_name) whole_text = ""