Skip to content

Adding .txt support via TextDisplayComponent - #433

Open
ChughVansh wants to merge 6 commits into
developfrom
feature/text-display-component
Open

Adding .txt support via TextDisplayComponent#433
ChughVansh wants to merge 6 commits into
developfrom
feature/text-display-component

Conversation

@ChughVansh

Copy link
Copy Markdown
image

This is what is looks like for me! Tested with extra lines to show that scrollability works too.

@ChughVansh
ChughVansh requested a review from cwitkowitz July 20, 2026 20:48
@ChughVansh
ChughVansh requested a review from 2cylu2 August 9, 2026 06:18

@2cylu2 2cylu2 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I built the PR locally and tested with teamup-tech/cacophony as an example model since it outputs a .txt file, but the text display wasn't rendering for me even after rebuilding it multiple times. Are there any additional steps or specific PyHARP branch requirements needed to get the TextDisplayComponent to render? I attached a screenshot of what I'm seeing.

Image

I also noticed a few other points:

  • Since TextDisplayComponent inherits from MediaDisplayComponent, the Play/Stop button and horizontal scrollbar are still displayed for text files. Would it make sense to hide/disable these controls for TextDisplayComponent since text files aren't playable audio?
  • Since this PR updates the pyharp submodule, do we expect the corresponding HarpTextTrack changes to be merged and published in PyHARP separately so that external models can use it?
  • There are currently merge conflicts in pyharp and src/utils/Controls.h with main that will need to be resolved. Should we resolve these as part of this PR, or check with the team first on how they should be handled?

@ChughVansh

Copy link
Copy Markdown
Author

Yess. My bad. The pyharp submodule needs the commit with HarpTextTrack. git submodule update should pull it. I've also requested on the pyharp PR. Also, beware that FST-AI Music Detection model (and most models I've deployed) are pinned to the develop branch for pyharp. Manually pointing to that pyharp branch and running app.py locally may be the best bet. That's why even the screenshot I attached, you can see the local link at the top.

I also found a problem in Cacophony's base code. Any text-outputting model should have file_types=[".txt"] in gr.File(). Kinda like .midi or .mid. Fixed that. So now it should work.

Thanks to your review, I also removed play/stop button and horizontal scroll bar!

@ChughVansh
ChughVansh requested a review from 2cylu2 September 1, 2026 13:16
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.

2 participants