-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Description Introduces a web browser voice satellite option with OpenWakeWord and Silero VAD running in JavaScript, all served via FastAPI. Allows for both text and voice commands to a Neon Diana deployment. This new option may one day replace the Gradio webpage. --------- Co-authored-by: Daniel McKnight <[email protected]>
- Loading branch information
1 parent
063f6a1
commit 824a912
Showing
31 changed files
with
1,389 additions
and
28 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.git/ | ||
tests/ | ||
*.egg-info | ||
build/ | ||
dist/ |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,55 @@ | ||
# Stage 1: Use a base image to install ffmpeg | ||
FROM jrottenberg/ffmpeg:4.1 as ffmpeg-base | ||
|
||
# Stage 2: Build the final image | ||
FROM python:3.8-slim | ||
|
||
# Label for vendor | ||
LABEL vendor=neon.ai \ | ||
ai.neon.name="neon-iris" | ||
|
||
ENV OVOS_CONFIG_BASE_FOLDER neon | ||
ENV OVOS_CONFIG_FILENAME neon.yaml | ||
ENV XDG_CONFIG_HOME /config | ||
# Build argument for specifying extras | ||
ARG EXTRAS | ||
|
||
RUN apt update && \ | ||
apt install -y ffmpeg | ||
ENV OVOS_CONFIG_BASE_FOLDER=neon \ | ||
OVOS_CONFIG_FILENAME=neon.yaml \ | ||
XDG_CONFIG_HOME=/config | ||
|
||
ADD . /neon_iris | ||
WORKDIR /neon_iris | ||
# Copy ffmpeg binaries from the ffmpeg-base stage | ||
COPY --from=ffmpeg-base /usr/local/bin/ /usr/local/bin/ | ||
COPY --from=ffmpeg-base /usr/local/lib/ /usr/local/lib/ | ||
|
||
RUN pip install wheel && \ | ||
pip install .[gradio] | ||
RUN mkdir -p /neon_iris/requirements | ||
COPY ./requirements/* /neon_iris/requirements | ||
|
||
RUN pip install wheel && pip install -r /neon_iris/requirements/requirements.txt | ||
RUN if [ "$EXTRAS" = "gradio" ]; then \ | ||
pip install -r /neon_iris/requirements/gradio.txt; \ | ||
elif [ "$EXTRAS" = "web_sat" ]; then \ | ||
pip install -r /neon_iris/requirements/web_sat.txt; \ | ||
else \ | ||
pip install -r /neon_iris/requirements/requirements.txt; \ | ||
fi | ||
|
||
WORKDIR /neon_iris | ||
ADD . /neon_iris | ||
RUN pip install . | ||
|
||
COPY docker_overlay/ / | ||
|
||
CMD ["iris", "start-gradio"] | ||
# Expose port 8000 for websat | ||
EXPOSE 8000 | ||
|
||
# Set the ARG value as an environment variable | ||
ENV EXTRAS=${EXTRAS} | ||
|
||
# Create a non-root user with a home directory and change ownership of necessary directories | ||
|
||
RUN groupadd -r neon && useradd -r -m -g neon neon \ | ||
&& mkdir -p /config/neon \ | ||
&& chown -R neon:neon /neon_iris /usr/local/bin /config | ||
|
||
# Use the non-root user to run the container | ||
USER neon | ||
|
||
ENTRYPOINT ["/neon_iris/entrypoint.sh"] |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/bash | ||
# NEON AI (TM) SOFTWARE, Software Development Kit & Application Development System | ||
# All trademark and other rights reserved by their respective owners | ||
# Copyright 2008-2024 Neongecko.com Inc. | ||
# BSD-3 | ||
# Redistribution and use in source and binary forms, with or without | ||
# modification, are permitted provided that the following conditions are met: | ||
# 1. Redistributions of source code must retain the above copyright notice, | ||
# this list of conditions and the following disclaimer. | ||
# 2. Redistributions in binary form must reproduce the above copyright notice, | ||
# this list of conditions and the following disclaimer in the documentation | ||
# and/or other materials provided with the distribution. | ||
# 3. Neither the name of the copyright holder nor the names of its | ||
# contributors may be used to endorse or promote products derived from this | ||
# software without specific prior written permission. | ||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, | ||
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR | ||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | ||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, | ||
# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|
||
set -e | ||
|
||
if [ "$EXTRAS" = "gradio" ]; then | ||
exec iris start-gradio | ||
elif [ "$EXTRAS" = "web_sat" ]; then | ||
exec iris start-websat | ||
else | ||
echo "No extras specified, showing help. To execute a command, use 'docker run iris <command>'" | ||
exec iris -h | ||
fi |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# NEON AI (TM) SOFTWARE, Software Development Kit & Application Development System | ||
# All trademark and other rights reserved by their respective owners | ||
# Copyright 2008-2024 Neongecko.com Inc. | ||
# BSD-3 | ||
# Redistribution and use in source and binary forms, with or without | ||
# modification, are permitted provided that the following conditions are met: | ||
# 1. Redistributions of source code must retain the above copyright notice, | ||
# this list of conditions and the following disclaimer. | ||
# 2. Redistributions in binary form must reproduce the above copyright notice, | ||
# this list of conditions and the following disclaimer in the documentation | ||
# and/or other materials provided with the distribution. | ||
# 3. Neither the name of the copyright holder nor the names of its | ||
# contributors may be used to endorse or promote products derived from this | ||
# software without specific prior written permission. | ||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, | ||
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR | ||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | ||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, | ||
# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|
||
from .web_sat import UserInput, UserInputResponse # noqa |
Oops, something went wrong.