I am trying to run pyttsx3 (which runs on espeak) and create .mp3 files with it in python3.10.
The problem is that the created audio files have truly inaudible sound quality as can be seen/heard here: https://vocaroo.com/15u2rs6hOJXR
This problem only occurs when building the app as a docker image and then running said image using docker run mybot:latest
. When running the app locally everything works fine
The docker file I am using is:
# syntax=docker/dockerfile:1
FROM python:3.10-slim-buster
ENV PATH /usr/local/bin:$PATH
COPY requirements.txt requirements.txt
COPY . /bot
RUN cd /bot
RUN pip3 install -r requirements.txt
RUN apt-get update && apt-get install -y \
fonts-liberation \
libasound2 \
libatk-bridge2.0-0 \
libatk1.0-0 \
libatspi2.0-0 \
libcups2 \
libdbus-1-3 \
libdrm2 \
libgbm1 \
libgtk-3-0 \
libnspr4 \
libnss3 \
libwayland-client0 \
libxcomposite1 \
libxdamage1 \
libxfixes3 \
libxkbcommon0 \
libxrandr2 \
xdg-utils \
libu2f-udev \
libvulkan1 \
espeak \
ffmpeg \
alsa-utils \
libespeak1 \
curl
RUN curl -LO https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
RUN apt-get install -y ./google-chrome-stable_current_amd64.deb
RUN rm google-chrome-stable_current_amd64.deb
WORKDIR /bot
EXPOSE 3308
CMD [ "python3", "appHandler.py", "start", "dev" ]
There is no errors or warnings logged anywhere.
Does anyone know what could be the problem here? I havent found anything on this topic so far...