41727469634d6f6e6b65793a32302e30332e32343a32303136
Browse files- audio2text/a2t.py +2 -5
audio2text/a2t.py
CHANGED
@@ -6,9 +6,6 @@ LIMIT = 90 # limit 90 seconds
|
|
6 |
|
7 |
class A2T:
|
8 |
def __init__(self, mic):
|
9 |
-
print(mic.export().read())
|
10 |
-
print(mic.export())
|
11 |
-
print(mic.read())
|
12 |
self.mic = mic
|
13 |
|
14 |
def __preprocces(self, audio, frame_rate):
|
@@ -31,8 +28,8 @@ class A2T:
|
|
31 |
|
32 |
def predict(self):
|
33 |
if self.mic is not None:
|
34 |
-
audio = self.mic
|
35 |
-
frame_rate =
|
36 |
else:
|
37 |
return "please provide audio"
|
38 |
|
|
|
6 |
|
7 |
class A2T:
|
8 |
def __init__(self, mic):
|
|
|
|
|
|
|
9 |
self.mic = mic
|
10 |
|
11 |
def __preprocces(self, audio, frame_rate):
|
|
|
28 |
|
29 |
def predict(self):
|
30 |
if self.mic is not None:
|
31 |
+
audio = self.mic.get_array_of_samples()
|
32 |
+
frame_rate = self.mic.frame_rate
|
33 |
else:
|
34 |
return "please provide audio"
|
35 |
|