File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
deepgram/audio/microphone Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 55import inspect
66import asyncio
77import threading
8- from typing import Optional , Callable
8+ from typing import Optional , Callable , TYPE_CHECKING
99import logging
1010
1111from ...utils import verboselogs
1212from .constants import LOGGING , CHANNELS , RATE , CHUNK
1313
14+ if TYPE_CHECKING :
15+ import pyaudio
16+
1417
1518class Microphone : # pylint: disable=too-many-instance-attributes
1619 """
@@ -20,10 +23,8 @@ class Microphone: # pylint: disable=too-many-instance-attributes
2023 _logger : verboselogs .VerboseLogger
2124 _exit : threading .Event
2225
23- import pyaudio # pylint: disable=import-outside-toplevel
24-
25- _audio : pyaudio .PyAudio
26- _stream : pyaudio .Stream
26+ _audio : "pyaudio.PyAudio"
27+ _stream : "pyaudio.Stream"
2728 _chunk : int
2829 _rate : int
2930 _format : int
You can’t perform that action at this time.
0 commit comments