Use javascript snippet: (updated 2020-06-02)
Copy code from slack-webspeech-snippet.js into Chrome's javascript snippet and execute it on slack web page for some channel. Or put this in Tampermonkey userscript if you want recognition to start automatically.
OR
Use Chrome Extension: (obsolete, not updated)
Open chrome://extensions/, check Developer mode, click Load unpacked extension..., select directory 'ext'. Click on extension's Options link if you want to change default settings. Go to Slack web page for channel or chat. (https://....slack.com/messages/...) Click on extension's button on the right of the address bar to toggle speech recognition and TTS (optional).
Extension status is displayed on the right of channel title.
TODO: chrome extension (create icons, publish to chrome web store)