加/降混响
Oct. 21, 2019, 8:22 p.m.
read: 2335
1.降混响
WPE包
加权预测误差(WPE)是语音混响方法,由NTT Corporation NTT通信科学实验室开发。
该页面提供了WPE的Matlab p代码可执行文件。
设计和分发此软件包中包括的工具和程序,其唯一目的是评估基于加权预测误差(WPE)的去混响算法。
2.加混响
来自这篇论文
使用 pyroomacoustics
这个库
import numpy as np
import matplotlib.pyplot as plt
import pyroomacoustics as pra
# Create a 2D room from the corners of a polygon
floor = np.array([[0, 0, 6, 6, 3, 3], # x−coordinates
[0, 3, 3, 1.5, 1.5, 0]]) # y−coordinates
room = pra.Room.from_corners(floor, fs=16000, max_order=12, absorption =0.1)
# Lift the room in 3D space
room.extrude(2.4)
# Add a sound source
room.add_source([1.5, 1.2, 1.6])
# Place two microphones in the room
R = np.array([[3., 4.2], [2.25, 2.1], [1.4, 1.4]])
bf = pra.MicrophoneArray(R, room.fs)
room .add_microphone_array(bf)
# Run image source model and show room and 2nd order images
room.image_source_model()
room.plot(img_order=3, aspect='equal')
fig = plt.figure()
room.plot_rir()
plt.show()