This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from pydub import AudioSegment | |
| import os | |
| if not os.path.isdir("splitaudio"): | |
| os.mkdir("splitaudio") | |
| audio = AudioSegment.from_file("audio123.gsm") | |
| lengthaudio = len(audio) | |
| print("Length of Audio File", lengthaudio) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from pydub import AudioSegment | |
| sound = AudioSegment.from_file("chunk.wav") | |
| def speed_change(sound, speed): | |
| sound_with_altered_frame_rate = sound._spawn(sound.raw_data, overrides={ | |
| "frame_rate": int(sound.frame_rate * speed) | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from pydub import AudioSegment | |
| sound = AudioSegment.from_file("chunk.wav") | |
| print("----------Before Conversion--------") | |
| print("Frame Rate", sound.frame_rate) | |
| print("Channel", sound.channels) | |
| print("Sample Width",sound.sample_width) | |
| # Change Frame Rate | |
| sound = sound.set_frame_rate(16000) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Loading the Libraries | |
| from scipy.io.wavfile import read | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| # Read the Audiofile | |
| samplerate, data = read('6TU5302374.wav') | |
| # Frame rate for the Audio | |
| print(samplerate) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| import cv2 | |
| import pandas as pd | |
| w =48 | |
| h = 48 | |
| # Load image | |
| img = cv2.imread('1_0.jpg',0) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.