Skip to content

Chore/clean saving folder - #1

Open
kimmchii wants to merge 3 commits into
mainfrom
chore/clean-saving-folder
Open

Chore/clean saving folder#1
kimmchii wants to merge 3 commits into
mainfrom
chore/clean-saving-folder

Conversation

@kimmchii

@kimmchii kimmchii commented Feb 3, 2025

Copy link
Copy Markdown
Collaborator
  • make it more readability when saving audio snippets
  • remove some builtin packages in requirements.txt

@kimmchii
kimmchii requested a review from titipata February 3, 2025 13:32

@titipata titipata left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@bluenex
bluenex requested a review from Copilot May 23, 2025 03:41

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Refactors how audio segments are saved by centralizing and timestamping output directories, and removes redundant package entries.

  • Imports time to generate timestamped folders.
  • Moves segments/ root folder creation to module scope.
  • Creates nested timestamped and per-file directories for segmented audio and updates split_audio target path.
Comments suppressed due to low confidence (1)

app.py:41

  • [nitpick] Using output_wav_name (which includes the .wav extension) for a directory name can be confusing. Consider using the stem (e.g., Path(output_wav_name).stem) so the folder name doesn’t include the file extension.
segment_audios_folder = current_time_segment_folder / output_wav_name

Comment thread app.py
Comment on lines +38 to +42
os.makedirs(current_time_segment_folder, exist_ok=True)

# Create folder for segmented audios.
segment_audios_folder = current_time_segment_folder / output_wav_name
os.makedirs(segment_audios_folder, exist_ok=True)

Copilot AI May 23, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency with the rest of the codebase using pathlib.Path, you could replace os.makedirs(...) with current_time_segment_folder.mkdir(exist_ok=True, parents=true).

Suggested change
os.makedirs(current_time_segment_folder, exist_ok=True)
# Create folder for segmented audios.
segment_audios_folder = current_time_segment_folder / output_wav_name
os.makedirs(segment_audios_folder, exist_ok=True)
current_time_segment_folder.mkdir(exist_ok=True, parents=True)
# Create folder for segmented audios.
segment_audios_folder = current_time_segment_folder / output_wav_name
segment_audios_folder.mkdir(exist_ok=True, parents=True)

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants