Skip to content

Commit

Permalink
update after CI
Browse files Browse the repository at this point in the history
  • Loading branch information
linyueqian committed Sep 28, 2023
1 parent aed4338 commit 282ed41
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
8 changes: 4 additions & 4 deletions egs2/acesinger/svs1/local/data_prep.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ def load_and_process_transcriptions(src_data, transcriptions_path, song_folder):
midi_notes.append((start_time, end_time))
pitch = note.pitch
midis.append(pitch)
# Step 2: Split the content in each row to name, lyrics, phns, pitch, duration, is_slur by |
# Step 2: Split the content in each row to name, lyrics, phns, pitch, duration,
# is_slur by |
parsed_transcriptions = [row.split("|") for row in transcriptions]

# Step 3: Find all the rows' corresponding name in the txt file starting with 2001
Expand All @@ -104,7 +105,8 @@ def load_and_process_transcriptions(src_data, transcriptions_path, song_folder):
duration = duration[1:]
pitches = pitches[1:]

# sum duration by the string of durations, first split the string by space, then convert the string to float, then sum the float
# sum duration by the string of durations, first split the string by space,
# then convert the string to float, then sum the float
total_durations[name] = (
sum(float(d) for d in duration) * 1000
) # Convert to milliseconds
Expand Down Expand Up @@ -161,10 +163,8 @@ def segment_audio(
min_distance = distance
nearest_note_idx = i
if nearest_note_idx is not None:
# print(f"Nearest note for {name} found, midi: {midis[nearest_note_idx]}, midi_mapping: {target_midi}")
note_idx = nearest_note_idx
else:
# print(f"{name} is out of range, midi_mapping: {target_midi}")
note_idx = orginal_note_idx
previous_note_idx = note_idx
start_time = midi_notes[note_idx][0]
Expand Down
1 change: 0 additions & 1 deletion egs2/acesinger/svs1/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ n_fft=2048
n_shift=512
win_length=2048
use_sid=true
ns=31


score_feats_extract=syllable_score_feats # frame_score_feats | syllable_score_feats
Expand Down

0 comments on commit 282ed41

Please sign in to comment.