Coder Social home page Coder Social logo

eee380's Introduction

EEE380

0. Table of Contents

1. Background

1.0 Install

  • Clone GitHub Repository git clone [email protected]:Spehhhhh/EEE380.git
  • Switch to the directory cd EEE231

1.1 Usage of the algorithm part

# This project uses pipenv to manage the virtual environment.

# Install Poetry
$ curl -sSL https://install.python-poetry.org | python3 -

# Set environment variables
$ echo 'export PATH="$HOME/.poetry/bin:$PATH"' >> ~/.zshrc

# Install package
$ poetry install

# Activate the virtual environment for the current project
$ poetry shell

# Generate lockfile
$ poetry lock --no-update

# Run the main program
$ poetry run python <files>
# MacBook M1 Only
# install pyaudio
brew install portaudio
python -m pip install --global-option='build_ext' --global-option='-I/opt/homebrew/Cellar/portaudio/19.7.0/include' --global-option='-L/opt/homebrew/Cellar/portaudio/19.7.0/lib' pyaudio
# install vosk-api
./scripts/vosk-macos.sh 
# https://github.com/Uberi/speech_recognition/pull/592/commits/467224e845e9b6ef25bef84494bd240d58429933
# python3.10/site-packages/speech_recognition/__init__.py
# install vosk-api
def recognize_vosk(self, audio_data, language='en'):
    from vosk import KaldiRecognizer, Model

    assert isinstance(audio_data, AudioData), "Data must be audio data"

    if not hasattr(self, 'vosk_model'):
        if not os.path.exists("model"):
            return "Please download the model from https://github.com/alphacep/vosk-api/blob/master/doc/models.md and unpack as 'model' in the current folder."
            exit (1)
        self.vosk_model = Model("model")

    rec = KaldiRecognizer(self.vosk_model, 16000);

    rec.AcceptWaveform(audio_data.get_raw_data(convert_rate=16000, convert_width=2));
    finalRecognition = json.loads(rec.FinalResult())
    if finalRecognition['text'] == '' :
        return ''
    else:
        return finalRecognition['text']

1.2 Usage of the hardware part

  1. Install PlatformIO Core http://docs.platformio.org/page/core.html
  2. Download development platform with examples https://github.com/platformio/platform-atmelavr/archive/develop.zip>
  3. Extract ZIP archive
  4. Run these commands:
# Change directory
$ cd <path>

# Build project
$ platformio run

# Upload firmware
$ platformio run --target upload

# Build specific environment
$ platformio run -e uno

# Upload firmware for the specific environment
$ platformio run -e uno --target upload

# Clean build files
$ platformio run --target clean

1.3 Name Convention

  • Class Naming Convention: CapWords
  • Class Member Convention: lower_with_under_
  • Function Naming Convention: lower_with_under()
  • Variables Naming Convention: lower_with_under

2. Architecture

2.0 Overview

TODO

2.1 Class

TODO

3. License

GNU General Public License v3.0

4. External Link

TODO

5. ChangeLog

  • 220109 init

eee380's People

Contributors

github-actions[bot] avatar ipruning 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.