Realize the method for playing alert tones and signal sound function in the communication network
Technical field
The present invention relates to a kind of be mainly used in move and fixed communication network in the method for playing alert tones and signal tone.
Background technology
In mobile communication and fixed communication network telephone service, operator often need provide the broadcast service of signal tone and prompt tone for the user; And, also needs are provided the playing function of more complicated intelligent prompt sound along with the development of IN service.At present, move, fixedly in the packet voice network, voice signal all passes through speech coding and transmits with the form of dividing into groups and exchange.
Since move, fixedly in the packetized voice call business, can select to use multiple speech coding form, promptly select different type of codings, and, also may have multiple speed for same type speech coding, for example, fixedly packet voice professional support G.711 usually, G.729, speech coding G.723.1, wherein G.723.1 speech coding comprises 5.3Kbps and two kinds of speed of 6.3Kbps; AMR (self adaptation multi-code velocity speech coding) speech coding is supported in UMTS (Universal Mobile Telecommunications System) speech business, and the AMR speech coding comprises 8 kinds of speed.In the packet voice business, need be supported in the speed of real time altering speech coding in the communication process usually, that have even may in the speech play process, also need to change the speech coding type, therefore moving, fixedly needing usually to use audio coder ﹠ decoder (codec) to realize the function of playing alert tones and signal tone in the packet voice business, realize same speech source file is play with different speech coding types and speech encoding rate by audio coder ﹠ decoder (codec), to adapt to the needs of different speech coding type and speech encoding rate.
Present applied audio coder ﹠ decoder (codec) uses relatively more expensive high-speed semiconductor device usually, realizes as DSP (digital signal processor), therefore realizes that the cost of prompt tone and signal tone playing function is very high.Adopt the playback equipment of the prompt tone/signal tone of 1000 passages of existing techniques in realizing, need to use the audio coder ﹠ decoder (codec) and the corresponding bag treatment system of 1000 passages, the cost cost $10/ passage of audio coder ﹠ decoder (codec), bag treatment system cost is $100, and therefore the cost of traditional implementation method is $10100.And, adopt prior art when a plurality of end points playing alert tones/signal tone, particularly prompt tone/the signal tone of a plurality of end points needs to distribute a plurality of audio coder ﹠ decoder (codec) passages not simultaneously usually, and resource allocation management is more loaded down with trivial details, has increased implementation complexity greatly.
Summary of the invention
The purpose of this invention is to provide in a kind of communication network the method that realizes playing alert tones and signal sound function,, fixedly in packet network cost and the implementation complexity of realization playing alert tones and signal sound function mobile to be reduced in.
The object of the present invention is achieved like this: realize the method for playing alert tones and signal sound function in the communication network, comprising:
(1) prompt tone that need play in the communication network of packet voice service communication network or packet voice business and TDM speech business mixing and tone information generate different classes of message file according to applied different speech coding type and different speech coding speed;
(2) with sorted message file according to identical time interval segmentation, and be every section distributing serial numbers sign according to unified rule, the wherein said time interval is determined according to the integral multiple of the least common multiple of the employed vocoder frames time span of various information file;
(3) according to the sequence number sign of each segment information file, in communication network, play corresponding message file in order.
Described step (1) comprising:
(11) definite prompt tone and tone information that needs broadcast;
(12) determine speech coding type and the speech encoding rate that this prompt tone of broadcast and tone information are used;
(13) prompt tone that the speech coding type of using in the time of will playing is identical with speech encoding rate and tone information compression generate the speech frame file of respective classes.
Described step (3) comprising:
(31) speech coding type as requested and speech encoding rate are play corresponding speech frame file fragmentation, and note the sequence number of the speech frame file fragmentation of current broadcast;
(32) determine the sequence number of speech frame file fragmentation next to be played according to the sequence number of the speech frame segmentation of current broadcast;
(33) determine speech frame file fragmentation next to be played according to the sequence number of next one speech frame file fragmentation to be played, and play this speech frame file fragmentation.
Described step (32) comprising:
(321) judge whether to switch to new speech coding type and speech encoding rate carries out the broadcast of speech frame file fragmentation, if desired, execution in step (322) then, otherwise, execution in step (324);
(322) determine new speech frame file fragmentation group, execution in step (323) according to new speech coding type and speech encoding rate;
(323) according to the sequence number sign of the speech frame file fragmentation of current broadcast, index goes out the next sequence number sign that needs the speech frame file fragmentation play, execution in step (33) from new speech frame file fragmentation group;
(324) according to the sequence number sign of the speech frame file fragmentation of current broadcast, index goes out the next sequence number sign that needs the speech frame file fragmentation play, execution in step (33) from current speech frame file fragmentation group.
By technique scheme as can be seen, the present invention is by prompt tone and tone information segmentation with grouping, when playing alert tones/signal tone, come the prompt tone and the signal tone grouping of synchronous different speech coding type and speech encoding rate according to the sequence number of each segmentation, to realize form playing alert tones and signal tone by grouping, save the audio coder ﹠ decoder (codec) resource to reach, realize the purpose of playing alert tones and signal sound function thereby reduce cost.When adopting method of the present invention to realize playing alert tones in the communication network and signal sound function, only need to dispose corresponding bag treatment system, saved audio coder ﹠ decoder (codec), the cost Yue Wei $100 of treatment system, realization cost of the present invention only is 0.99% of an existing techniques in realizing cost, cost savings 101 times.And, use the present invention to realize playing alert tones and signal sound function, owing to do not need to distribute the audio coder ﹠ decoder (codec) resource, only need play different prompt tone and signal tone files and get final product to a plurality of end points, therefore, enforcement of the present invention is very convenient.
Description of drawings
Fig. 1 is implementing procedure figure of the present invention.
Embodiment
The embodiment that realizes the method for playing alert tones and signal sound function in the communication network of the present invention is described below in conjunction with the accompanying drawings:
When moving, fixedly needing when the user plays user profile in the packet voice network, referring to Fig. 1, be compressed into the speech frame file of corresponding prompt sound and signal tone respectively according to different speech coding types or different speech encoding rates by the prompt tone of file carrying and tone information with what needs were play; The speech coding frame length of speech frame file can be identical, also can be different, see step 1.
Then, according to the identical time interval with all prompt tones that obtain in the step 1 and the speech frame file fragmentation of signal tone, see step 2; Can be set to the integral multiple of the least common multiple of speech coding frame length for the time interval between the speech frame file fragmentation, specifically implement when of the present invention suggestion and make that the time interval is the least common multiple of speech coding frame length; For example, a prompt tone original is compressed into G.723.1 speech frame file and AMR speech frame file respectively, because G.723.1 the frame length of encoding and decoding speech is 30ms, the frame length of AMR encoding and decoding speech is 20ms, then can incite somebody to action G.723.1 speech frame file and AMR speech frame file fragmentation according to the time interval of 60ms.
Need be its distributing serial numbers sign according to identical rule for the speech frame file after the segmentation, see step 3, can guarantee according to identical regular allocation sequence number sign each speech frame file fragmentation that needs are play by sequence index, thereby guarantee the normal play of prompt tone and signal tone; Distribute the rule of the sequence number sign of each speech frame file fragmentation should be able to guarantee can index to go out the sequence number sign of the speech frame file fragmentation that next needs play, to guarantee to determine the speech frame file fragmentation that next needs are play according to the sequence number sign of the speech frame file fragmentation of current broadcast according to the sequence number sign of in progress current speech frame file fragmentation.
Finish the process of above-mentioned steps 1, just finished the process of the speech frame file that generates corresponding prompt tone and tone information to step 3; Afterwards, just can call this speech frame file as required and carry out the broadcast of corresponding prompt sound and signal tone, concrete playing process is described below:
When playing alert tones and tone information, referring to step 4, speech coding type as requested and speech encoding rate are play the speech frame file fragmentation of corresponding prompt sound and signal tone; And execution in step 5, judge whether prompt tone and tone information play end, if playing process finishes, then execution in step 6, finish the broadcast of prompt tone and signal tone, otherwise, execution in step 7, the sequence number sign of the speech frame file fragmentation of the current broadcast of real time record; Then, referring to step 8, judge whether to switch to new speech coding type or speech encoding rate carries out the broadcast of speech frame file fragmentation, as needs, then execution in step 9, the speech frame file that new speech coding type that switches to as required or speech encoding rate find corresponding prompt sound and signal tone, the change of speech coding type or encoding and decoding speech speed when carrying out playing alert tones and signal tone; Again according to the sequence number sign of the speech frame file fragmentation of current broadcast, index goes out the next sequence number sign that needs the speech frame file fragmentation play from corresponding speech frame file, sees step 10; And begin to play the speech frame file fragmentation of new prompt tone and signal tone from this sequence number sign, promptly execution in step 5; If do not need to switch to new speech coding type or speech encoding rate carries out the broadcast of speech frame file fragmentation, direct execution in step 10 then.According to the process of the needs circulation execution in step 4 of playing the different speech frame file to step 10, until between prompt tone and signal, play and finish, just can in communication network, realize the function of playing alert tones and signal tone.
The method of realization playing alert tones provided by the present invention and signal sound function all uses packets of voice to handle, being about to prompt tone and signal tone generates different speech frame files respectively according to type of coding and code rate different and transmits and exchange, and play the speech frame file according to the order of sequence, in the process of playing alert tones or signal tone when encoding and decoding speech type or encoding and decoding speech speed take place when, can be identified between the different speech frame files according to the sequence number that is distributed and switch, guarantee the continuity that prompt tone and signal tone are play, realize the playing function of prompt tone and signal tone.Do not need the conversion of encoding and decoding speech among the present invention, therefore, the present invention need not use audio coder ﹠ decoder (codec) can realize the playing function of prompt tone and signal tone.
Method used in the present invention is particularly useful in the communication network of packet voice business, in the communication network that the while is also professional applicable to packet voice and TDM (time division multiplexing) speech business mixes.Under the situation of and TDM speech business mixing professional, can increase the G.711 prompt tone of form and the speech frame file of signal tone again, be used for to TDM netcast prompt tone and signal tone at packet voice.