Skip to content

Commit

Permalink
Merge pull request #3 from manuelseeger/openaistreaming
Browse files Browse the repository at this point in the history
OpenAI Streaming
  • Loading branch information
manuelseeger authored May 11, 2024
2 parents 691a4f6 + df07855 commit bef1c48
Show file tree
Hide file tree
Showing 67 changed files with 3,425 additions and 818 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/black.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Lint

on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: psf/black@stable
50 changes: 0 additions & 50 deletions .github/workflows/update-assistant.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
run.cmd
.ipynb_checkpoints/
.vscode/
.pyc
__pycache__/
expetiment.ipynb
replays.csv
*.csv
.env*
!.env.example
config.*.yml
*config.*.yml
obs/
deamon.cmd
aicoach/assistant.json
deploy.cmd
logs/
logs/
mongodb/mongo-seed/*.json
60 changes: 60 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "AI Coach",
"type": "debugpy",
"request": "launch",
"program": "coach.py",
"console": "integratedTerminal",
"envFile": "${workspaceFolder}/.env",
"args": [],
"env": {
"PYDEVD_DISABLE_FILE_VALIDATION": "1"
}
},
{
"name": "AI Coach Mocked",
"type": "debugpy",
"request": "launch",
"program": "coach.py",
"console": "integratedTerminal",
"envFile": "${workspaceFolder}/.env",
"args": [],
"env": {
"PYDEVD_DISABLE_FILE_VALIDATION": "1",
"MOCK_OPENAI": "1"
}
},
{
"name": "Build and Deploy",
"type": "debugpy",
"request": "launch",
"program": "build.py",
"console": "integratedTerminal",
"envFile": "${workspaceFolder}/.env",
"args": ["--deploy"]
},
{
"name": "CLI sync",
"type": "debugpy",
"request": "launch",
"program": "repcli.py",
"console": "integratedTerminal",
"envFile": "${workspaceFolder}/.env",
"args": ["--debug", "--clean", "sync"]
},
{
"name": "CLI deamon",
"type": "debugpy",
"request": "launch",
"program": "repcli.py",
"console": "integratedTerminal",
"envFile": "${workspaceFolder}/.env",
"args": ["--debug", "--clean", "deamon"]
}
]
}
13 changes: 13 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit"
}
},
"python.testing.pytestArgs": ["tests", "-rP"],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,

"isort.args": ["--profile", "black"]
}
19 changes: 14 additions & 5 deletions Installation.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
# Installation

Notes on how to setup dependencies.
Notes on how to setup dependencies; In general, create a new env with conda:

```sh
conda env create --name aicoach311 --file=environments-cp311.yml
```
Python 3.11 is the only version that works with all dependencies at this point.

Some dependencies need manual setup:

## Download openwakeword models

One time, in Python repl:

```Python
```python
import openwakeword
openwakeword.utils.download_models()
```
Expand All @@ -17,17 +24,19 @@ https://pypi.org/project/flash-attn/

Set MAX_JOBS=4 if less than 100Gb of RAM



## pytorch with CUDA

Needs a CUDA capabale NVidia GPU to run fast whisper.

conda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia


## tesseract

Install tesseract with language data. (Windows: https://github.com/UB-Mannheim/tesseract/wiki).
If installed to non-default location adjust tessdata_dir in config.

## RealtimeTTS

https://github.com/KoljaB/RealtimeTTS?tab=readme-ov-file

Install manually then reinstall openai as RealtimeTTS downgrades openai on installation.
Loading

0 comments on commit bef1c48

Please sign in to comment.