Depending on where you stream to, there are multiple ways to achieve this, however the the idea of only converting your speech to text when you press a key would need to be approached moreso like assigning a hotkey to hide a specific source (wherein it's less cumbersome to let it continue running and converts your speech to text but the source is hidden for the scene that is active or simply switch between two identical scenes that doesn't contain the source outputting the text):
- Platform specific extensions - if you stream to Twitch, for example, there is a number of extensions listed
here that provide closed captioning
- There are various
plugins you can find that can do it using third party tools, such as
Newbie Live Captioning which is installed as a plugin but requires some setting up;
- Similarly, there are online service providers that offer a sort of re-stream service that includes closed captioning, just takes a simple search to find something like
Ai-Media TV, though there was one other one I remember reading about a long time ago that I can't think of now
- Finally, you could also MacGyver something yourself if you find vast array of options out there are not suitable by using your computer built in Voice-To-Text accessibility feature, routing it to some sort of text input window, then chroma keying that source into your scene.
Again, some of the plugins you might find, as I do believe there's more for OBS than the one I linked (as I wasn't going to do your due diligence for you), might not advertise the feature of "push button activate/deactivate" but just keep in mind you can just hotkey the hiding and showing of that source so don't let that be a concern when looking at all the available options out there.