如何将数组字节转换为文件mp3或文件音频? [英] How convert array byte to file mp3 or file audio?

查看:1729
本文介绍了如何将数组字节转换为文件mp3或文件音频?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将数组字节转换为文件mp3或文件音频?

How convert array byte to file mp3 or file audio?

推荐答案

我们无法直接回答这个问题:如果字节数组包含MP3音频数据(例如从用户上传的原始数据文件)然后你要做的就是将字节保存为文件:

We can't answer this directly: if you byte array contains MP3 audio data (such as a raw data file uploaded from a user) then all you have to do is save the bytes as a file:
File.WriteAllBytes(path, data);

会这样做,这很简单。



如果它包含您要保存为MP3文件的原始音频信息,那么您需要开始查看该数据的来源,以找出它是什么样的格式,并寻找一个开源(或类似)转换器,以允许您保存它。



抱歉,我们不能更准确,但我们完全不知道你的字节数组包含什么!

will do it, it's trivial.

If it contains raw audio information that you want to save as an MP3 file then you need to start looking at the source of that data to find out what kind of format it is in, and look for an open source (or similar) converter to allow you to save it.

Sorry we can't be more exact, but we have no idea at all what your byte array contains!


这篇关于如何将数组字节转换为文件mp3或文件音频?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆