-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Live output to text file or OBS #72
Comments
This is a different request from #70 as I'm not wanting to change the workflow of captioning itself, I just want a text file or API for exporting the generated text live to other programs. |
Writing to a text file is the easiest way to do that. I know the OBS text element supports reloading the whole file, or "chat log" mode which tails the file and follows it like the It would probably be better to have some very basic plugin system rather than try to support OBS' protocol. You see this kind of thing elsewhere with bridges that translate Open Sound Control from control panels in to OBS. I have no idea if the maintainers have an interest in such a plugin system. Or how that could work with Flatpak, since that complicates file access a bit. The easiest way would be to just point at a file on the system, fork+exec it, and speak OSC or JSON over stdin/stdout. Though such a plugin being run by a Flatpak program would belong to the same sandbox and the user would have to use Flatseal to allow internet access (which I think is already granted to download the model but still.) (I do lament how the text control has regressed in utility. It used to be decently powerful like supporting text justification and most of that has been removed.) |
I added a basic implementation of this in the main branch. There is now a toggle in settings to enable D-Bus text stream. This will start emitting the plain text as the TextStream signal in the D-Bus interface. For example, you can monitor it with this command:
There is also a property TextStreamActive that tells you if the setting is on or not. It should be possible to use this to write a Python script or something that streams to OBS or any other application. There's also this you can look into - https://github.com/grillo-delmal/obs-catpion |
It would be really nice if a live feed of text could be written to a text file, or otherwise exported to other programs. Specifically asking because I'd love to have OBS be able to provide a live feed of closed caption text when streaming. I don't know the details right off but the OBS websocket protocol does have an API for sending captions. https://github.com/obsproject/obs-websocket/blob/release/5.0.0/docs/generated/protocol.md#sendstreamcaption . If supporting a specific API is too narrow of a focus for this program then if it can live write to a text file I could manage the sending of captions to OBS with a separate program.
The text was updated successfully, but these errors were encountered: