I've used the same universal IR remote for years, and continue to use it with my 2017 Nvidia Shield TV via Flirc. The remote does not have a microphone, but it is still possible to use voice search.
Mic: All Nvidia remotes and game controllers have microphones. I use a PlayStation 3 Eye USB webcam. It is available for $8 new at Amazon; I bought mine for $2 used from GameStop. Be aware of how Shield prefers Nvidia microphones.
Remote: Android keycode 84, KEYCODE_SEARCH, triggers Shield's voice search. Flirc can't send this natively as far as I know, whether through its standard keyboard mapping or the hidden HID Consumer Table codes.
Using flirc_util record_macro 128 0 I instead have Flirc trained to send the right Windows key, Android keycode META_RIGHT. The key itself isn't important; choose one that is redundant (the left Windows key does the same thing as the right, and this way I can trigger voice search when using a real keyboard) or unused. Two ways to convert this binding to KEYCODE_SEARCH on Shield:
Button Mapper (on Play Store): Advanced | Custom keycode (ver 2) | 84
Keyboard/Button Mapper (on Play Store, but needs sideloading for Shield TV): Choose Action | Key Code | KEYCODE_SEARCH
KEYCODE_SEARCH behaves differently depending on context. In voice search-aware apps (Example: YouTube), it searches within the app itself. In the Android TV launcher, and non voice search-aware apps (Example: Prime Video), it activates the general Google Assistant voice search.1 Nothing happens in some apps (Example: Reelgood).
Optional: In Button Mapper I have the same key open Assistant when long pressed, to invoke Google Assistant voice search no matter where I am: Actions | Assistant, then More Options | disable Alternate assistant. I describe another method in the above-linked HID Consumer Codes discussion.
1 "Ok Google" does not work with non-Nvidia mics