Merge pull request #231 from rakuri255/fix-txt-input

Fix txt input
This commit is contained in:
Vadim Rangnau authored and GitHub committed 2025-02-13 22:34:24 +01:00
commit 0e64bbc006
2 files changed
+7 -6

No files matched your search

+1 -1
View File
@@ -11,7 +11,7 @@ from modules.Ultrastar.ultrastar_txt import FormatVersion
@dataclass
class Settings:
APP_VERSION = "0.0.13-dev7"
APP_VERSION = "0.0.13-dev8"
CONFIDENCE_THRESHOLD = 0.6
CONFIDENCE_PROMPT_TIMEOUT = 4
+6 -5
View File
@@ -168,7 +168,8 @@ def run() -> tuple[str, Score, Score]:
TranscribeAudio(process_data)
# Split syllables into segments
process_data.transcribed_data = split_syllables_into_segments(process_data.transcribed_data,
if not settings.ignore_audio:
process_data.transcribed_data = split_syllables_into_segments(process_data.transcribed_data,
process_data.media_info.bpm)
# Create audio chunks
@@ -187,8 +188,8 @@ def run() -> tuple[str, Score, Score]:
process_data.parsed_file)
# Merge syllable segments
#tuple[list[MidiSegment], list[TranscribedData]]:
process_data.midi_segments, process_data.transcribed_data = merge_syllable_segments(process_data.midi_segments,
if not settings.ignore_audio:
process_data.midi_segments, process_data.transcribed_data = merge_syllable_segments(process_data.midi_segments,
process_data.transcribed_data,
process_data.media_info.bpm)
@@ -291,12 +292,12 @@ def merge_syllable_segments(midi_segments: list[MidiSegment],
previous_data = None
for i, data in enumerate(transcribed_data):
is_note_short = data.end - data.start < thirtytwo_note
is_note_short = (data.end - data.start) < thirtytwo_note
is_same_note = midi_segments[i].note == midi_segments[i - 1].note
has_breath_pause = False
if previous_data is not None:
has_breath_pause = data.start - previous_data.end > sixteenth_note
has_breath_pause = (data.start - previous_data.end) > sixteenth_note
if (str(data.word).startswith("~")
and previous_data is not None