Skip to content

Commit c96be97

Browse files
committed
Cleanup vad after testing
1 parent 498cc33 commit c96be97

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

examples/src/simulflow_examples/local_with_system_router.clj

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
[simulflow.transport.in :as transport-in]
1616
[simulflow.transport.out :as transport-out]
1717
[simulflow.utils.core :as u]
18+
[simulflow.vad.core :as vad]
1819
[simulflow.vad.silero :as silero]
1920
[taoensso.telemere :as t]))
2021

@@ -239,9 +240,9 @@
239240

240241
(comment
241242

242-
(system-router/generate-system-router-connections demo)
243+
(def vad-analyser (silero/create-silero-vad))
243244

244-
(def local-ai (make-local-flow {:vad-analyser (silero/create-silero-vad)}))
245+
(def local-ai (make-local-flow {:vad-analyser vad-analyser}))
245246

246247
(defonce flow-started? (atom false))
247248

@@ -261,4 +262,5 @@
261262
;; Stop the conversation
262263
(do
263264
(flow/stop local-ai)
264-
(reset! flow-started? false)))
265+
(reset! flow-started? false)
266+
(vad/cleanup vad-analyser)))

0 commit comments

Comments
 (0)