diff options
| -rw-r--r-- | .gitignore | 6 | ||||
| -rw-r--r-- | .gitmodules | 3 | ||||
| -rw-r--r-- | files/audios/.gitkeep (renamed from videos/.gitkeep) | 0 | ||||
| -rw-r--r-- | files/videos/.gitkeep | 0 | ||||
| -rwxr-xr-x | scripts/01-export-clean-audio.sh | 24 | ||||
| m--------- | third-party/rnnoise-models | 0 |
6 files changed, 31 insertions, 2 deletions
@@ -1,2 +1,4 @@ -videos/* -!videos/.gitkeep +files/videos/* +!files/videos/.gitkeep +files/audios/* +!files/audios/.gitkeep diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..955e218 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "third-party/rnnoise-models"] + path = third-party/rnnoise-models + url = https://github.com/GregorR/rnnoise-models.git diff --git a/videos/.gitkeep b/files/audios/.gitkeep index e69de29..e69de29 100644 --- a/videos/.gitkeep +++ b/files/audios/.gitkeep diff --git a/files/videos/.gitkeep b/files/videos/.gitkeep new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/files/videos/.gitkeep diff --git a/scripts/01-export-clean-audio.sh b/scripts/01-export-clean-audio.sh new file mode 100755 index 0000000..f697a33 --- /dev/null +++ b/scripts/01-export-clean-audio.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +RNNOISE_MODEL="$1" + +for file in files/videos/*; do + + # не обрабыватаем директории и .gitkeep-файл + if [ ! -f "$file" ]; then + continue + fi + if [ "$(basename "$file")" = ".gitkeep" ]; then + continue + fi + + echo "Processing $(basename $file)" + + ffmpeg \ + -v quiet -i "$file" \ + -af "arnndn=model=third-party/rnnoise-models/$RNNOISE_MODEL" \ + -f s16le -acodec pcm_s16le \ + -ar 16000 -ac 1 \ + "files/audios/$(basename "$file").raw" + +done diff --git a/third-party/rnnoise-models b/third-party/rnnoise-models new file mode 160000 +Subproject 3eee541a283fd3b8f81b85b1748e3b9ccbefa04 |
