Skip to content

Commit c59349c

Browse files
author
Botium
authored
Merge pull request #23 from codeforequity-at/BOT-3025-speech-effects-depend-on-length
Bot 3025 speech effects depend on length
2 parents 4e0df42 + 34da77f commit c59349c

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

frontend/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM ubuntu:18.04
22

3-
RUN apt-get update && apt-get -y install curl gnupg && curl -sL https://deb.nodesource.com/setup_14.x | bash - && apt-get -y install nodejs
3+
RUN apt-get update && apt-get -y install curl gnupg bc && curl -sL https://deb.nodesource.com/setup_14.x | bash - && apt-get -y install nodejs
44
RUN apt-get update && apt-get install -y dos2unix sox libsox-fmt-mp3 libttspico-utils ffmpeg
55

66
WORKDIR /app

frontend/resources/.env

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,15 @@ BOTIUM_SPEECH_CONVERT_PROFILE_HIGHVOL_CMD=sox -t {{{inputtype}}} - -t {{{inputty
8787
BOTIUM_SPEECH_CONVERT_PROFILE_HIGHVOL_DESC=Turns up the volume
8888
BOTIUM_SPEECH_CONVERT_PROFILE_HIGHESTVOL_CMD=sox -t {{{inputtype}}} - -t {{{inputtype}}} {{{output}}} vol 4
8989
BOTIUM_SPEECH_CONVERT_PROFILE_HIGHESTVOL_DESC=Maximizes the volume
90-
BOTIUM_SPEECH_CONVERT_PROFILE_BREAKX1_CMD=sox -t {{{inputtype}}} - -t {{{inputtype}}} {{{output}}} pad 0.3@1.0
90+
BOTIUM_SPEECH_CONVERT_PROFILE_BREAKX1_CMD=$(PAD1=$(echo "scale=2;$(sox --i -D {{{input}}})*0.2"|bc); sox -t {{{inputtype}}} {{{input}}} -t {{{inputtype}}} {{{output}}} pad 0.3@$PAD1)
9191
BOTIUM_SPEECH_CONVERT_PROFILE_BREAKX1_DESC=Adds one artificial silence break
92-
BOTIUM_SPEECH_CONVERT_PROFILE_BREAKX2_CMD=sox -t {{{inputtype}}} - -t {{{inputtype}}} {{{output}}} pad 0.3@1.0 0.3@2.0
92+
BOTIUM_SPEECH_CONVERT_PROFILE_BREAKX2_CMD=$(PAD1=$(echo "scale=2;$(sox --i -D {{{input}}})*0.2"|bc); PAD2=$(echo "scale=2;$(sox --i -D {{{input}}})*0.3"|bc); sox -t {{{inputtype}}} {{{input}}} -t {{{inputtype}}} {{{output}}} pad 0.3@$PAD1 0.3@$PAD2)
9393
BOTIUM_SPEECH_CONVERT_PROFILE_BREAKX2_DESC=Adds two artificial silence breaks
94-
BOTIUM_SPEECH_CONVERT_PROFILE_BREAKX3_CMD=sox -t {{{inputtype}}} - -t {{{inputtype}}} {{{output}}} pad 0.3@1.0 0.3@2.0 0.3@3.0
94+
BOTIUM_SPEECH_CONVERT_PROFILE_BREAKX3_CMD=$(PAD1=$(echo "scale=2;$(sox --i -D {{{input}}})*0.2"|bc); PAD2=$(echo "scale=2;$(sox --i -D {{{input}}})*0.3"|bc); PAD3=$(echo "scale=2;$(sox --i -D {{{input}}})*0.4"|bc); sox -t {{{inputtype}}} {{{input}}} -t {{{inputtype}}} {{{output}}} pad 0.3@$PAD1 0.3@$PAD2 0.3@$PAD3)
9595
BOTIUM_SPEECH_CONVERT_PROFILE_BREAKX3_DESC=Adds three artificial silence breaks
96-
BOTIUM_SPEECH_CONVERT_PROFILE_SILENCEX1_CMD=sox -t {{{inputtype}}} - -t {{{inputtype}}} {{{output}}} pad 0.3@1.0 trim 0 1.3 0.3
96+
BOTIUM_SPEECH_CONVERT_PROFILE_SILENCEX1_CMD=$(PAD1=$(echo "scale=2;$(sox --i -D {{{input}}})*0.1"|bc); TRIM1=$(echo "scale=2;$(sox --i -D {{{input}}})*0.1+0.3"|bc); sox -t {{{inputtype}}} {{{input}}} -t {{{inputtype}}} {{{output}}} pad 0.3@$PAD1 trim 0 $TRIM1 0.3)
9797
BOTIUM_SPEECH_CONVERT_PROFILE_SILENCEX1_DESC=Replaces one short section with silence
98-
BOTIUM_SPEECH_CONVERT_PROFILE_SILENCEX2_CMD=sox -t {{{inputtype}}} - -t {{{inputtype}}} {{{output}}} pad 0.3@1.0 [email protected] trim 0 1.3 0.3 trim 0 2.3 0.3
98+
BOTIUM_SPEECH_CONVERT_PROFILE_SILENCEX2_CMD=$(PAD1=$(echo "scale=2;$(sox --i -D {{{input}}})*0.1"|bc); TRIM1=$(echo "scale=2;$(sox --i -D {{{input}}})*0.1+0.3"|bc); TRIM2=$(echo "scale=2;$(sox --i -D {{{input}}})*0.2+0.3"|bc); sox -t {{{inputtype}}} {{{input}}} -t {{{inputtype}}} {{{output}}} pad 0.3@$PAD1 trim 0 $TRIM1 0.3 trim 0 $TRIM2 0.3)
9999
BOTIUM_SPEECH_CONVERT_PROFILE_SILENCEX2_DESC=Replaces two short sections with silence
100-
BOTIUM_SPEECH_CONVERT_PROFILE_SILENCEX3_CMD=sox -t {{{inputtype}}} - -t {{{inputtype}}} {{{output}}} pad [email protected] [email protected] 0.3@3.0 trim 0 1.3 0.3 trim 0 2.3 0.3 trim 0 3.3 0.3
100+
BOTIUM_SPEECH_CONVERT_PROFILE_SILENCEX3_CMD=$(PAD1=$(echo "scale=2;$(sox --i -D {{{input}}})*0.1"|bc); TRIM1=$(echo "scale=2;$(sox --i -D {{{input}}})*0.1+0.3"|bc); TRIM2=$(echo "scale=2;$(sox --i -D {{{input}}})*0.2+0.3"|bc); TRIM3=$(echo "scale=2;$(sox --i -D {{{input}}})*0.3+0.3"|bc); sox -t {{{inputtype}}} {{{input}}} -t {{{inputtype}}} {{{output}}} pad 0.3@$PAD1 trim 0 $TRIM1 0.3 trim 0 $TRIM2 0.3 trim 0 $TRIM3 0.3)
101101
BOTIUM_SPEECH_CONVERT_PROFILE_SILENCEX3_DESC=Replaces three short sections with silence

0 commit comments

Comments
 (0)