我该如何合并/加入MP3文件和C#? [英] How do I merge/join MP3 files with C#?
问题描述
我有不同的词/词组库,并以此为present打造句子我添加这些词语的组合成一个播放列表造句。不幸的是,如果用户运行的是CPU密集型应用程序(其中大部分我的用户是)可以有几秒钟中期句子的滞后(在短语之间)。
I have a library of different words/phrases, and in order to build sentences at present I add a combination of these phrases into a playlist to make a sentence. Unfortunately if the user is running CPU intensive applications (which most of my users are) there can be a lag of a few seconds mid-sentence (in between phrases).
为了打击这种我在想一个办法,将上飞的MP3文件的正确组合合并成一个适当的短语,将它保存在%temp%目录,然后播放应该解决这个1 MP3文件这个问题我遇到的差距。
In order to combat this I was thinking of an approach which will merge the right combination of MP3 files on the fly into an appropriate phrase, save this in the %temp% directory, and then play this 1 MP3 file which should overcome the problem I'm experiencing with gaps.
什么是C#做到这一点最简单的方法?有没有一种简单的方法来做到这一点?这些文件是相当小的,3-4秒长的每个和句子可以由3-20ish短语。
What is the easiest way to do this in C#? Is there an easy way to do this? The files are fairly small, 3-4 seconds long each, and a sentence can consist of 3-20ish phrases.
推荐答案
MP3文件包括帧,每个重present音频的一小段(我想约25毫秒)。
MP3 files consist of "frames", that each represent a short snippet (I think around 25 ms) of audio.
所以,是的,你的可以的只是将它们连接起来没有问题。
So yes, you can just concatenate them without a problem.
这篇关于我该如何合并/加入MP3文件和C#?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!