-
Notifications
You must be signed in to change notification settings - Fork 1
/
DeAudio.py
41 lines (35 loc) · 837 Bytes
/
DeAudio.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import scipy.io.wavfile
import numpy
from tqdm import tqdm
import time
import matplotlib.pyplot as plt
import sys
start = time.time()
#Decryption
fs, data = scipy.io.wavfile.read('EN.wav')
print(data)
print(fs)
print(type(data))
dataarray = data
print(type(dataarray))
a1, b1 = dataarray.shape
tup1 = (a1, b1)
data = data.astype(numpy.int16)
#print(data.flags)
data.setflags(write=1)
#print(data.flags)
print((a1,b1))
numpy.savetxt('txtaudio.txt', data)
data= data.tolist()
for i1 in tqdm(range(len(data))):
for j1 in (range(len(data[i1]))):
x1 = data[i1][j1]
x1 = (pow(x1, 16971)%25777)
data[i1][j1] = x1
data = numpy.array(data)
data = data.astype(numpy.uint8)
print(data)
scipy.io.wavfile.write('DE.wav', fs, data)
end = time.time()
ElspTime = (end-start)
print('\n Total time taken from your life: ', +ElspTime, 'sec')