[go: up one dir, main page]

CN100433166C - MP3 file generating method and playing method for generated MP3 file - Google Patents

MP3 file generating method and playing method for generated MP3 file Download PDF

Info

Publication number
CN100433166C
CN100433166C CNB2006100333503A CN200610033350A CN100433166C CN 100433166 C CN100433166 C CN 100433166C CN B2006100333503 A CNB2006100333503 A CN B2006100333503A CN 200610033350 A CN200610033350 A CN 200610033350A CN 100433166 C CN100433166 C CN 100433166C
Authority
CN
China
Prior art keywords
file
address
speech data
address table
segmentation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CNB2006100333503A
Other languages
Chinese (zh)
Other versions
CN1811961A (en
Inventor
肖辉
全观友
何立基
徐冠标
陈新财
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Individual filed Critical Individual
Priority to CNB2006100333503A priority Critical patent/CN100433166C/en
Publication of CN1811961A publication Critical patent/CN1811961A/en
Application granted granted Critical
Publication of CN100433166C publication Critical patent/CN100433166C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Indexing, Searching, Synchronizing, And The Amount Of Synchronization Travel Of Record Carriers (AREA)

Abstract

The MP3 file generating method comprises the following steps: 1) segmenting the voice data in the MP3 file; 2) generating a corresponding MP3 address table according to the addresses of the segments in the voice data; 3) combining the address table, voice data and file tags creates an MP3 file with an address table. The MP3 file generated by the method has the address table corresponding to the position of each segment, so that the playing tool can accurately position the position of each segment for playing. The invention also provides a playing method of the MP3 file with the address table.

Description

MP3文件的生成方法和对所生成MP3文件的播放方法 Method for generating MP3 files and method for playing the generated MP3 files

技术领域 technical field

本发明涉及语音数据被分段的MP3文件的生成方法和对已分段的MP3文件的播放方法.The present invention relates to a method for generating MP3 files with voice data segmented and a method for playing the segmented MP3 files.

背景技术 Background technique

MPEG(Moving Picture Experts Group)中文名为活动图像专家组,是一种活动影音压缩标准,MP3则指MPEG语音层的第3层(Layer-3).现有的MP3文件由文件标签和语音数据两部分组成,其中文件标签记录了作者、曲名、专辑等信息.如下表所示:MPEG (Moving Picture Experts Group) Chinese name is Moving Picture Experts Group, which is a moving audio and video compression standard, and MP3 refers to the third layer (Layer-3) of the MPEG voice layer. The existing MP3 files are composed of file tags and voice data It consists of two parts, where the file label records information such as author, title, album, etc. as shown in the following table:

  ID3V2 ID3V2  目前通用的文件标签,包含了作者,作曲,专辑等信息,长度不固定 Currently common file tags, including author, composer, album and other information, the length is not fixed   Frame……Frame Frame...Frame  语音数据,表现为一系列的帧,个数由文件大小和帧长决定每个FRAME的长度可能不固定,也可能固定,由位率bitrate决定每个FRAME又分为帧头和数据实体两部分帧头记录了mp3的位率,采样率,版本等信息,每个帧之间相互独立 Voice data, expressed as a series of frames, the number is determined by the file size and frame length. The length of each FRAME may not be fixed or may be fixed. It is determined by the bit rate. Each FRAME is divided into two parts: frame header and data entity. The frame header records the bit rate, sampling rate, version and other information of mp3, and each frame is independent of each other   ID3V1 ID3V1  旧式文件标签,已被ID3V2替代,包含了作者,作曲,专辑等信息,长度为128BYTE. The old file tag, which has been replaced by ID3V2, contains information such as author, composer, album, etc., and the length is 128BYTE.

当播放多个MP3文件时,播放软件通过文件标签识别每一个MP3文件(对应一首歌曲或其它语音)的语音数据部分所在的位置,可根据使用者的命令快速切换播放任意一个MP3文件,其局限在于切换后只能从头播放所选择的歌曲,而不能指定歌曲中的其中一个位置开始播放.When playing multiple MP3 files, the playback software recognizes the position of the voice data part of each MP3 file (corresponding to a song or other voice) through the file label, and can quickly switch and play any MP3 file according to the user's command. The limitation is that after switching, the selected song can only be played from the beginning, and it cannot specify a position in the song to start playing.

发明内容 Contents of the invention

本发明的目的是给出一种可指定语音数据中的一个位置开始播放的MP3文件.The purpose of the present invention is to provide an MP3 file that can specify a position in the voice data to start playing.

本发明的另一目的是给出播放此MP3文件的播放方法.Another object of the present invention is to provide a playing method for playing this MP3 file.

本发明给出MP3文件的生成方法,其步骤包括:The present invention provides the generating method of MP3 file, and its step comprises:

1)对MP3文件中的语音数据进行分段;1) voice data in the MP3 file is segmented;

2)根据各分段在语音数据中的地址生成对应的MP3地址表;2) generate a corresponding MP3 address table according to the address of each segment in the voice data;

3)把地址表、语音数据和文件标签组合生成带地址表的MP3文件。3) Combine address table, voice data and file label to generate MP3 file with address table.

由于本方法所生成的MP3文件带有与各分段位置对应的地址表,故可供播放工具准确定位各分段的位置进行播放.Since the MP3 file generated by this method has an address table corresponding to the position of each segment, it can be used by the playback tool to accurately locate the position of each segment for playback.

本发明还给出对上述带地址表的MP3文件的播放方法,其步骤包括:The present invention also provides the playing method to the MP3 file of above-mentioned band address list, and its step comprises:

A)接收要求播放指定位置的播放命令;A) receiving a playback command requiring playback of a specified location;

B)在MP3文件的地址表中找出与所指定位置对应的地址;B) find the address corresponding to the designated location in the address table of the MP3 file;

C)从该地址开始播放MP3语音数据.C) Play MP3 audio data from this address.

由于播放工具根据MP3文件中的地址表找出与本段对应的分段地址,故使用者只要指定MP3文件中的其中一段,播放工具即可找出相应的地址在所指定的位置开始播放.Because the playback tool finds the segment address corresponding to this segment according to the address table in the MP3 file, the user only needs to specify one of the segments in the MP3 file, and the playback tool can find the corresponding address and start playing at the specified position.

附图说明 Description of drawings

图1是MP3文件的生成方法的流程图;Fig. 1 is the flowchart of the generation method of MP3 file;

图2是对所生成的MP3文件的播放方法的流程图;Fig. 2 is the flowchart of the playing method to the generated MP3 file;

图3是实施例一的播放方法的流程图;Fig. 3 is a flow chart of the playback method of Embodiment 1;

图4是实施例一生成并播放MP3文件的实现图.Figure 4 is an implementation diagram of generating and playing MP3 files in Embodiment 1.

具体实施方式 Detailed ways

实施例一Embodiment one

如图1,MP3文件的生成方法,其步骤包括:As shown in Fig. 1, the generation method of MP3 file, its step comprises:

1)对MP3文件中的语音数据进行分段;1) voice data in the MP3 file is segmented;

2)根据各分段在语音数据中的地址生成对应的MP3地址表;2) generate a corresponding MP3 address table according to the address of each segment in the voice data;

3)把地址表、语音数据和文件标签组合生成带地址表的MP3文件.3) Combine the address table, voice data and file tags to generate an MP3 file with an address table.

生成的MP3文件结构如下表:The generated MP3 file structure is as follows:

  0x00--0x08 0x00--0x08   0x09--0x0A 0x09--0x0A   0x0B--N*5 0x0B--N*5 …… ... …… ...

文件标签file label 地址表大小address table size 地址表数据address table data MP3语音数据 MP3 voice data   ID3V1(可省略) ID3V1 (can be omitted)

如图2,对上述带地址表的MP3文件的播放方法,其步骤包括:As shown in Fig. 2, to the playing method of the MP3 file of above-mentioned band address table, its step comprises:

A)接收要求播放指定位置的播放命令;A) receiving a playback command requiring playback of a specified location;

B)在MP3文件的地址表中找出与所指定位置对应的地址;B) find the address corresponding to the designated location in the address table of the MP3 file;

C)从该地址开始播放MP3语音数据。C) Play MP3 voice data from this address.

其中步骤A)中可接收多种形式的命令,如事先根据各分段做出多个对应的可读码(如条形码),使用者操作读码器(如光电笔)读取可读码换算成相应的带有指定位置的命令输入到播放器,播放器以此指定位置作为索引,找出对应的地址,就可播放MP 3语音数据;又如播放器上设有按钮或触摸屏,使用者通过按钮或触摸屏输入要播放的位置信息,播放器根据此位置信息找出对应的地址,就可播放MP3语音数据.如图3所示.Among them, in step A), various forms of commands can be received, such as making multiple corresponding readable codes (such as barcodes) according to each segment in advance, and the user operates the code reader (such as a photoelectric pen) to read the readable code conversion The corresponding command with the specified position is input to the player, and the player uses the specified position as an index to find out the corresponding address, and then the MP3 voice data can be played; Input the location information to be played through the button or the touch screen, and the player can find out the corresponding address according to the location information, and then play the MP3 voice data. As shown in Figure 3.

本实施例的实现过程可参考图4.The implementation process of this embodiment can refer to Figure 4.

实施例二Embodiment two

用语音编辑软件WINONCD对MP3文件进行分段,生成一个以CD格式分段的文件.为生成与MP3文件中的语音数据对应的地址表,需要把CD格式的分段地址转换成MP3格式的地址,其转换原理如下:Use the voice editing software WINONCD to segment the MP3 file to generate a segmented file in CD format. In order to generate an address table corresponding to the voice data in the MP3 file, it is necessary to convert the segment address in CD format into an address in MP3 format , the conversion principle is as follows:

MP3地址=(MP3帧长度·MP3帧速率)·播放时间;MP3 address=(MP3 frame length MP3 frame rate) playing time;

CD地址=(CD帧长度·CD帧速率)·播放时间;CD address=(CD frame length CD frame rate) playing time;

不管以MP3格式、CD格式或者其它格式生成文件,同一个语音数据的播放时间是一定的,故结合上述两个公式消掉其中的“播放时间”变量,可得:MP3地址=(CD地址·MP3帧长度)/(MP3每帧时间·CD帧速率·CD帧长度);Regardless of generating files with MP3 format, CD format or other formats, the playing time of the same voice data is certain, so the "playing time" variable is eliminated in conjunction with the above two formulas, and it can be obtained: MP3 address=(CD address· MP3 frame length)/(MP3 frame time·CD frame rate·CD frame length);

由于MP3帧长度、MP3每帧时间、CD帧速率和CD帧长度均为常量,如此即可将所指定位置数据的CD地址换算成MP3地址,生成MP3地址表,然后将地址表嵌入原MP3文件生成带地址表的MP3文件.Since the MP3 frame length, MP3 frame time, CD frame rate and CD frame length are all constant, the CD address of the specified location data can be converted into an MP3 address, an MP3 address table is generated, and then the address table is embedded in the original MP3 file Generate MP3 file with address table.

同理可得出把其它格式地址换算成MP3地址的公式:In the same way, the formula for converting addresses in other formats into MP3 addresses can be obtained:

MP3地址=(此其他格式·MP3帧长度)/(MP3每帧时间·此其他格式帧速率·此其他格式帧长度).MP3 address = (this other format · MP3 frame length) / (MP3 frame time · this other format frame rate · this other format frame length).

实施例三Embodiment Three

本实施例介绍合并多个MP3文件生成一个带地址表的MP3文件的方法,其步骤如下:Present embodiment introduces the method that merges a plurality of MP3 files and generates the MP3 file of a band address table, and its steps are as follows:

合并原各个MP3文件的文件标签,生成新的文件标签.Merge the file tags of the original MP3 files to generate new file tags.

合并多个MP3文件的语音数据,对各个MP3文件的语音数据各自进行分段.根据各分段所属的原MP3文件、本段语音数据在所属MP3文件中的分段序号、及其在合并后的语音数据中的地址,生成对应的MP3地址表.地址表的索引分为两层:其高层表示本段语音数据所属的MP3文件,其低层表示本段语音数据在所属MP3文件中的分段序号;而每个索引所对应的地址则表示该分段在合并后的语音数据中的地址.Merge the voice data of multiple MP3 files, and segment the voice data of each MP3 file separately. According to the original MP3 file to which each segment belongs, the segment serial number of this segment of voice data in the MP3 file to which it belongs, and after merging address in the voice data, and generate the corresponding MP3 address table. The index of the address table is divided into two layers: its high-level indicates the MP3 file to which this segment of voice data belongs, and its low-level indicates the segmentation of this segment of voice data in the MP3 file to which it belongs The sequence number; and the address corresponding to each index indicates the address of the segment in the merged voice data.

组合地址表、合并后的语音数据以及合并后的文件标签,生成带地址表的MP3文件.新的MP3文件,其地址表由于含有两层索引,故可供播放工具准确定位任意一个MP3文件的任意一段进行播放.新的MP3文件的地址表数据的结构如下表:Combine the address table, the merged voice data and the merged file label to generate an MP3 file with an address table. The address table of the new MP3 file contains two layers of indexes, so it can be used by playback tools to accurately locate any MP3 file. Play any segment. The address table data structure of the new MP3 file is as follows:

 0x00-0x04 0x00-0x04   0x050-0x09 0x050-0x09 …… ... 0xF5-0xF9 0xF5-0xF9   0xFA-0xFE 0xFA-0xFE …… ...  Track1index1 Track1 index1   Track1index2 Track1index2   Track2index1 Track2index1   Track2index2 Track2index2

其中的Track表示高层索引,Index表示低层索引,其中地址0x00-0x04的内容为:Among them, Track represents the high-level index, and Index represents the low-level index. The content of the address 0x00-0x04 is:

Figure C20061003335000061
Figure C20061003335000061

以下是所生成的MP3文件的存储实例:The following is a storage example of the generated MP3 file:

  Track与Index编号 Track and Index number  播放内容 play content  对应的MP3地址 The corresponding MP3 address   Track1 Index1 Track1 Index1  Where are we going? Where are we going?   0x000000 0x000000 Track1 Index2Track1 Index2  We’re going to themuseum. We're going to themuseum. 0x0000100x000010 Track1 Index3Track1 Index3  Can I play at themuseum? Can I play at themuseum? 0x0000230x000023 Track1 Index4Track1 Index4  No,you mustn’t playthere. No, you mustn't play there. 0x0000350x000035

Track2 Index1Track2 Index1   We’re going to learnlots of things. We're going to learn lots of things. 0x00004B0x00004B Track2 Index2Track2 Index2   We must look andhsten carefully We must look andhsten carefully 0x0000620x000062 Track2 Index3Track2 Index3   Then we’re going togo to the hospital Then we're going togo to the hospital 0x0000770x000077   Track2 Index4 Track2 Index4   Why? Why?   0x00008E 0x00008E Track2 Index5Track2 Index5   Because Grandma isthere.She has a fever Because Grandma isthere. She has a fever 0x0000980x000098 Track2 Index6Track2 Index6   Can we talktoGrandma? Can we talk to Grandma? 0x0000AF0x0000AF

对使用者而言,Track1 Index1表示第一篇文章的第一句(或第一首歌的第一句),Track1 Index2表示第一篇文章的第二句,Track2Index3表示第二篇文章的第三句,依此类推.For users, Track1 Index1 represents the first sentence of the first article (or the first sentence of the first song), Track1 Index2 represents the second sentence of the first article, and Track2Index3 represents the third sentence of the second article. sentences, and so on.

相对而言,若对单个MP3文件中的语音数据进行分段,因其无需表示每段语音数据所属的MP3文件,只需表示每段语音数据在本MP3文件中的分段序号,故地址表只需一层索引即可.Relatively speaking, if the voice data in a single MP3 file is segmented, because it does not need to indicate the MP3 file to which each segment of voice data belongs, it only needs to indicate the segment number of each segment of voice data in this MP3 file, so the address table Only one layer of index is required.

Claims (6)

1.MP3 the generation method of file, its step comprises:
1) speech data in the mp3 file is carried out segmentation;
2) generate corresponding MP3 address table according to the address of each segmentation in speech data;
3) address table, speech data and file label combination are generated the mp3 file of being with address table.
2. the generation method of claim 1 is characterized in that, if with other form beyond the MP3 speech data is carried out segmentation, then step 2 in step 1)) be:
2.1) according to MP3 frame length, the every frame time of MP3, this other format frame speed and this other format frame length the address of each segmentation is converted into the MP3 address;
2.2) generate corresponding MP3 address table according to the MP3 address that converses.
3. claim 1 or 2 generation method is characterized in that its step comprises:
1) merges the speech data of a plurality of mp3 files, the speech data of each mp3 file is carried out segmentation separately;
2) generate corresponding MP3 address table according to the former mp3 file under each segmentation, this section speech data fragment sequence number and the address in the speech data after merging thereof in affiliated mp3 file, the index of address table is divided into two-layer: the mp3 file under its high-rise this section of expression speech data, and its low layer is represented the fragment sequence number of this section speech data in affiliated mp3 file; The address in the speech data of this segmentation after merging is then represented in the pairing address of each index;
3) speech data after combination of address table, the merging and the file label after the merging generate the mp3 file of band address table.
4. the player method of the mp3 file that the generation method by the described mp3 file of claim 1 is generated, its step comprises:
A) receive the play command that requires to play assigned address;
B) in the address table of mp3 file, find out and specified position corresponding address;
C) begin to play the MP3 speech data from this address.
5. the player method of claim 4 is characterized in that, steps A) be: the order that has assigned address from code reader, received.
6. the player method of claim 4 is characterized in that, steps A) be: the order that has assigned address from touch-screen, received.
CNB2006100333503A 2006-01-27 2006-01-27 MP3 file generating method and playing method for generated MP3 file Expired - Fee Related CN100433166C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2006100333503A CN100433166C (en) 2006-01-27 2006-01-27 MP3 file generating method and playing method for generated MP3 file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2006100333503A CN100433166C (en) 2006-01-27 2006-01-27 MP3 file generating method and playing method for generated MP3 file

Publications (2)

Publication Number Publication Date
CN1811961A CN1811961A (en) 2006-08-02
CN100433166C true CN100433166C (en) 2008-11-12

Family

ID=36844820

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2006100333503A Expired - Fee Related CN100433166C (en) 2006-01-27 2006-01-27 MP3 file generating method and playing method for generated MP3 file

Country Status (1)

Country Link
CN (1) CN100433166C (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102855904A (en) * 2012-09-12 2013-01-02 松翰科技股份有限公司 Sound/video file processing method, playing control method and playing system
CN113010186B (en) * 2021-02-05 2023-03-21 武汉联特科技股份有限公司 Firmware and application data integration method and system applied to optical module

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1259739A (en) * 1999-01-06 2000-07-12 何刚 Method of selectively reproducing acoustic material
CN1441428A (en) * 1996-02-09 2003-09-10 索尼公司 Device and method for producing recording data and reproducing recording medium
WO2005024827A2 (en) * 2003-09-04 2005-03-17 Koninklijke Philips Electronics N.V. Navigating audio books using auditory cues

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1441428A (en) * 1996-02-09 2003-09-10 索尼公司 Device and method for producing recording data and reproducing recording medium
CN1259739A (en) * 1999-01-06 2000-07-12 何刚 Method of selectively reproducing acoustic material
WO2005024827A2 (en) * 2003-09-04 2005-03-17 Koninklijke Philips Electronics N.V. Navigating audio books using auditory cues

Also Published As

Publication number Publication date
CN1811961A (en) 2006-08-02

Similar Documents

Publication Publication Date Title
JP4218758B2 (en) Subtitle generating apparatus, subtitle generating method, and program
US9153233B2 (en) Voice-controlled selection of media files utilizing phonetic data
US8666727B2 (en) Voice-controlled data system
US20200126583A1 (en) Discovering highlights in transcribed source material for rapid multimedia production
US20120257876A1 (en) Method and system for generating at least one of: comic strips and storyboards from videos
WO2013070802A1 (en) System and method for indexing and annotation of video content
KR20040004354A (en) Automatic content analysis and representation of multimedia presentations
CN102754159A (en) Metadata time marking information for indicating a section of an audio object
JPH10507555A (en) Method and system for scanning digital audio and video data
TWI317937B (en) Storage medium including metadata and reproduction apparatus and method therefor
CN106790558B (en) Film multi-version integration storage and extraction system
TW460865B (en) Signal processing on information files so as to obtain characteristic point information sequences
TW200849030A (en) System and method of automated video editing
JPH0863880A (en) Data input method, encoding apparatus and data processor
CN101859586A (en) Animation Index Adding Method and Animation Reproducing Device
JP3938096B2 (en) Index creation device, index creation method, and index creation program
CN104349173A (en) Video repeating method and device
JPWO2010073695A1 (en) Edit information presenting apparatus, edit information presenting method, program, and recording medium
TWI407322B (en) Multimedia identification system and method, and the application
CN100433166C (en) MP3 file generating method and playing method for generated MP3 file
JPH03291752A (en) Data retrieving device
Rumsey Desktop audio technology: digital audio and MIDI principles
CN106791539B (en) A kind of storage and extracting method of film digital program
Sandoval-Castañeda et al. AutoTag: automated metadata tagging for film post-production
CN101197178B (en) CD player that converts to digitally compressed files and adds auxiliary information

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 1096763

Country of ref document: HK

C14 Grant of patent or utility model
GR01 Patent grant
REG Reference to a national code

Ref country code: HK

Ref legal event code: WD

Ref document number: 1096763

Country of ref document: HK

CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20081112

Termination date: 20150127

EXPY Termination of patent right or utility model