Giter Club home page Giter Club logo

voice-recognition-snake-game's Introduction

Snake Game with Voice Control

Welcome to the Snake Game with Voice Control! ๐Ÿ๐Ÿ—ฃ๏ธ

Overview

This project combines the classic Snake game with voice control using TensorFlow's Speech Commands. You can control the movement of the snake by speaking specific commands.

How to Play

  1. Setup:

    • Clone this repository.
    • Install dependencies using npm install.
    • Run the application with npm run dev.
  2. Game Rules:

    • The snake starts at the center of the grid.
    • Your goal is to eat the apples to grow the snake and earn points.
    • Avoid colliding with the snake's own body or the game boundaries.
  3. Voice Commands:

    • Press the "Press to speak" button to start voice recognition.
    • Use voice commands to control the snake:
      • "up" - Move the snake up.
      • "down" - Move the snake down.
      • "left" - Move the snake left.
      • "right" - Move the snake right.
      • "stop" - Stop the game and end voice recognition.
  4. Scoring:

    • Each apple eaten increases your score.
    • The game ends if the snake collides with itself or the game boundaries.

Technologies Used

  • React with Vite: Frontend framework for building the user interface together with the fastest local development server.
  • TensorFlow.js: Machine learning library for voice command recognition.
  • Web Speech API: Enables voice recognition in the browser.

Project Structure

  • App.jsx:

    • React component that integrates the Snake game and voice control logic.
  • Field.jsx:

    • React component representing a single grid cell in the game.

Voice Commands Tips

  • Speak clearly and loudly for better recognition.
  • Use the provided voice commands: "up," "down," "left," "right," and "stop."

Enjoy playing the Snake Game with Voice Control! ๐ŸŽฎ๐Ÿ”Š

voice-recognition-snake-game's People

Contributors

vukig avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.