Skip to content

Commit

Permalink
[fix] update requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
Jourdelune committed Jun 2, 2024
1 parent 8ecce29 commit 234e0c4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dataset/process.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import shutil
from typing import List

from pydub import AudioSegment
Expand Down Expand Up @@ -33,7 +34,7 @@ def __init__(
self.export_path = export_path
self.sample_rate = sample_rate

if clean:
if clean and self.export_path and os.path.exists(self.export_path):
self.remove_export_folder()

self.create_export_folder()
Expand All @@ -56,7 +57,7 @@ def remove_export_folder(self) -> None:
"""Method to remove the export folder"""

if os.path.exists(self.export_path):
os.rmdir(self.export_path)
shutil.rmtree(self.export_path)

def _split_audio(
self, audio_path: str, split_windows: int = 32
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ evaluate
librosa
numpy
aeneas
pydub

0 comments on commit 234e0c4

Please sign in to comment.