apt update
apt install sonic # this installs libsonic+sonic utilities for speech synthesis, not sonic search
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=apt-$TARGETARCH$TARGETVARIANT \
echo "[+] Installing Sonic search binary using apt..." \
&& echo "deb [signed-by=/usr/share/keyrings/sonic.gpg] https://packagecloud.io/valeriansaliou/sonic/debian/ bookworm main" > /etc/apt/sources.list.d/sonic.list \
&& curl -fsSL 'https://packagecloud.io/valeriansaliou/sonic/gpgkey' | gpg --dearmor -o /usr/share/keyrings/sonic.gpg \
&& apt-get update -qq \
&& apt-get install -qq -y -t bookworm --no-upgrade sonic \
&& rm -rf /var/lib/apt/lists/* \
# Save version info
&& ( \
which sonic && sonic --version \
&& echo -e '\n\n' \
) | tee -a /VERSION.txt
This unfortunately also downloads the speech utility, even though I've added the sonic search sources.
0.043 [+] Installing Sonic search binary using apt...
2.319 Selecting previously unselected package libsonic0:arm64.
(Reading database ... 24429 files and directories currently installed.)
2.328 Preparing to unpack .../libsonic0_0.2.0-12_arm64.deb ...
2.331 Unpacking libsonic0:arm64 (0.2.0-12) ...
2.347 Selecting previously unselected package sonic.
2.348 Preparing to unpack .../sonic_0.2.0-12_arm64.deb ...
2.350 Unpacking sonic (0.2.0-12) ...
2.371 Setting up libsonic0:arm64 (0.2.0-12) ...
2.375 Setting up sonic (0.2.0-12) ...
2.381 Processing triggers for libc-bin (2.36-9+deb12u8) ...
2.469 Usage: sonic [OPTION]... infile outfile
2.469 -c -- Modify pitch by emulating vocal chords vibrating
2.469 faster or slower.
2.469 -p pitch -- Set pitch scaling factor. 1.3 means 30% higher.
2.469 -q -- Disable speed-up heuristics. May increase quality.
2.469 -r rate -- Set playback rate. 2.0 means 2X faster, and 2X pitch.
2.469 -s speed -- Set speed up factor. 2.0 means 2X faster.
2.469 -v volume -- Scale volume by a constant factor.
2.470 /usr/bin/sonic
Do you know if there's a way to force apt-get to install sonic from the packagecloud.io/valeriansaliou repo and ignore the other one?
Thanks!
Also in case it's relevant, I'm on macOS M1 running Docker Desktop building for arm64 and amd64. Maybe it's not working because the debian package is marked imcompatible with arm64?
I just tried to install sonic in Docker, but ran into an issue where the package name conflicts with an existing package in main: https://debian.pkgs.org/12/debian-main-arm64/sonic_0.2.0-12_arm64.deb.html
This unfortunately also downloads the speech utility, even though I've added the sonic search sources.
Do you know if there's a way to force
apt-get
to installsonic
from thepackagecloud.io/valeriansaliou
repo and ignore the other one?Thanks!
Also in case it's relevant, I'm on macOS M1 running Docker Desktop building for arm64 and amd64. Maybe it's not working because the debian package is marked imcompatible with arm64?