kenenet 0.3.3__py3-none-any.whl → 0.3.5__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.
- kenenet/__init__.py +11 -1
- {kenenet-0.3.3.dist-info → kenenet-0.3.5.dist-info}/METADATA +1 -1
- kenenet-0.3.5.dist-info/RECORD +5 -0
- kenenet-0.3.3.dist-info/RECORD +0 -5
- {kenenet-0.3.3.dist-info → kenenet-0.3.5.dist-info}/WHEEL +0 -0
- {kenenet-0.3.3.dist-info → kenenet-0.3.5.dist-info}/top_level.txt +0 -0
kenenet/__init__.py
CHANGED
@@ -1,7 +1,9 @@
|
|
1
|
-
import inspect, sys, zhmiscellany, keyboard, mss, time, linecache, types, os
|
1
|
+
import inspect, sys, zhmiscellany, keyboard, mss, time, linecache, types, os, random
|
2
2
|
import numpy as np
|
3
3
|
from PIL import Image
|
4
4
|
global timings, ospid
|
5
|
+
from pydub import AudioSegment
|
6
|
+
from pydub.playback import play
|
5
7
|
ospid = None
|
6
8
|
timings = {}
|
7
9
|
|
@@ -144,6 +146,14 @@ def save_img(img, name='', reset=True, file='temp_screenshots'):
|
|
144
146
|
else:
|
145
147
|
quick_print(f"Your img is not a fucking numpy array you twat, couldn't save {name}", lineno)
|
146
148
|
|
149
|
+
def load_audio(mp3_path):
|
150
|
+
AudioSegment.from_mp3(mp3_path)
|
151
|
+
|
152
|
+
def play_audio(file_sound, range=(0.9, 1.1)):
|
153
|
+
sound = file_sound
|
154
|
+
sound = sound._spawn(sound.raw_data, overrides={'frame_rate': int(sound.frame_rate * random.uniform(*range))})
|
155
|
+
zhmiscellany.processing.multiprocess_threaded(play, (sound,))
|
156
|
+
|
147
157
|
class k:
|
148
158
|
pass
|
149
159
|
|
@@ -0,0 +1,5 @@
|
|
1
|
+
kenenet/__init__.py,sha256=wCq5QvgqxvmI3p3mATg77l6m0SydI6W7OwZ0GOhC7xU,6300
|
2
|
+
kenenet-0.3.5.dist-info/METADATA,sha256=XdwZ0JkVWgmcfa6rM-xM3hr0QN-zqpRacUE8StzaqhA,513
|
3
|
+
kenenet-0.3.5.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
|
4
|
+
kenenet-0.3.5.dist-info/top_level.txt,sha256=gUsWXLrM0jF4b4nbYJZdksdFewIx_F3xOF-zER8fMuQ,8
|
5
|
+
kenenet-0.3.5.dist-info/RECORD,,
|
kenenet-0.3.3.dist-info/RECORD
DELETED
@@ -1,5 +0,0 @@
|
|
1
|
-
kenenet/__init__.py,sha256=mh1DTHPUVh0xeqNA5W7-1jp84afONMmtT861ND8vna4,5897
|
2
|
-
kenenet-0.3.3.dist-info/METADATA,sha256=dQS4Hcqff-vLrAUu7Ql_FMjWETliqn_jH3nEKO-C4xU,513
|
3
|
-
kenenet-0.3.3.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
|
4
|
-
kenenet-0.3.3.dist-info/top_level.txt,sha256=gUsWXLrM0jF4b4nbYJZdksdFewIx_F3xOF-zER8fMuQ,8
|
5
|
-
kenenet-0.3.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|