ipyaudio 0.1.11__py3-none-any.whl → 0.1.12__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ipyaudio/_version.py +1 -1
- ipyaudio/recorder.py +22 -21
- {ipyaudio-0.1.11.dist-info → ipyaudio-0.1.12.dist-info}/METADATA +1 -1
- {ipyaudio-0.1.11.dist-info → ipyaudio-0.1.12.dist-info}/RECORD +21 -21
- {ipyaudio-0.1.11.data → ipyaudio-0.1.12.data}/data/etc/jupyter/nbconfig/notebook.d/ipyaudio.json +0 -0
- {ipyaudio-0.1.11.data → ipyaudio-0.1.12.data}/data/share/jupyter/labextensions/ipyaudio/install.json +0 -0
- {ipyaudio-0.1.11.data → ipyaudio-0.1.12.data}/data/share/jupyter/labextensions/ipyaudio/package.json +0 -0
- {ipyaudio-0.1.11.data → ipyaudio-0.1.12.data}/data/share/jupyter/labextensions/ipyaudio/static/122.3700f0454aee82938e32.js +0 -0
- {ipyaudio-0.1.11.data → ipyaudio-0.1.12.data}/data/share/jupyter/labextensions/ipyaudio/static/424.ca45437f3ff02b14458c.js +0 -0
- {ipyaudio-0.1.11.data → ipyaudio-0.1.12.data}/data/share/jupyter/labextensions/ipyaudio/static/509.a9d6860fe38ae60aa71f.js +0 -0
- {ipyaudio-0.1.11.data → ipyaudio-0.1.12.data}/data/share/jupyter/labextensions/ipyaudio/static/570.97f2a8196b7f1703e636.js +0 -0
- {ipyaudio-0.1.11.data → ipyaudio-0.1.12.data}/data/share/jupyter/labextensions/ipyaudio/static/570.97f2a8196b7f1703e636.js.LICENSE.txt +0 -0
- {ipyaudio-0.1.11.data → ipyaudio-0.1.12.data}/data/share/jupyter/labextensions/ipyaudio/static/58.0e2f3d700c41688625fe.js +0 -0
- {ipyaudio-0.1.11.data → ipyaudio-0.1.12.data}/data/share/jupyter/labextensions/ipyaudio/static/style.js +0 -0
- {ipyaudio-0.1.11.data → ipyaudio-0.1.12.data}/data/share/jupyter/labextensions/ipyaudio/static/third-party-licenses.json +0 -0
- {ipyaudio-0.1.11.data → ipyaudio-0.1.12.data}/data/share/jupyter/nbextensions/ipyaudio/extension.js +0 -0
- {ipyaudio-0.1.11.data → ipyaudio-0.1.12.data}/data/share/jupyter/nbextensions/ipyaudio/index.js +0 -0
- {ipyaudio-0.1.11.data → ipyaudio-0.1.12.data}/data/share/jupyter/nbextensions/ipyaudio/index.js.LICENSE.txt +0 -0
- {ipyaudio-0.1.11.data → ipyaudio-0.1.12.data}/data/share/jupyter/nbextensions/ipyaudio/index.js.map +0 -0
- {ipyaudio-0.1.11.dist-info → ipyaudio-0.1.12.dist-info}/WHEEL +0 -0
- {ipyaudio-0.1.11.dist-info → ipyaudio-0.1.12.dist-info}/licenses/LICENSE.txt +0 -0
ipyaudio/_version.py
CHANGED
ipyaudio/recorder.py
CHANGED
@@ -105,31 +105,32 @@ class Recorder(DOMWidget, ValueWidget):
|
|
105
105
|
# Sends a message to the frontend to indicate that a chunk has been received.
|
106
106
|
self.send({"msg_type": "chunk_received"})
|
107
107
|
|
108
|
-
if self.
|
109
|
-
self.
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
108
|
+
if self.sync:
|
109
|
+
if self.verbose:
|
110
|
+
self._log_chunk(change["new"])
|
111
|
+
self.stream_reader.push(change["new"].tobytes())
|
112
|
+
for frame, _ in self.stream_reader.pull():
|
113
|
+
self.audio = np.concatenate((self.audio, frame), axis=1)
|
114
|
+
self.frame = frame
|
114
115
|
|
115
116
|
def _on_completed_change(self, change):
|
116
|
-
if self.verbose:
|
117
|
-
self.output_label.value = "Completed" if self.language == "en" else "完成"
|
118
117
|
if not change["new"]:
|
119
|
-
if self.
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
118
|
+
if self.sync:
|
119
|
+
if self.verbose:
|
120
|
+
self.output_label.value = "Start recording." if self.language == "en" else "开始录音."
|
121
|
+
self.start = time()
|
122
|
+
self.audio = np.zeros((1, 0), dtype=np.float32)
|
123
|
+
self.stream_reader.reset()
|
124
124
|
else:
|
125
|
-
if self.
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
self.writer
|
132
|
-
|
125
|
+
if self.sync:
|
126
|
+
if self.verbose:
|
127
|
+
self.output_label.value = "End recording." if self.language == "en" else "结束录音."
|
128
|
+
for frame, _ in self.stream_reader.pull(partial=True):
|
129
|
+
self.audio = np.concatenate((self.audio, frame), axis=1)
|
130
|
+
self.frame = frame
|
131
|
+
if self.writer is not None:
|
132
|
+
self.writer.write(self.audio)
|
133
|
+
self.writer.close()
|
133
134
|
|
134
135
|
def _on_rate_change(self, change):
|
135
136
|
self.stream_reader.filters = [self.aformat(sample_rates=self.rate)]
|
@@ -1,8 +1,8 @@
|
|
1
1
|
ipyaudio/__init__.py,sha256=GO0pZvY1ER8CGSEdSgXyf9byRVCTdshf30EcqflfnGs,1859
|
2
2
|
ipyaudio/_frontend.py,sha256=KrlHIO_mH4XmMMoLUxYJKITbVkhKip2Bhe2f1V1DtJw,246
|
3
|
-
ipyaudio/_version.py,sha256=
|
3
|
+
ipyaudio/_version.py,sha256=zvHsm3znB3cNspzPtFycXX8LKpAm9tj0GGgSfxSs3PA,203
|
4
4
|
ipyaudio/player.py,sha256=iOqaRHWlBRRAy4D34Qu9b13twXX90zwajDRrCfiV1Io,4038
|
5
|
-
ipyaudio/recorder.py,sha256=
|
5
|
+
ipyaudio/recorder.py,sha256=uv5NgsAiS1MTyE4JLM4lEVQ1qtvGREebOp4Tm2sSKm0,5685
|
6
6
|
ipyaudio/utils.py,sha256=3SVDppL4bUPjDbSuIvMvgF43LIZ7NqOYojqKO-DCwEU,1525
|
7
7
|
ipyaudio/widget.py,sha256=d4VBAWLuObTN76J691kmhcBAXMPPb2MiK03XWkjVU-U,975
|
8
8
|
ipyaudio/configs/player.json,sha256=OQCglTSb3CJBl8_IRXQrmXTGC_Sg_H76E4bLZqitBFc,1030
|
@@ -24,22 +24,22 @@ ipyaudio/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
24
24
|
ipyaudio/tests/conftest.py,sha256=bvWtEyGyYxzUqTzS3Yb6E6mWOMP12SyVy9AqXvQGGLg,1415
|
25
25
|
ipyaudio/tests/test_example.py,sha256=JLdr25MjPjNe5Wj8n7J40U14o5s4JXJpxOU9_VQrN94,278
|
26
26
|
ipyaudio/tests/test_nbextension_path.py,sha256=t9Y4IaMOSbTzmtNxMGCldbZRExTah-b-fKwd7_2K2ys,462
|
27
|
-
ipyaudio-0.1.
|
28
|
-
ipyaudio-0.1.
|
29
|
-
ipyaudio-0.1.
|
30
|
-
ipyaudio-0.1.
|
31
|
-
ipyaudio-0.1.
|
32
|
-
ipyaudio-0.1.
|
33
|
-
ipyaudio-0.1.
|
34
|
-
ipyaudio-0.1.
|
35
|
-
ipyaudio-0.1.
|
36
|
-
ipyaudio-0.1.
|
37
|
-
ipyaudio-0.1.
|
38
|
-
ipyaudio-0.1.
|
39
|
-
ipyaudio-0.1.
|
40
|
-
ipyaudio-0.1.
|
41
|
-
ipyaudio-0.1.
|
42
|
-
ipyaudio-0.1.
|
43
|
-
ipyaudio-0.1.
|
44
|
-
ipyaudio-0.1.
|
45
|
-
ipyaudio-0.1.
|
27
|
+
ipyaudio-0.1.12.data/data/share/jupyter/labextensions/ipyaudio/package.json,sha256=AHmPjcz_36fqrYjN2DfpH84nccQ7jrqctJZvpqGSBqY,3451
|
28
|
+
ipyaudio-0.1.12.data/data/share/jupyter/labextensions/ipyaudio/static/122.3700f0454aee82938e32.js,sha256=NwDwRUrugpOOMpSrNaUUlDh_VcIo_CsLXqd_Dqv9aBE,1076
|
29
|
+
ipyaudio-0.1.12.data/data/share/jupyter/labextensions/ipyaudio/static/424.ca45437f3ff02b14458c.js,sha256=ykVDfz_wKxRFjHQ1RWY72e_gxawAVTtUY6H6_m3o1gQ,25063
|
30
|
+
ipyaudio-0.1.12.data/data/share/jupyter/labextensions/ipyaudio/static/509.a9d6860fe38ae60aa71f.js,sha256=qdaGD-OK5gqnH9J8i1LRsAFbaDrRt7vhCDtiyrLU_yE,632
|
31
|
+
ipyaudio-0.1.12.data/data/share/jupyter/labextensions/ipyaudio/static/570.97f2a8196b7f1703e636.js,sha256=g9sSzxO7BhhC5U9q-cdCAa62fsNS0H55VFy8hMZpgEM,60441
|
32
|
+
ipyaudio-0.1.12.data/data/share/jupyter/labextensions/ipyaudio/static/570.97f2a8196b7f1703e636.js.LICENSE.txt,sha256=Rygqb6FGni17yJNtFnwX6_D9gAlBEE3RUJeUUgjMtQE,120
|
33
|
+
ipyaudio-0.1.12.data/data/share/jupyter/labextensions/ipyaudio/static/58.0e2f3d700c41688625fe.js,sha256=Di89cAxBaIYl_je2RvhxQU2omDnGilR1yZv_XbLMhtA,346121
|
34
|
+
ipyaudio-0.1.12.data/data/share/jupyter/labextensions/ipyaudio/static/style.js,sha256=-CQt0ZTPaCTvrRiLcznxflAbfvIKlOVzjOos-muaXQ8,118
|
35
|
+
ipyaudio-0.1.12.data/data/share/jupyter/labextensions/ipyaudio/static/third-party-licenses.json,sha256=CrfTvN0gf-T_S8EYGmy2fxVO59KYlkx8LBvaMulQ9pY,15803
|
36
|
+
ipyaudio-0.1.12.data/data/share/jupyter/nbextensions/ipyaudio/extension.js,sha256=DuyS9AUV37h3WxspuhDpEPTFCztkEyMWfZ5YjZSaWAg,406
|
37
|
+
ipyaudio-0.1.12.data/data/share/jupyter/nbextensions/ipyaudio/index.js,sha256=973UhTZIsedPpY15Y3dFX6A9hG_vM243HNwkXO3QNZs,1252054
|
38
|
+
ipyaudio-0.1.12.data/data/share/jupyter/nbextensions/ipyaudio/index.js.LICENSE.txt,sha256=Rygqb6FGni17yJNtFnwX6_D9gAlBEE3RUJeUUgjMtQE,120
|
39
|
+
ipyaudio-0.1.12.data/data/share/jupyter/nbextensions/ipyaudio/index.js.map,sha256=V7OxLGkzMx_CEflY6j52vi7FDztHBk8OGKtRBk8CYHU,1820123
|
40
|
+
ipyaudio-0.1.12.data/data/etc/jupyter/nbconfig/notebook.d/ipyaudio.json,sha256=BmiJxz0zncI7hb8QHtnfAykNxqSXBcVhfbWZxdBRzzw,62
|
41
|
+
ipyaudio-0.1.12.data/data/share/jupyter/labextensions/ipyaudio/install.json,sha256=6bM2k1XqE-DlTYa87T6uNaTy55_-Lf2HlZFSyx5QnjY,177
|
42
|
+
ipyaudio-0.1.12.dist-info/METADATA,sha256=0qQ3u8T5n9eNajVC16jzSmnrVmFxeuwwuhgiRPtIpmw,5656
|
43
|
+
ipyaudio-0.1.12.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
44
|
+
ipyaudio-0.1.12.dist-info/licenses/LICENSE.txt,sha256=-uZ5GSv8HIaOXcLH77MEBajSXj7X8T5N989WfkUFYKc,1498
|
45
|
+
ipyaudio-0.1.12.dist-info/RECORD,,
|
{ipyaudio-0.1.11.data → ipyaudio-0.1.12.data}/data/etc/jupyter/nbconfig/notebook.d/ipyaudio.json
RENAMED
File without changes
|
{ipyaudio-0.1.11.data → ipyaudio-0.1.12.data}/data/share/jupyter/labextensions/ipyaudio/install.json
RENAMED
File without changes
|
{ipyaudio-0.1.11.data → ipyaudio-0.1.12.data}/data/share/jupyter/labextensions/ipyaudio/package.json
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{ipyaudio-0.1.11.data → ipyaudio-0.1.12.data}/data/share/jupyter/nbextensions/ipyaudio/extension.js
RENAMED
File without changes
|
{ipyaudio-0.1.11.data → ipyaudio-0.1.12.data}/data/share/jupyter/nbextensions/ipyaudio/index.js
RENAMED
File without changes
|
File without changes
|
{ipyaudio-0.1.11.data → ipyaudio-0.1.12.data}/data/share/jupyter/nbextensions/ipyaudio/index.js.map
RENAMED
File without changes
|
File without changes
|
File without changes
|