File size: 752 Bytes
a559a3b
 
 
d8f7979
a559a3b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64a6fed
a559a3b
 
64a6fed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#! /bin/bash

# Example usage:
# scripts/remfx_detect.sh wet.wav -o examples/output.wav
# first argument is required, second argument is optional

# Check if first argument is empty
if [ -z "$1" ]
then
  echo "No audio input path supplied"
  exit 1
fi

audio_input=$1
# Shift first argument away
shift
output_path=""

while getopts ":o:" opt; do
  case $opt in
    o)
      output_path=$OPTARG
      ;;
    \?)
      echo "Invalid option: -$OPTARG" >&2
      ;;
  esac
done


# Run script
# If output path is blank, leave it blank

if [ -z "$output_path" ]
then
  python scripts/remfx_detect.py +exp=remfx_detect +audio_input=$audio_input
  exit 0
fi
python scripts/remfx_detect.py +exp=remfx_detect +audio_input=$audio_input +output_path=$output_path