HoneyTian commited on
Commit
d9494cc
β€’
1 Parent(s): b462306
Dockerfile CHANGED
@@ -10,7 +10,13 @@ RUN apt-get install -y python3-pip
10
  RUN pip install --upgrade pip
11
  RUN pip install --no-cache-dir --upgrade -r /data/GolandProjects/vad_go/requirements.txt
12
 
13
- RUN bash build_vad_go.sh
 
 
 
 
 
 
14
 
15
  USER root
16
 
 
10
  RUN pip install --upgrade pip
11
  RUN pip install --no-cache-dir --upgrade -r /data/GolandProjects/vad_go/requirements.txt
12
 
13
+ # nx vad
14
+ WORKDIR /data/GolandProjects/vad_go/nx_vad
15
+ RUN bash build_nx_vad.sh
16
+ COPY ./build/nx_vad ../vad_bins/nx_vad
17
+
18
+ # main
19
+ WORKDIR /data/GolandProjects/vad_go
20
 
21
  USER root
22
 
go.mod DELETED
@@ -1 +0,0 @@
1
- module vad_go
 
 
main.py CHANGED
@@ -35,7 +35,7 @@ def process_uploaded_file(filename: str, silence_time: float = 0.3, longest_acti
35
 
36
  main_logger.info("do vad: {}".format(filename))
37
 
38
- cmd = "build/vad_go --filename {} --silence_time {} --longest_activate {}".format(
39
  filename, silence_time, longest_activate
40
  )
41
  vad_result = Command.popen(cmd)
 
35
 
36
  main_logger.info("do vad: {}".format(filename))
37
 
38
+ cmd = "vad_bins/nx_vad --filename {} --silence_time {} --longest_activate {}".format(
39
  filename, silence_time, longest_activate
40
  )
41
  vad_result = Command.popen(cmd)
build_vad_go.sh β†’ nx_vad/build_nx_vad.sh RENAMED
@@ -2,4 +2,4 @@
2
 
3
  mkdir build
4
 
5
- go build -o build vad_go
 
2
 
3
  mkdir build
4
 
5
+ go build -o build nx_vad
{dsp β†’ nx_vad/dsp}/audio/wav.go RENAMED
File without changes
{dsp β†’ nx_vad/dsp}/streaming_vad/streaming_vad.go RENAMED
File without changes
nx_vad/go.mod ADDED
@@ -0,0 +1 @@
 
 
1
+ module nx_vad
vad_go.go β†’ nx_vad/nx_vad.go RENAMED
@@ -2,8 +2,8 @@ package main
2
 
3
  import (
4
  "flag"
5
- "vad_go/dsp/audio"
6
- "vad_go/dsp/streaming_vad"
7
  "fmt"
8
  )
9
 
 
2
 
3
  import (
4
  "flag"
5
+ "dsp/audio"
6
+ "dsp/streaming_vad"
7
  "fmt"
8
  )
9