Skip to content

Conversation

@DrapNard
Copy link

@DrapNard DrapNard commented May 4, 2025

This commit replaces the crepe library with torchcrepe for pitch detection, improving performance and simplifying dependencies. The changes include updating the pitching logic, modifying configuration settings, and removing tensorflow-related code. Additionally, the commit includes various bug fixes and improvements to error handling in the pitch detection and MIDI note creation processes.

DrapNard added 2 commits May 4, 2025 03:19
This commit replaces the crepe library with torchcrepe for pitch detection, improving performance and simplifying dependencies. The changes include updating the pitching logic, modifying configuration settings, and removing tensorflow-related code. Additionally, the commit includes various bug fixes and improvements to error handling in the pitch detection and MIDI note creation processes.
Extracted helper functions to improve code readability and maintainability. This includes functions for finding pitch indices, extracting pitch data, filtering confident frequencies, converting frequencies to notes, determining the most common note, and converting notes to MIDI numbers. The main `create_midi_note_from_pitched_data` function now delegates to these helper functions, making the logic clearer and easier to follow.
@rakuri255
Copy link
Owner

rakuri255 commented May 4, 2025

NICE!!
@DrapNard Please also remove tensorflow stuff from Dockerfile

Remove Tensorflow installation in dockerfile
f"{UltrastarTxtNoteTypeTag.GOLDEN} ",
f"{UltrastarTxtNoteTypeTag.RAP} ",
f"{UltrastarTxtNoteTypeTag.RAP_GOLDEN} ",
": ", "* ", "F ", "R ", "G "
Copy link
Owner

Choose a reason for hiding this comment

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

Why the replace here?

Copy link
Author

Choose a reason for hiding this comment

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

idk why sometime the result still have the UltrastarTxtNoteTypeTag

# 'n3' pitch where 0 == C4
# 'w' lyric
line = f"{UltrastarTxtNoteTypeTag.NORMAL} " \
line = f": " \
Copy link
Owner

Choose a reason for hiding this comment

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

Here also. Why not using the enum?

@DrapNard
Copy link
Author

DrapNard commented May 7, 2025

I do some error's I will correct it

@rakuri255
Copy link
Owner

rakuri255 commented May 8, 2025

I tested against crepe with new song from yt. I don't know why, but I get worse points.

Crepe | Score: total: 9077, notes: 8260 line: 817, golden: 0
Torchcrepe | Score: total: 2803, notes: 2515 line: 288, golden: 0

@BWagener
Copy link
Contributor

BWagener commented Aug 8, 2025

I attempted the same in this PR #87
Without investigating further, it sounds like the accuracy is worse again?

@rakuri255
Copy link
Owner

@BWagener the main approche here is to get rid of Tensorflow. But this PR has a problem with the accuracy.

@BWagener
Copy link
Contributor

BWagener commented Aug 8, 2025

It would be nice if this could get figured out - getting rid of Tensorflow was my motivation back then as well ^^
If I remember correctly UltraSinger has to use a really old version of Tensorflow to maintain Windows compatibility right?

@rakuri255
Copy link
Owner

Yes

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