![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据处理
文章平均质量分 50
funkidd
这个作者很懒,什么都没留下…
展开
-
PCM 转WAV。 2. 多通道pcm挑出其中
import wave import os import wave import numpy as np def gen_wav(filepath): wavelist=[] filenames=os.listdir(filepath) for filename in filenames: print(filename) name,category=os.path.splitext(filepath+filename) #分解文件扩展名...原创 2021-12-29 14:50:32 · 1528 阅读 · 0 评论 -
一个资料夹里面wav合并(同sample rate)
import wave import os import wave import numpy as np filepath= "/Users/anker/Documents/2_Speech_data/anker设备实际录音/3382/Stage1/鼠标键盘/" wavelist=[] filenames=os.listdir(filepath) for filename in filenames[:]: name,category=os.path.splitext(filepath+file..原创 2021-12-29 14:47:21 · 216 阅读 · 0 评论 -
大音频档案拆小
from pydub import AudioSegment import pydub from pydub.silence import split_on_silence import sys import os filename = '/Volumes/Speech/0DownlinkNoise/officenoise.wav' audio_segment = AudioSegment.from_file(filename, format='wav') total = int(audio_segmen原创 2021-12-29 14:43:24 · 1364 阅读 · 0 评论 -
小档案经过RIR,归一化后,合成大档案
import random import os import glob import numpy as np import scipy.io.wavfile as wav import soundfile as sf import librosa from scipy import signal import scipy.io as scio dataFile = 'rir.mat' rir = scio.loadmat(dataFile) def merge_files(path_read_folde原创 2021-12-29 14:41:41 · 1335 阅读 · 0 评论