AI knows what you type by simply listening

Martin Brinkmann
Aug 6, 2023

Researchers have trained an AI deep learning model to detect computer keyboard keystrokes with up to 95% accuracy. While there is room for improvement, the core mechanic has an AI listen to the keystrokes of a computer keyboard using conventional microphones, for instance of a modern smartphone, to record keystrokes.

The researchers Joshua Harison, Ehsan Toreini and Maryam Mehrnezhad published the research paper A Practical Deep Learning-Based Acoustic Side Channel Attack on Keyboards this week.

To demonstrate the theory, the researchers trained an AI model on a MacBook Pro; this was done by pressing keyboard keys multiple times so that the AI model could learn the different sounds of the keypresses. They analyzed the waveforms of each of the keys pressed and noticed that each keystroke had a unique waveform when recorded.

keystroke listening attack

Once trained, the AI managed to identify keystrokes with a 95% accuracy on the test MacBook Pro device using a conventional smartphone microphone. The researchers noted that accuracy would fall to 93% if the training was done via Zoom and that it would decrease even further when using VOIP.

The model supports local and remote spying provided that it has an audio feed that picks up the typing of the target and that it has been trained properly. One of the main downsides of the potential attack is that it needs to be trained on individual keyboards before it can detect keystrokes with accuracy. Also, the attack works best when mechanical keyboards and other noisier keyboards are used and less well when quieter keyboards are used by a target.

The researchers note that threat actors could use AI in targeted attacks to obtain passwords and other sensitive information, for instance during video calls.

Computer users may reduce the likelihood of successful attacks by changing their typing style. While that may be difficult, switching to touch-based keyboard input at random did reduce the accuracy of detection according to the researchers.

Other mitigation techniques include relying on random passwords instead of full word passwords, using autotype for passwords and other sensitive data instead of typing manually, or playing "defensive" sounds during video conferencing calls.

One of the best methods to thwart attacks was to add fake keystrokes, but this mitigation technique may not be applicable in all scenarios as it may impact the usability on the user's end.

Closing Words

Attacks using the described AI model to identify keystrokes using audio feeds should not unsettle users at this time. While there is a probability of target attacks against high value targets, large scale attacks do not appear feasible at this time.

Now You: what type of keyboard do you use?

AI knows what you type by simply listening
Article Name
AI knows what you type by simply listening
Researchers have trained an AI deep learning model to detect computer keyboard keystrokes with up to 95% accuracy.
Ghacks Technology News

Previous Post: «
Next Post: «


  1. TelV said on August 7, 2023 at 2:27 pm

    I use the laptop keyboard together with Keepass to encrypt passwords. But the microphone, webcam, location, notifications, autoplay and virtual reality are all disable in the Floorp browser I use so I don’t think AI will be able to overcome that aspect.

    Also, the relevant about:config privacy and security settings are all configured to enhance both of those settings.

  2. tom said on August 7, 2023 at 5:08 am

    I use a laptop keyboard.
    I keep all my passwords on a usb drive.
    When required I just ctrl+c, ctrl+v any password into the field.
    I should imagine this will thwart any AI.

    1. Tachy said on August 7, 2023 at 6:37 am


      Is the usb encrypted?

      Do you have clipboard history disabled?

      Do you know how to clear the clipboard?

      Do you know you can get an open souce freeware password manager that does encrypt and does clear the clipboard for you and requires a password to access and put that on that usb instead?

  3. Tachy said on August 6, 2023 at 5:23 pm

    Not only would each k/b sound different, each person using that k/b would produce different sounds.

    This technique is useless for spying but may have others uses such as teaching the blind to type?

    A: I use an old PS/2 Microsoft Natural Keyboard Elite (White). The split keys layout taught me to type properly.

    It was made back when they made stuff to last not wear out on purpose for resales. This is probably why they sell for $260 on Amazon these days.

    I take it apart and wash the non electrical parts in the dishwasher when needed.

  4. VioletMoon said on August 6, 2023 at 4:33 pm

    @Leopeva64–Better ways to write? The following article provides a genuine glimpse of AI and what it can and cannot do in regard to writing.

    It is the essential question: “What makes good writing?”

    Cormack McCarthy, John Steinbeck, and William Faulkner exemplify “good writing.”

  5. Leopeva64 said on August 6, 2023 at 11:53 am

    Speaking of AI, Microsoft Edge will suggest better ways to write a text with the help of Bing AI:

    And the first plugins for Bing AI are already available in Edge Canary’s Bing Chat pane:


Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.