Skip to content

Commit b920163

Browse files
committed
move pvspeaker import to global scope
1 parent e3d6d3d commit b920163

File tree

1 file changed

+3
-6
lines changed
  • recipes/llm-voice-assistant/python

1 file changed

+3
-6
lines changed

recipes/llm-voice-assistant/python/main.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import signal
22
import time
33
from argparse import ArgumentParser
4+
from collections import deque
5+
from itertools import chain
46
from multiprocessing import (
57
Pipe,
68
Process,
@@ -9,14 +11,13 @@
911
Optional,
1012
Sequence,
1113
)
12-
from collections import deque
13-
from itertools import chain
1414

1515
import picollm
1616
import pvcheetah
1717
import pvorca
1818
import pvporcupine
1919
from pvrecorder import PvRecorder
20+
from pvspeaker import PvSpeaker
2021

2122

2223
class RTFProfiler:
@@ -59,10 +60,6 @@ def tps(self) -> float:
5960

6061

6162
def orca_worker(access_key: str, connection, warmup_sec: float, stream_frame_sec: int = 0.03) -> None:
62-
# noinspection PyUnresolvedReferences
63-
import numpy as np
64-
from pvspeaker import PvSpeaker
65-
6663
orca = pvorca.create(access_key=access_key)
6764
orca_stream = orca.stream_open()
6865

0 commit comments

Comments
 (0)