[test] Add tests for recognize_whisper_api #89
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Unit tests | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install build dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install --no-install-recommends -y libpulse-dev libasound2-dev | |
sudo apt-get install --no-install-recommends -y ffmpeg | |
- name: Install Python dependencies | |
run: | | |
python -m pip install 'pocketsphinx<5' | |
python -m pip install git+https://github.com/openai/whisper.git soundfile | |
python -m pip install openai | |
python -m pip install . | |
- name: Test with unittest | |
run: | | |
python -m doctest speech_recognition/recognizers/google.py -v | |
python -m unittest discover --verbose |