Skip to main content

A voice-controlled terminal-based rhythm game

Project description

https://github.com/worldmaker18349276/K-AIKO/raw/master/logo.png

K-AIK▣ is a voice-controlled terminal-based rhythm game.

⣿⣴⣧⣰⣤⣄ [00000/00032] □   □⛶  □   ■       ■   □   □   ■   ■   □   [  0.9%|00:01]

Getting Started

Install PyAudio

Installing PyAudio via pip may encounter some problems, which is caused by the external dependency of PyAudio. Our recommendation is to use Anaconda, it can solve all problems. After installing Anaconda, just run

conda install -c anaconda pyaudio

If you have issue (no sound or error while playing), see next section.

Install K-AIKO

You can install it from PyPi

python -m pip install K-AIKO

Or fetch from source directly

git clone git@github.com:worldmaker18349276/K-AIKO
cd K-AIKO
python -m pip install .

Play

Now you can play K-AIKO

kaiko

Or

python -m kaiko

Install PyAudio Without Using Conda

The PortAudio provided by Annaconda conda-forge channel seems have some issues, see https://github.com/ContinuumIO/anaconda-issues/issues/4139. The solution is simple: don’t use Annaconda. Before install PyAudio, you should uninstall them in conda

conda remove pyaudio

Linux

Install PyAudio via apt

sudo apt-get install python3-pyaudio

Or install PortAudio first

sudo apt-get install python-dev portaudio19-dev
python -m pip install pyaudio

(see https://stackoverflow.com/a/61993070/3996613)

Mac

Install portaudio using homebrew (or method of your choice)

brew install portaudio

Create $HOME/.pydistutils.cfg using the include and lib directories of your portaudio install

[build_ext]
include_dirs=/Users/jrobert1271/homebrew/Cellar/portaudio/19.20140130/include/
library_dirs=/Users/jrobert1271/homebrew/Cellar/portaudio/19.20140130/lib/

Then in your virtualenv

pip install --allow-external pyaudio --allow-unverified pyaudio pyaudio

(see https://stackoverflow.com/a/62091426/3996613)

Windows

Download the wheel on this site https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio.

Choose PyAudio‑*‑win32.whl (the newest one) if you use 32 bit, or PyAudio‑*‑win_amd64.whl for 64 bit. Then go to your download folder

cd <your donwload path>

Then, install by wheel

python -m pip install <PyAudio's wheel file>

(see https://stackoverflow.com/a/54999645/3996613)

Tests

You can prepare environment for testing

git clone git@github.com:worldmaker18349276/K-AIKO
cd K-AIKO
conda env create --prefix ./envs python=3.6

Remember to activate environment before testing

conda activate ./envs
python -m kaiko

Publish

python setup.py sdist bdist_wheel upload
git push origin master --tags

Compatibilities

In theory, It is compatible to all terminals support ANSI escape code.

Tested terminals:

  • GNOME terminal (Linux)

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

K-AIKO-0.2.0.tar.gz (49.8 kB view hashes)

Uploaded Source

Built Distribution

K_AIKO-0.2.0-py3-none-any.whl (54.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page