当前位置:网站首页>MFCC to audio, the effect should not be too funny >V
MFCC to audio, the effect should not be too funny >V
2022-07-30 10:14:00 【Begonia_cat】
文章目录
MFCCA good representation of the frequency characteristics of the audio.MFCCCan represent audio,as input to a deep learning end-to-end model(Although experimentally proven,Spectrogram ratioMFCC有更好的性能).那么MFCCWhat is the effect of converting audio?This article will be based on Bach《小步舞曲》为例,进行实验.
Oh!I don't know how to upload the audio! So this article I will just show the Experimental process. If you know how to do that, please tell me. And then I will supplement this article.(I have recently had a feverish interest in English,So when writing articles, I want to practice English)
提取《小步舞曲》的MFCC
import librosa.display
import matplotlib.pyplot as plt
import numpy as np
music = "D:/my life/music/bach.mp3"
y, sr = librosa.load(music, sr=22050)
n_fft = 2048
hop_length = 512
# MFCC
MFCCs = librosa.feature.mfcc(y, n_fft=n_fft, hop_length=hop_length, n_mfcc=13)
librosa.display.specshow(MFCCs, sr=sr, hop_length=hop_length) # specshow()Used to show graphs with a horizontal axis to the right of a vertical axis
plt.xlabel("Time")
plt.ylabel("MFCC")
plt.colorbar()
plt.show()

将MFCC转音频
y= librosa.feature.inverse.mfcc_to_audio(MFCCs)
# 将MFCC写入本地
import soundfile
soundfile.write("D:/my life/music/bach.wav", y, 22050) # 注意:只能写成WAV格式的
如果使用的是jupyter notebook进行编程,Audio listening can be performed directly using the code below
# Hear how it works
import IPython.display as ipd
ipd.Audio("D:/my life/music/bach.wav")

From the listening effect,节奏、The strength of the notes restores the original audio very well,But the aural effects turned into percussion,即:Pitch information is lost.
实验结论
MFCCThe reconstruction of the converted audio is not perfect.Because the original audio is transferred to MFCC时,会丢失大量的信息.
边栏推荐
- 606. 根据二叉树创建字符串(视频讲解!!!)
- 新一代开源免费的终端工具,太酷了
- 通过构建一个顺序表——教你计算时间复杂度和空间复杂度(含递归)
- OC-ARC(Automatic Reference Counting)自动引用计数
- Baidu promotion assistant encounters duplicate keywords, verification errors, how to delete redundant ones with one click
- 容器技术 -- 简单了解 Kubernetes 的对象
- debian10安装djando
- Re17: Read the paper Challenges for Information Extraction from Dialogue in Criminal Law
- leetcode 剑指 Offer 21. 调整数组顺序使奇数位于偶数前面
- MySQL installation tutorial [installation version]
猜你喜欢

Quick Start Tutorial for flyway

(Text) Frameless button settings

Online target drone prompt.ml

Study Notes 11--Direct Construction of Local Trajectories

Security Thought Project Summary

ThreadLocal内存泄漏是伪命题?

leetcode 剑指 Offer 12. 矩阵中的路径

flowable工作流所有业务概念

leetcode 剑指 Offer 22. 链表中倒数第k个节点

If someone asks you about distributed transactions again, throw this to him
随机推荐
Meikle Studio - see the actual combat notes of Hongmeng device development 4 - kernel development
在机器人行业的专业人士眼里,机器人行业目前的情况如何?
JVM内存布局、类加载机制及垃圾回收机制详解
Soft test system architects introductory tutorial | system operation and software maintenance
what is this method called
Shell系统学习之函数
柱状图 直方图 条形图 的区别
spark udf 接受并处理 null值.
Re18: Read the paper GCI Everything Has a Cause: Leveraging Causal Inference in Legal Text Analysis
debian10安装djando
Domino Server SSL Certificate Installation Guide
CVTE校招笔试题+知识点总结
105. Construct binary tree from preorder and inorder traversal sequence (video explanation!!)
CVTE school recruitment written test questions + summary of knowledge points
你真的懂Redis的5种基本数据结构吗?
Security Thought Project Summary
606. 根据二叉树创建字符串(视频讲解!!!)
【HMS core】【FAQ】HMS Toolkit典型问题合集1
线程池方式开启线程--submit()和execute()的区别
Re15:读论文 LEVEN: A Large-Scale Chinese Legal Event Detection Dataset