当前位置:网站首页>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时,会丢失大量的信息.
边栏推荐
- Detailed explanation of JVM memory layout, class loading mechanism and garbage collection mechanism
- (C语言)文件操作
- ospf2双点双向重发布(题2)
- leetcode 剑指 Offer 12. 矩阵中的路径
- Re16:读论文 ILDC for CJPE: Indian Legal Documents Corpus for Court Judgment Prediction and Explanation
- Paper reading: SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers
- ESP32 入门篇(一)使用 VS Code 进行开发环境安装
- 606. Create a string from a binary tree (video explanation!!!)
- Re19:读论文 Paragraph-level Rationale Extraction through Regularization: A case study on European Court
- Re15: Read the paper LEVEN: A Large-Scale Chinese Legal Event Detection Dataset
猜你喜欢

In the robot industry professionals, Mr Robot industry current situation?

Re17: Read the paper Challenges for Information Extraction from Dialogue in Criminal Law

The use of qsort function and its analog implementation

Re15: Read the paper LEVEN: A Large-Scale Chinese Legal Event Detection Dataset

梅科尔工作室-看鸿蒙设备开发实战笔记五——驱动子系统开发

hcip06 ospf special area comprehensive experiment

柱状图 直方图 条形图 的区别

flyway的快速入门教程

大数据产品:标签体系0-1搭建实践

(文字)无框按钮设置
随机推荐
OC-手动引用计数内存管理
实战演练 | 在 MySQL 中计算每日平均日期或时间间隔
A near-perfect Unity full-platform hot update solution
spark udf 接受并处理 null值.
判断一颗树是否为完全二叉树——视频讲解!!!
MySQL installation tutorial [installation version]
Domino Server SSL Certificate Installation Guide
hcip06 ospf special area comprehensive experiment
Re18:读论文 GCI Everything Has a Cause: Leveraging Causal Inference in Legal Text Analysis
国外资源加速下载器,代码全部开源
Flink_CDC搭建及简单使用
By building a sequence table - teach you to calculate time complexity and space complexity (including recursion)
Study Notes 10--Main Methods of Local Trajectory Generation
flyway的快速入门教程
连接mysql报错WARN: Establishing SSL connection without server‘s identity verification is not recommended
leetcode 剑指 Offer 48. 最长不含重复字符的子字符串
Detailed explanation of JVM memory layout, class loading mechanism and garbage collection mechanism
Domino服务器SSL证书安装指南
MySQL |子查询
梅科尔工作室-看鸿蒙设备开发实战笔记六—无线联网开发