Skip to content

Source code for the Chrome Extension: Speak to Chess.com (Standard Notation)

License

Notifications You must be signed in to change notification settings

huntergregory/chess-voice-commands

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Speak to Chess.com (Standard Notation)

Source code for the Chrome extension.

Overview

Play hands-free on chess.com by dictating moves in standard chess notation.

Background

lichess.org has implemented voice commands, but chess.com does not have this feature.

Move by Voice

Provides validation & feedback.

queen move pawn capture
castle feedback and instructions

Architecture

Flow

  • Add extension's HTML elements.
  • On speech recognition results:
    • Preprocess (e.g. translate "queen play seven" to "Queen a7").
    • Validate the command. Provide feedback if invalid.
    • Execute the move (simulate two clicks).

Leverages

  • Chrome's webkitSpeechRecognition toolkit.
  • The HTML classes on chess.com.

Inspiration

This project is derived from some great work from parsec209, who built a tool to click board coordinates like "56" on chess.com.

This project simplifies & expedites voice commands with the expressive standard notation. For example, we can now move with the command "Knight f3" instead of the two commands "71 (wait) 63".

I wish I knew that "Speak to Lichess" existed before building this project (could have probably re-used some code). Nonetheless, the name served as inspiration.