"""
@FileName: create_room.py
@Description: Implement create_room
@Author: Ryuk
@CreateDate: 2022/06/05
@LastEditTime: 2022/06/05
@LastEditors: Please set LastEditors
@Version: v0.1
"""
import numpy as np
import matplotlib.pyplot as plt
import pyroomacoustics as pra
import librosa
# The desired reverberation time and dimensions of the room
rt60_tgt = 0.5 # seconds
room_dim = [8, 8] # meters
# import a mono wavfile as the source signal
# the sampling frequency should match that of the room
audio, fs = librosa.load("./sample/speech.wav", sr=16000)
# We invert Sabine's formula to obtain the parameters for the ISM simulator
e_absorption, max_order = pra.inverse_sabine(rt60_tgt, room_dim)
# Create the room
room = pra.ShoeBox(
room_dim, fs=fs
使用Pyroomacoustics模拟麦克风阵列录音
最新推荐文章于 2024-05-14 09:50:47 发布