Giter Site home page Giter Site logo

xiaocai's Introduction

Xiaocai

Xiaocaitongxue is a voice interactive music assistant. It can open the corresponding function through voice interaction. And after waking up the device, you can choose four modes to play:

  1. Play piano
  2. Music game
  3. AI compose
  4. Play previous music

And you can control the state of the equipment by gesture. We use lasers to make light projection on the fingers so that the camera can easily detect where is the fingers.

At first, we run the function wake_up(). In this funciton, we set a detector about XiaoCaiTongXue and then open it. After the detector is opened, it will detect the hotword "xiaocaitongxue"

If the hotword is detected, the program will callback the function callback_xctx().The function will terminate the detector about XiaoCaiTongXue.And then open the detector about the function.

If the hotword about different function is detected, the program will terminate the detector about the function. And then execute the specific function, callback_game(), callback_music(), callback_AI() and callback_piano().

If "alexa" is detected, it will run the function callback_piano(). In this function, it will run the function playMusic() to play the piano.

If "Hey Friday" is detected, it will run the function callback_game(). In this function, it will run the function music_game.run() to play music game.

If "Jarvis" is detected, it will run the function callback_music(). In this function, it will run the function play_previous_music() to play the previous music.

If "snowboy" is detected, it will run the function callback_ai(). In this function, it will run the function playMusicWithAI() to play the piano with ai.

How to run

  1. Install packages required. (Listed in the report)
  2. Run xiaocaitongxue.py on a Raspberry Pi
python xiaocaitongxue.py
  1. If you want AI mode work, you should modify the IP address in ai.py and run server.py on the server because we may not run the program on our server all the time.

xiaocai's People

Contributors

abingcbc avatar cyy1998 avatar hpy-jjn avatar

Stargazers

Mingbang Wang avatar

Watchers

James Cloos 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.