1 parent 4c8de35 commit b402c03Copy full SHA for b402c03
1 file changed
shh/services/recording.py
@@ -5,6 +5,7 @@
5
import sys
6
from collections.abc import Callable
7
8
+import numpy as np
9
import pyperclip # type: ignore[import-untyped]
10
from numpy.typing import NDArray
11
@@ -32,7 +33,7 @@ def __init__(self, settings: Settings) -> None:
32
33
async def record_audio(
34
self,
35
on_progress: Callable[[float, float], None] | None = None,
- ) -> NDArray:
36
+ ) -> NDArray[np.float32]:
37
"""
38
Record audio from the microphone until Enter is pressed or max duration reached.
39
@@ -69,7 +70,7 @@ async def record_audio(
69
70
71
async def transcribe_and_format(
72
- audio_data: NDArray,
73
+ audio_data: NDArray[np.float32],
74
options: RecordingOptions,
75
) -> TranscriptionOutput:
76
0 commit comments