Starting with iOS 11 and macOS High Sierra, customers have the option to type their requests to Siri instead of speaking them—Apple is calling this “Type to Siri”.
When enabled, triggering Siri lets you interact with your assistant by using the keyboard and text field instead of voicing your requests.
Type to Siri is quite useful if you don’t want others to hear your Siri requests.

How’s this useful?

When speech is difficult or you happen to be hearing impaired, Type to Siri comes to the rescue. Also, non-native speakers may find it a lot faster to just type their requests to Siri than struggle with the correct pronunciation.
If you don’t want your co-workers to hear your Siri requests, typing does the trick. The feature is particularly indispensable in scenarios where speaking to your phone isn’t socially acceptable, like when you’re in the library, at the movies and so forth.
In those and other situations, typing rather than speaking is a far better option.

How to type to Siri on your iPhone or iPad

To enable Type to Siri in iOS 11 or later, do the following:
1) Open the Settings app on your device.
2) Tap General in the list.
3) Tap Accessibility.
4) Scroll halfway down, then tap Siri.
5) Slide the toggle Type to Siri to the ON position.
Now when you invoke Siri by pressing the Home button, a text field will pop up and Siri will listen for keyboard input instead of your voice. Type your question and press Enter.
To edit the query, pull down on Siri’s search results to reveal the “Tap to Edit” link. Hit it and you can overtype your query,  tap and hold (or press with 3D Touch) inside the text field to reposition the cursor, delete or insert specific words or characters and more.
You can still talk to your personal assistant hands-free even when Type to Siri is on.
To do so, enable Listen for ‘Hey Siri’ in Settings → Siri & Search.
This gives you the best of both worlds—you can say “Hey Siri” to trigger the assistant and voice your query or hold the Home button to type your question without disrupting the people around you. Alternatively, hit the microphone icon on the keyboard to dictate your question to Siri.
This is quite handy if you’re a native English speaker because Dictation for English doesn’t require an Internet connection for speech-to-text like all the other languages do.
TIP: If you prefer to read responses from your personal assistant instead of having them spoken aloud, adjust audio feedback for Siri in Settings → Siri & Search → Voice Feedback.
From there, choose the option labeled Control with Ring Switch.
This silences all audio feedback from Siri when you set the ring switch to silent. If you’re wearing AirPods or other headset, or using CarPlay, you’ll hear Siri’s responses via Bluetooth.
To disable Type to Siri, simply toggle it off in your accessibility settings.

How to type to Siri on your Mac

To type a Siri query on your Mac instead of speaking it, do the following:
1) Click System Preferences in the Dock.
Alternatively, choose the System Preferences option from the Apple menu.
2) Click the Accessibility icon in the System Preferences window.
3) In the lefthand column, click Siri underneath the Interacting heading.
4) Tick the box next to “Enable Type to Siri” to toggle on the feature.
Now when you press the Siri shortcut, you’ll see the text field at the bottom of Siri’s overlay.
Just type your question for Siri there and hit Enter.
You can also overtype your previous command with anything, scroll through your search results and even leave the Siri window open (it stays on top of other windows) and continue with your work knowing you can type your queries to Siri as needed.
The default shortcut to summon Siri is to hold the Command (⌘) key and the Space bar at the same time (or click Siri’s Dock/menu icon). To change the Siri shortcut, go to System Preferences → Siri, then choose Customize from the popup menu next to Keyboard Shortcut.
If you prefer to read Siri responses rather than hear them spoken out loud, turn off voice feedback for Siri: in System Preferences → Siri, click “Off” next to Voice Feedback.
To disable Type to Siri, untick the box for ”Enable Type to Siri“ in System Preferences.
And that’s it, boys and girls!

You can now type instead of talking to Siri whenever you want.