You are on page 1of 3

TUGAS

AUDIO SIGNAL PROCESSING

Laporan ini dibuat untuk memenuhi tugas pada mata kuliah


“Pengolahan Sinyal Digital”

DOSEN PENGAMPU
TONNY SUHENDRA, ST., M.CS

DISUSUN OLEH

RAFKI CHANDRA
2001013006

JURUSAN TEKNIK ELEKTRO


FAKULTAS TEKNIK
UNIVERSITAS MARITIM RAJA ALI HAJI
TANJUNGPINANG
2021
SOAL

Disini saya meng-upgrade Jupyter melalui Anaconda.

Berikut listing dan output sinyal ketika pengambilan suara untuk huruf a, i, u, e, dan o.
In [1]: from scipy.io.wavfile import read

In [2]: from scipy.io.wavfile import read, write #RAFKI CHANDRA


from IPython.display import Audio
import matplotlib.pyplot as plt
fs, data = read('RAFKICHANDRA_Suara_a.wav')
print ('sample rate', fs)
plt.figure()
plt.plot(data)
plt.xlabel('Sample Index')
plt.ylabel('Wave from of test audio')
plt.show

sample rate 44100


Out[2]: <function matplotlib.pyplot.show(close=None, block=None)>

In [3]: import matplotlib.pyplot as plt


input_data = read("RAFKICHANDRA_Suara_a.wav") #read audio sample
audio = input_data[1]
plt.plot(audio[0:1024]) #plot the first 1024 samples
plt.ylim(-0.0003, 0.0003)
#plt.xlim(0,2000)
plt.ylabel("Amplitude")
plt.xlabel("Time (Samples)")
plt.title("Flute Sample")
plt.show()

In [4]: from scipy.io.wavfile import read, write #RAFKI CHANDRA


from IPython.display import Audio
import matplotlib.pyplot as plt
fs, data = read('RAFKICHANDRA_Suara_i.wav')
print ('sample rate', fs)
plt.figure()
plt.plot(data)
plt.xlabel('Sample Index')
plt.ylabel('Wave from of test audio')
plt.show

sample rate 44100


Out[4]: <function matplotlib.pyplot.show(close=None, block=None)>

In [5]: import matplotlib.pyplot as plt


input_data = read("RAFKICHANDRA_Suara_i.wav")
audio = input_data[1]
plt.plot(audio[0:1024])
plt.ylabel("Amplitude")
plt.xlabel("Time (Samples)")
plt.title("Flute Sample")
plt.show()

In [6]: from scipy.io.wavfile import read, write #RAFKI CHANDRA


from IPython.display import Audio
import matplotlib.pyplot as plt
fs, data = read('RAFKICHANDRA_Suara_u.wav')
print ('sample rate', fs)
plt.figure()
plt.plot(data)
plt.xlabel('Sample Index')
plt.ylabel('Wave from of test audio')
plt.show

sample rate 44100


Out[6]: <function matplotlib.pyplot.show(close=None, block=None)>

In [7]: import matplotlib.pyplot as plt


input_data = read("RAFKICHANDRA_Suara_u.wav")
audio = input_data[1]
plt.plot(audio[0:1024])
plt.ylabel("Amplitude")
plt.xlabel("Time (Samples)")
plt.title("Flute Sample")
plt.show()

In [8]: from scipy.io.wavfile import read, write #RAFKI CHANDRA


from IPython.display import Audio
import matplotlib.pyplot as plt
fs, data = read('RAFKICHANDRA_Suara_e.wav')
print ('sample rate', fs)
plt.figure()
plt.plot(data)
plt.xlabel('Sample Index')
plt.ylabel('Wave from of test audio')
plt.show

sample rate 44100


Out[8]: <function matplotlib.pyplot.show(close=None, block=None)>

In [9]: import matplotlib.pyplot as plt


input_data = read("RAFKICHANDRA_Suara_e.wav")
audio = input_data[1]
plt.plot(audio[0:1024])
plt.ylabel("Amplitude")
plt.xlabel("Time (Samples)")
plt.title("Flute Sample")
plt.show()

In [10]: from scipy.io.wavfile import read, write #RAFKI CHANDRA


from IPython.display import Audio
import matplotlib.pyplot as plt
fs, data = read('RAFKICHANDRA_Suara_o.wav')
print ('sample rate', fs)
plt.figure()
plt.plot(data)
plt.xlabel('Sample Index')
plt.ylabel('Wave from of test audio')
plt.show

sample rate 44100


Out[10]: <function matplotlib.pyplot.show(close=None, block=None)>

In [11]: import matplotlib.pyplot as plt


input_data = read("RAFKICHANDRA_Suara_o.wav")
audio = input_data[1]
plt.plot(audio[0:1024])
#plt.ylim(-0.0003, 0.0003)
#plt.xlim(0,2000)
plt.ylabel("Amplitude")
plt.xlabel("Time (Samples)")
plt.title("Flute Sample")
plt.show()

In [ ]:

You might also like