下面的代码是用python写的
from scipy.io.wavfile import read
rate, signal = read('./data/input.wav')
# get only one channel
signal = signal[:,0]
# do a bunch of processing here
字符串
现在我想使用'signal'和'rate'创建一个pydub段
audio_segment = pydub.AudioSegment()
型
那么,我如何创建这个音频片段,在此之后,我如何将信号作为一个numpy数组返回?
2条答案
按热度按时间mcvgt66p1#
我可以在我的机器上运行这段代码:
字符串
goucqfw62#
如果你更喜欢一个函数:
字符串