Fix : pyaudio.paInt16 missing in AudioRecorder class init

This commit is contained in:
martin legrand 2025-03-22 12:12:11 +01:00
parent b1ad643364
commit 5e7dd321f0
6 changed files with 53 additions and 9 deletions

26
Dockerfile Normal file
View File

@ -0,0 +1,26 @@
# Use official Python 3.11 image as the base
FROM python:3.11
# Set working directory
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
gcc \
g++ \
gfortran \
libportaudio2 \
portaudio19-dev \
ffmpeg \
libavcodec-dev \
libavformat-dev \
libavutil-dev \
chromium \
chromium-driver \
&& rm -rf /var/lib/apt/lists/*
RUN pip cache purge
COPY . .
RUN BLIS_ARCH=generic pip install --no-cache-dir -r requirements.txt

View File

@ -1,4 +1,6 @@
setuptools>=75.6.0
requests>=2.31.0 requests>=2.31.0
numpy>=1.24.4
colorama>=0.4.6 colorama>=0.4.6
python-dotenv>=1.0.0 python-dotenv>=1.0.0
playsound>=1.3.0 playsound>=1.3.0
@ -7,17 +9,15 @@ transformers>=4.46.3
torch>=2.4.1 torch>=2.4.1
python-dotenv>=1.0.0 python-dotenv>=1.0.0
ollama>=0.4.7 ollama>=0.4.7
scipy>=1.15.1 scipy>=1.9.3
kokoro>=0.7.12 kokoro>=0.7.12
flask>=3.1.0
soundfile>=0.13.1 soundfile>=0.13.1
protobuf>=3.20.3 protobuf>=3.20.3
termcolor>=2.5.0 termcolor>=2.4.0
ipython>=8.34.0 ipython>=8.13.0
gliclass>=0.1.8
pyaudio>=0.2.14 pyaudio>=0.2.14
librosa>=0.10.2.post1 librosa>=0.10.2.post1
selenium>=4.29.0 selenium>=4.27.1
markdownify>=1.1.0 markdownify>=1.1.0
text2emotion>=0.0.5 text2emotion>=0.0.5
langid>=1.1.6 langid>=1.1.6

14
server/Dockerfile Normal file
View File

@ -0,0 +1,14 @@
FROM ubuntu:20.04
WORKDIR /app
RUN apt-get update && \
apt-get install -y python3 python3-pip && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip3 install --no-cache-dir -r requirements.txt
CMD ["python3", "--version"]

2
server/requirements.txt Normal file
View File

@ -0,0 +1,2 @@
flask>=2.3.0
ollama>=0.4.7

View File

@ -37,7 +37,10 @@ class GenerationState:
state = GenerationState() state = GenerationState()
def generate_response(history): # Only takes history as an argument def generate_response_vllm(history):
pass
def generate_response_ollama(history): # Only takes history as an argument
global state global state
try: try:
with state.lock: with state.lock:

View File

@ -24,12 +24,11 @@ setup(
"transformers>=4.46.3", "transformers>=4.46.3",
"torch>=2.4.1", "torch>=2.4.1",
"ollama>=0.4.7", "ollama>=0.4.7",
"scipy>=1.15.1", "scipy>=1.9.3",
"kokoro>=0.7.12", "kokoro>=0.7.12",
"flask>=3.1.0", "flask>=3.1.0",
"protobuf>=3.20.3", "protobuf>=3.20.3",
"termcolor>=2.5.0", "termcolor>=2.5.0",
"gliclass>=0.1.8",
"ipython>=8.34.0", "ipython>=8.34.0",
"librosa>=0.10.2.post1", "librosa>=0.10.2.post1",
"selenium>=4.29.0", "selenium>=4.29.0",