Compare commits

...

13 Commits

Author SHA1 Message Date
Lucien bb1a45b00f
Merge fe16052056 into bfe9d95e05 2024-04-10 05:05:10 -04:00
kev bfe9d95e05 add mermaid-cli 2024-04-10 11:26:37 +08:00
kev 4c2ee8d639 update owncast 2024-04-08 18:20:30 +08:00
kev d49aee6ae1 update 2024-04-08 15:13:07 +08:00
kev 314f5c7db9 add scenedetect 2024-04-08 14:54:47 +08:00
kevin 1cab13aaaf update owncast 2024-04-08 09:32:15 +08:00
kev e6e31fd68e add whisper-asr-webservice 2024-03-27 16:16:14 +08:00
kev a529d5e527 update piper 2024-03-26 17:19:18 +08:00
kev b5d3951330 update piper 2024-03-25 18:25:57 +08:00
kev bb09770e4d update piper 2024-03-25 17:48:08 +08:00
Lucien fe16052056
Merge pull request #1 from LucienShui/imgbot
[ImgBot] Optimize images
2020-08-26 11:07:25 +08:00
Lucien f21ffd6bfa
Avoid inactive connection
https://github.com/tinyproxy/tinyproxy/issues/199
2020-08-26 11:02:06 +08:00
ImgBotApp 1c434b2d2e
[ImgBot] Optimize images
*Total -- 181.18kb -> 152.26kb (15.96%)

/krakend/data/krakend.png -- 32.27kb -> 23.93kb (25.84%)
/node-red/screenshot.png -- 80.86kb -> 61.85kb (23.51%)
/rtmp/server/html/img/cctv.jpg -- 60.20kb -> 58.80kb (2.33%)
/tesseract/data/chinese.jpg -- 7.84kb -> 7.67kb (2.19%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>
2020-08-26 02:52:07 +00:00
15 changed files with 160 additions and 12 deletions

View File

@ -183,6 +183,7 @@ A collection of delicious docker recipes.
- [x] red5-arm :construction: :camera:
- [x] rtmp-client-arm :+1:
- [x] rtmp-server :camera:
- [x] scenedetect
- [x] shairplay-arm
- [x] shoutcast :musical_note:
- [x] tesseract
@ -406,6 +407,7 @@ A collection of delicious docker recipes.
- [x] memgraph
- [x] memgraph-mage
- [x] memgraph-platform
- [x] minlag/mermaid-cli
- [x] metabase/metabase
- [x] metasploitframework/metasploit-framework :skull:
- [x] minio/minio
@ -429,6 +431,7 @@ A collection of delicious docker recipes.
- [x] ohmyform
- [x] api
- [x] ui
- [x] onerahmet/openai-whisper-asr-webservice
- [x] osixia/openldap
- [x] openresty/openresty
- [x] opensearchproject/opensearch :bucket:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 24 KiB

40
mermaid-cli/README.md Normal file
View File

@ -0,0 +1,40 @@
mermaid-cli
===========
[Mermaid][1] is a JavaScript-based diagramming and charting tool that uses
Markdown-inspired text definitions and a renderer to create and modify complex
diagrams. The main purpose of Mermaid is to help documentation catch up with
development.
## Tutorial
```
flowchart LR
A[Hard] -->|Text| B(Round)
B --> C{Decision}
C -->|One| D[Result 1]
C -->|Two| E[Result 2]
```
```mermaid
flowchart LR
A[Hard] -->|Text| B(Round)
B --> C{Decision}
C -->|One| D[Result 1]
C -->|Two| E[Result 2]
```
```bash
# Create an alias
$ alias mermaid-cli='docker run --rm -u $(id -u):$(id -g) -v $PWD:/data minlag/mermaid-cli'
# Make config file
$ cat input.mmd
# Generate an SVG
$ mermaid-cli -i input.mmd -o output.svg -t dark -b transparent
```
[1]: https://github.com/mermaid-js/mermaid

Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

After

Width:  |  Height:  |  Size: 62 KiB

View File

@ -11,16 +11,25 @@ personally control and regain ownership over your content.
version: "3.8"
services:
owncast:
image: gabekangas/owncast
command: /app/owncast -backupdir=/data -database=/data/database.db
image: owncast/owncast:0.1.3
command: /app/owncast -backupdir=/app/data -database=/app/data/database.db
ports:
- "1935:1935"
- "8080:8080"
volumes:
- ./data:/data
- ./data:/app/data
restart: unless-stopped
```
```bash
$ mkdir -p data
# temporarily disable until we figure out how to move forward
# chown -R 101:101 data
$ docker compose up -d
```
> https://github.com/owncast/owncast/blob/develop/Earthfile#L129-L131
## Using with OBS / Streamlabs
OBS is a pretty good piece of free software that will get you streaming from your own computer right away.

View File

@ -1,11 +1,11 @@
version: "3.8"
services:
owncast:
image: gabekangas/owncast
command: /app/owncast -backupdir=/data -database=/data/database.db
image: owncast/owncast:0.1.3
command: /app/owncast -backupdir=/app/data -database=/app/data/database.db
ports:
- "1935:1935"
- "8080:8080"
volumes:
- ./data:/data
- ./data:/app/data
restart: unless-stopped

View File

@ -11,8 +11,9 @@ ARG PIPER_ARCH=x86_64
ARG PIPER_FILE=piper_${PIPER_OS}_${PIPER_ARCH}.tar.gz
ARG PIPER_URL=https://github.com/rhasspy/piper/releases/download/${PIPER_VERSION}/${PIPER_FILE}
ARG MODEL_BASE_URL=https://huggingface.co/rhasspy/piper-voices/resolve/v1.0.0/en/en_US/lessac/medium
ARG MODEL_FILE=en_US-lessac-medium.onnx
ARG MODEL_BASE_URL=https://huggingface.co/rhasspy/piper-voices/resolve/v1.0.0/en/en_US
ARG MODEL_VOICES=amy,arctic,danny,hfc_female,hfc_male,joe,kathleen,kristin,kusal,l2arctic,lessac,libritts,libritts_r,ljspeech,ryan
ARG MODEL_QUALITY=medium
WORKDIR /opt/piper
@ -20,10 +21,17 @@ RUN set -xe \
&& apt update -y \
&& apt install -y curl \
&& curl -sSL ${PIPER_URL} | tar xz --strip 1 \
&& curl -sSL -O ${MODEL_BASE_URL}/${MODEL_FILE} \
-O ${MODEL_BASE_URL}/${MODEL_FILE}.json \
&& mkdir models \
&& cd models \
&& echo ${MODEL_VOICES} | tr ',' '\n' | while read voice; \
do \
model_url=${MODEL_BASE_URL}/${voice}/${MODEL_QUALITY}/en_US-${voice}-${MODEL_QUALITY}.onnx; \
curl -sSL -O ${model_url} -O ${model_url}.json; \
done \
&& cd .. \
&& ./piper --version \
&& apt remove -y curl \
&& rm -rf /var/lib/apt/lists/*
ENTRYPOINT ["./piper", "-m", "en_US-lessac-medium.onnx", "-d", "/tmp"]
ENTRYPOINT ["/opt/piper/piper"]
CMD ["-m", "/opt/piper/models/en_US-lessac-medium.onnx", "-d", "/tmp"]

View File

@ -5,7 +5,7 @@ piper
```bash
# Create an alias
$ alias piper='docker run -i --rm -u $(id -u):$(id -g) -v $PWD:/tmp vimagick/piper'
$ alias piper='docker run -i --rm -u $(id -u):$(id -g) -v $PWD:/tmp vimagick/piper -m /opt/piper/models/en_US-amy-medium.onnx'
# Do text-to-speech
$ echo 'Welcome to the world of speech synthesis!' | piper -f /tmp/welcome.wav
@ -14,4 +14,6 @@ $ echo 'Welcome to the world of speech synthesis!' | piper -f /tmp/welcome.wav
$ play welcome.wav
```
List of voices: https://rhasspy.github.io/piper-samples/
[1]: https://github.com/rhasspy/piper

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 59 KiB

25
scenedetect/Dockerfile Normal file
View File

@ -0,0 +1,25 @@
#
# Dockerfile for scenedetect
#
FROM python:3.11-bookworm
MAINTAINER EasyPi Software Foundation
ARG SCENEDETECT_VERSION=0.6.3
ARG FFMPEG_VERSION=6.1
RUN set -xe \
&& apt update \
&& apt install -y curl dumb-init fonts-noto-cjk xvfb xz-utils \
&& curl -sSL https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz \
| tar xJC /usr/bin/ ffmpeg-${FFMPEG_VERSION}-amd64-static/ffprobe ffmpeg-${FFMPEG_VERSION}-amd64-static/ffmpeg --strip 1 \
&& ffmpeg -version \
&& ffprobe -version \
&& rm -rf /var/lib/apt/lists/*
RUN set -xe \
&& pip install scenedetect[opencv-headless]==$SCENEDETECT_VERSION \
&& scenedetect version
ENTRYPOINT ["scenedetect"]
CMD ["--help"]

21
scenedetect/README.md Normal file
View File

@ -0,0 +1,21 @@
scenedetect
===========
[PySceneDetect][1] is a tool for detecting shot changes in videos
([example][2]), and can automatically split the video into separate clips.
## Tutorial
```bash
# Create an alias
$ alias scenedetect='docker run --rm -u $(id -u):$(id -g) -v $PWD:/data -w /data vimagick/scenedetect'
# Download sample video
$ wget https://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4
# Perform video splitting
$ scenedetect -i BigBuckBunny_320x180.mp4 split-video
```
[1]: https://github.com/Breakthrough/PySceneDetect
[2]: https://www.scenedetect.com/cli/

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

View File

@ -10,6 +10,7 @@ RUN set -xe \
&& sed -i -e '/^Allow /s/^/#/' \
-e '/^ConnectPort /s/^/#/' \
-e '/^#DisableViaHeader /s/^#//' \
-e 's/^Timeout.*/Timeout 10/' \
/etc/tinyproxy/tinyproxy.conf
VOLUME /etc/tinyproxy

View File

@ -0,0 +1,26 @@
whisper-asr-webservice
======================
[Whisper ASR Webservice][1] is a free transcription service powered by Whisper AI.
It supports following whisper models:
- [openai/whisper](https://github.com/openai/whisper)
- [SYSTRAN/faster-whisper](https://github.com/SYSTRAN/faster-whisper)
## Server
```bash
$ docker compose up -d
$ curl http://127.0.0.1:9000/docs
```
## Client
```bash
$ wget -O audio.wav https://github.com/rhasspy/piper/raw/master/notebooks/wav/en/success.wav
$ curl -F audio_file=@audio.wav "http://127.0.0.1:9000/asr?task=transcribe&output=srt"
$ curl -F audio_file=@audio.wav "http://127.0.0.1:9000/detect-language"
```
[1]: https://github.com/ahmetoner/whisper-asr-webservice

View File

@ -0,0 +1,13 @@
version: "3.8"
services:
asr:
image: onerahmet/openai-whisper-asr-webservice
ports:
- "9000:9000"
volumes:
- ./data:/data
environment:
- ASR_MODEL=medium
- ASR_ENGINE=faster_whisper
- ASR_MODEL_PATH=/data
restart: unless-stopped