WO2016107178A1 - 彩铃的播放方法及装置 - Google Patents
彩铃的播放方法及装置 Download PDFInfo
- Publication number
- WO2016107178A1 WO2016107178A1 PCT/CN2015/086273 CN2015086273W WO2016107178A1 WO 2016107178 A1 WO2016107178 A1 WO 2016107178A1 CN 2015086273 W CN2015086273 W CN 2015086273W WO 2016107178 A1 WO2016107178 A1 WO 2016107178A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- audio information
- information
- audio
- crbt
- frequency
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/12—Messaging; Mailboxes; Announcements
Definitions
- the present invention relates to the field of communications, and in particular to a method and apparatus for playing a color ring tone.
- the CRBT system is also widely used due to the convenience of purchase and use of CRBT.
- the audition function of the CRBT is an indispensable part of the ordering business process, providing users with a simple and friendly user experience, which is increasingly valued by many manufacturers. On the one hand, it can improve the service quality of the service, on the other hand, it can attract more. Many new users are concerned.
- Adobe's Flex technology As a new generation of client-side Internet technology, Adobe's Flex technology has been adopted by more and more companies and accepted by more and more users. According to the official API agreement.
- Flex's API sampling rate only supports 5.5kHz, 11kHz, 22kHz and 44kHz, of which 5.5kHz does not support mp3 playback files, and does not support audio files in wav format.
- the file format of the CRBT is wav, and the sampling rate is 8 kHz. Therefore, if you want to play the file in the format of CRBT, obviously the related technology is not supported; although you can use the PopForge open source library to expand Flex well, for 8 kHz
- the sampling rate of the wav file is played. This method is easy to cause distortion and the playback quality is very unsatisfactory.
- Figure 1 is the related art CRBT playback.
- the Web service is used for the running container of the CRBT system, and is provided to the CRBT system operating environment, controlling ring tone ordering, playing, list display, etc.; streaming media service is used to stream the network. Transmitting audio, video and multimedia files, conversion and storage of ringtone files; ringtone playback module is used for playing ringtones according to the URL of the ringtone file;
- the CRBT playback process is performed by the Web service to periodically issue an audio file conversion operation request task to the streaming media service.
- the streaming media service converts the format of the audio file wav into an mp3 format according to the issued timing task, and converts the sampling rate of the audio file to 8 kHz.
- the result is 44 kHz, and the result is stored on the hard disk of the streaming media server.
- the web service After receiving the HTTP/HTTPS request to play the ringtone of the ringtone, the web service sends the requested ringtone parameter information to the streaming media service, and the converted data is queried according to the parameter information.
- the ring tone data is returned to the web service to receive the converted result information, and then the URL request is re-encapsulated, and the ring tone file is loaded into the ring tone playing module to output the ring tone information to the user.
- the converted file of the streaming media service takes up a lot of hard disk space and requires additional storage space. Consumption of resources and economic costs;
- the newly added audio files of the streaming media service cannot be auditioned and ordered immediately by the user. It is necessary to wait for the task to be executed before it can be used. Generally, it is necessary to wait until the next day to affect the user experience;
- the main purpose of the embodiment of the present invention is to provide a method and a device for playing a CRBT to solve at least the problem that the playback of the CRBT audio file in the related art cannot be immediately audited or ordered by the user.
- a method for playing a CRBT including: acquiring audio information of a CRBT to be played; determining whether a sampling frequency of the audio information is a preset frequency, and when the judgment result is no, The sampling frequency of the audio information is converted into a preset frequency; and the color ring to which the sampling frequency is the preset frequency is played.
- the obtaining the audio information of the CRBT to be played includes: receiving a request message for playing the CRBT to be played, where the request message carries the audio information of the CRBT to be played; and the audio information is in bytes.
- the form is loaded into the SWF file; the byte stream information in the SWF file is obtained, wherein the byte stream information is the audio information.
- determining whether the sampling frequency of the audio information is a preset frequency comprises: pressing the byte stream information into a data stack; and acquiring audio header information of the audio information in the data stack; Audio header information, decoding the audio information; determining whether the decoded audio information sampling frequency is a preset frequency.
- the CRBT with the sampling frequency of the preset frequency is played by calling a resource library.
- the preset frequency is 44 kHz.
- a playback device for a CRBT including: an acquisition module, configured to acquire audio information of a CRBT to be played; and a determination module configured to determine whether a sampling frequency of the audio information is a preset The frequency, when the judgment result is no, converts the sampling frequency of the audio information into a preset frequency; and the playing module is configured to play the color ring to which the sampling frequency is the preset frequency.
- the obtaining module includes: a receiving unit, configured to receive a request message for playing a to-be-played CRBT, where the request message carries the audio information of the to-be-played CRBT; and the loading unit is configured to The audio information is loaded into the SWF file in the form of a byte; the first obtaining unit is configured to acquire byte stream information in the SWF file, wherein the byte stream information is the audio information.
- the determining module includes: a pushing unit configured to push the byte stream information into the data a second acquisition unit configured to acquire audio header information of the audio information in the data stack; a decoding unit configured to decode the audio information according to the audio header information; and the determining unit is configured to Determining whether the decoded audio information sampling frequency is a preset frequency.
- the CRBT with the sampling frequency of the preset frequency is played by calling a resource library.
- the preset frequency is 44 kHz.
- the main body performing the above steps may be a Flex ring tone playing module, and the Flex ring tone playing module does not need to first convert the format of the audio file in the process of playing the ring back tone. It only needs to convert the sampling frequency of the audio file.
- the audio file is the preset sampling frequency, no conversion is needed.
- the audio file can be directly played, which solves the playback of the color ring audio file in the related art. The problem of not being able to give the user an audition or order immediately improves the user experience.
- FIG. 1 is a schematic diagram of a CRBT playback process in the related art
- FIG. 2 is a flowchart of a method for playing a color ring tone according to an embodiment of the present invention
- FIG. 3 is a structural block diagram of a playback device of a color ring tone according to an embodiment of the present invention.
- FIG. 4 is a block diagram of an optional structure of a playback device of a color ring tones according to an embodiment of the present invention
- FIG. 5 is a block diagram 2 of an optional structure of a playback device of a color ring tones according to an embodiment of the present invention
- FIG. 6 is a schematic diagram of a CRBT playback process based on a FLEX ring tone playing module according to an alternative embodiment of the present invention
- FIG. 7 is a flowchart of a CRBT playback method based on a FLEX ring tone playing module according to an alternative embodiment of the present invention.
- FIG. 8 is a schematic diagram of a CRBT playback process according to an alternative embodiment of the present invention.
- FIG. 2 is a flowchart of a method for playing a CRBT according to an embodiment of the present invention. As shown in FIG. 2, the steps of the method include:
- Step S202 Acquire audio information of the CRBT to be played
- Step S204 determining whether the sampling frequency of the audio information is a preset frequency, and when the determination result is no, converting the sampling frequency of the audio information into a preset frequency;
- Step S206 Playing a CRBT whose sampling frequency is a preset frequency.
- the main body performing the above steps may be a Flex ring tone playing module.
- the Flex ring tone playing module does not need to convert the format of the audio file before playing the CRBT.
- the sampling frequency of the audio file needs to be converted.
- the audio file is the preset sampling frequency, no conversion is needed.
- the audio file can be directly played, which solves the problem that the color ring audio file cannot be played in the related art. Immediately give the user an audition or ordering question, which improves the user experience.
- Step S11 Receive a request message for playing a CRBT to be played, where the request message carries audio information of the CRBT to be played;
- Step S12 loading the audio information into the SWF file in the form of bytes
- Step S13 Obtain byte stream information in the SWF file, where the byte stream information is audio information.
- determining whether the sampling frequency of the audio information is a preset frequency may be implemented by the following steps:
- Step S21 Push the byte stream information into the data stack
- Step S22 Acquire audio head information of audio information in the data stack
- the audio header information may be a file header in a wav format
- Step S23 decoding the audio information according to the audio header information
- the CRBT with the sampling frequency of the preset frequency is played by calling the resource library.
- the preset frequency in this embodiment may be 44 kHz. It should be noted that the preset frequency The value of the rate is only an example of the present invention, and the corresponding adjustment can be made according to the actual situation.
- the resource library refers to the core class library developed by Adobe or the open source organization to communicate with the underlying computer system, mainly including as3corelib, as3ds, asaplibrary, etc., when playing, by calling attachAudio(), play(), etc. Play.
- a playback device for a color ring tones is also provided in this embodiment.
- the device is used to implement the foregoing embodiments and optional implementations, and details are not described herein.
- the term “module” "unit” may implement a combination of software and/or hardware of a predetermined function.
- the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
- FIG. 3 is a structural block diagram of a playback device of a CRBT according to an embodiment of the present invention.
- the device includes: an acquisition module 32 configured to acquire audio information of a CRBT to be played; and a determination module 34 coupled to the acquisition module 32. It is set to determine whether the sampling frequency of the audio information is a preset frequency, and when the determination result is no, the sampling frequency of the audio information is converted into a preset frequency; the playing module 36 is coupled with the determining module 34, and is set to play the sampling frequency as a pre- Set the ringtone of the frequency.
- FIG. 4 is a block diagram of an optional structure of a playback device for a color ring tones according to an embodiment of the present invention.
- the acquisition module 32 includes: a receiving unit 42 configured to receive a request message for playing a to-be-played CRBT, where the request message is Carrying the audio information of the CRBT to be played; the loading unit 44 is coupled to the receiving unit 42 and is configured to load the audio information into the SWF file in the form of a byte.
- the first obtaining unit 46 is coupled to the loading unit 44 and configured to acquire the SWF. Byte stream information in the file, wherein the byte stream information is audio information.
- FIG. 5 is a block diagram 2 of an optional structure of a CRBT playback apparatus according to an embodiment of the present invention.
- the judging module 34 includes: a press-in unit 52 configured to push byte stream information into a data stack;
- the obtaining unit 54 is coupled to the press-in unit 52 and configured to acquire audio header information of the audio information in the data stack;
- the decoding unit is configured to decode the audio information according to the audio header information;
- the determining unit 56 is coupled to the second acquiring unit 54. Connected, set to determine whether the decoded audio information sampling frequency is the preset frequency.
- the color ring with the sampling frequency of the preset frequency is played by calling the resource library by the class; and the preset frequency is 44 kHz.
- the optional embodiment mainly includes a secondary development of a player developed based on Flex, an internal completion ring tone file format and a conversion function of an adoption rate, wherein the internal format based on FLEX is converted and played a ring tone module for dynamic construction.
- Swf file load external wav file, audio decoding (G.711), internal conversion of audio sample rate conversion and other processes.
- CRBT system requires all audio file formats and recordings during the audition and playback of ring tones.
- the sample rate is to be converted into Adobe's FLEX technical specification format, and the converted file is further expanded to the storage space.
- This method has poor real-time performance and user experience.
- This alternative embodiment can avoid unnecessary additional storage space and It does not affect the current business operations, but also solves the real-time data, reduces operating costs, improves user experience and increases operators' economic income.
- FIG. 6 is a schematic diagram of a CRBT playback process based on a Flex ring tone playing module according to an alternative embodiment of the present invention. As shown in FIG. 6, the steps of the method include:
- Step S602 Dynamically construct a swf file
- Step S604 Loading an external wav file in a byte form
- Step S606 determining whether the audio file byte stream data is successfully read; if the determination result is yes, executing step S608, if the determination result is no, executing step S622;
- Step S608 Push data from the audio stream onto the stack
- Step S610 Acquire audio header information from the stack data, and use G.711 (mu-law) decoding;
- Step S612 determining whether the decoded audio data sampling rate is correct; when the determination result is YES, executing step S616, if the determination result is no, executing step S614;
- Step S614 Converting the non-44100 sampling rate to 44100
- Step S616 determining whether the resampling rate is successful; when the determination result is YES, executing step S718, if the determination result is no, executing step S724;
- Step S618 outputting a decoded stream output to a sampling rate of 44100 to a wav format file
- Step S620 embedding the wav data into the constructed swf file
- Step S622 playing the wav inside the swf by calling the resource library by the class;
- Step S624 returning to play failure
- Step S626 error information is saved
- FIG. 7 is a flowchart of a CRBT playback method based on a FLEX ring tone playing module according to an alternative embodiment of the present invention. As shown in FIG. 7, the method includes:
- Step S702 number the same type of small cells in the area; each small cell is a cluster; collect a large RSRP value between the two small cells; sort the RSRP list Q from large to small, below the threshold L The RSRP value is not counted in the list;
- Step S704 determining whether the Q set is an empty set; when the Q set is empty, performing step S706; when the Q set is not empty, performing step S708;
- Step S706 the clustering is completed
- Step S708 determining whether the clusters in which the two small cells corresponding to the maximum value of the RSRP in the list are merged exceed the threshold T of the small cells in the cluster; if the determination result is no, step S712 is performed, and when the determination result is yes, Go to step S710;
- Step S710 The two clusters are not adjusted and the row is removed from the list Q;
- Step S712 Two clusters are merged, edges are added between the endpoints of the two small cells, and the row is removed from the list Q.
- FIG. 8 is a schematic diagram of a color ring playing process according to an alternative embodiment of the present invention.
- the FLEX ring sound playing module is responsible for playing the ring sound file in the color ring system.
- you need to dynamically build a wsf (shock wave flash) file load the obtained HTTP/HTTPS request resource into the wsf file in bytes, and determine whether the audio file byte stream data is successfully read. If successful, The data is pushed into the data stack from the audio stream. Otherwise, the error message is returned and the error information log is recorded, and then the audio header information is obtained from the data stack, and the decoded audio data sample is judged by using G.711 (mu-law) decoding.
- G.711 mi-law
- the sampling frequency needs to be converted to 44 kHz, and then continue to judge whether the sampling rate sampling is successful, if it fails, the playback failure information will be returned and the result will be retained in the information log, if If successful, the decoded stream output to 44100 frequency is output to the wav format file, and the wav format file is embedded in the constructed swf file, the most Call the repository by class way to play this internal swf wav file.
- the audio format conversion is completed by the ring tone playing module, and the abnormal processing information is saved by using real-time playing and real-time conversion, which is convenient for the maintenance operator to check the correctness of the ring sound file, and also ensures the availability of the system. Improve the real-time and accuracy of system processing.
- the main body performing the above steps may be a Flex ring tone playing module, and the Flex ring tone playing module does not need to first convert the format of the audio file in the process of playing the ring back tone. It only needs to convert the sampling frequency of the audio file.
- the audio file is the preset sampling frequency, no conversion is needed.
- the audio file can be directly played, which solves the playback of the color ring audio file in the related art. The problem of not being able to give the user an audition or order immediately improves the user experience.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
本发明提供了一种彩铃的播放方法及装置,其中该方法包括:获取待播放彩铃的音频信息;判断音频信息的采样频率是否为预设频率,在判断结果为否时,将音频信息的采样频率转换为预设频率;播放采样频率为预设频率的彩铃。通过本发明,解决了相关技术中彩铃音频文件的播放不能立刻给用户试听或订购的问题,提高了用户体验。
Description
本发明涉及通信领域,具体而言,涉及一种彩铃的播放方法及装置。
随着电信增值业务的推广应用,彩铃***由于彩铃的购买和使用方便,也被广泛使用。彩铃的试听功能是订购业务流程中不可或缺的部分,给用户提供一个操作简单、友好的用户体验,越来越被很多厂商重视,一方面可以提高业务的服务质量,另一方面可以吸引更多的新用户关注,作为新一代的客户端互联网技术的佼佼者,Adobe公司的Flex这种技术已经被越来越多的公司所采用,被越来越多的用户所接受,据官方API约定(swf_file_format_spec_v10.pdf,第201页)Flex的API采样率仅支持5.5kHz、11kHz、22kHz和44kHz,其中5.5kHz对mp3播放文件不支持,对wav格式的音频文件不支持。而彩铃的文件格式为wav,采样率为8kHz,因此如果要播放彩铃这种格式的文件,显然相关技术是不支持的;尽管可以使用PopForge开源类库能够对Flex很好的扩展,但是对于8kHz的采样率的wav文件播放,采用该方式容易造成失真现象导致播放音质很不理想,可见相关技术中虽然可以缓解失真问题,但是音质不容乐观,依然存在很多弊端,图1是相关技术中彩铃播放过程的示意图,如图1所示,Web服务用于彩铃***的运行容器,并提供给彩铃***运行环境,控制铃音订购、播放,列表展示等;流媒体服务用于以流的方式在网络中传输音频、视频和多媒体文件,铃音文件的转换存储;铃音播放模块用于根据铃音文件的URL播放铃音的应用;
其中,彩铃播放过程是由Web服务向流媒体服务定时发出音频文件转换操作请求任务,流媒体服务根据发出的定时任务,将音频文件的格式wav转换为mp3格式,将音频文件的采样率8kHz转换为44kHz,将结果存储在流媒体服务器的硬盘上,Web服务收到HTTP/HTTPS请求播放某铃音的URL后,将请求的铃音参数信息发给流媒体服务会根据参数信息查询转换后的铃音数据,将结果返回给Web服务收到转换后的结果信息后重新封装URL请求,将铃音文件加载到铃音播放模块将铃音信息输出给用户。
采用相关技术中上述方案将会产生如下问题:
1.流媒体服务收到要播放的铃音请求后,而定时任务未完成导致此音频文件转换或转换失败,进而造成转换完后的文件有轻微杂音;
2.流媒体服务转换后的文件占用硬盘空间会很大,需要额外考虑存储空间,
消耗资源和经济成本;
3.流媒体服务新增加的音频文件不能立刻给用户试听和订购,需要等任务执行完后才能使用,一般是需要等到第二天,影响用户体验;
针对相关技术中彩铃音频文件的播放不能立刻给用户试听或订购的问题,目前尚未提出有效的解决方案。
发明内容
本发明实施例的主要目的在于提供一种彩铃的播放方法及装置,以至少解决相关技术中彩铃音频文件的播放不能立刻给用户试听或订购的问题。
根据本发明实施例的一个方面,提供了一种彩铃的播放方法,包括:获取待播放彩铃的音频信息;判断所述音频信息的采样频率是否为预设频率,在判断结果为否时,将所述音频信息的采样频率转换为预设频率;播放采样频率为所述预设频率的彩铃。
可选地,获取待播放彩铃的音频信息包括:接收用于播放待播放彩铃的请求消息,其中,所述请求消息中携带有所述待播放彩铃的音频信息;将所述音频信息以字节的形式加载到SWF文件中;获取所述SWF文件中字节流信息,其中,所述字节流信息为所述音频信息。
可选地,判断所述音频信息的采样频率是否为预设频率包括:将所述字节流信息压入数据栈中;获取所述数据栈中所述音频信息的音频头信息;依据所述音频头信息,对所述音频信息进行解码;判断解码后的所述音频信息采样频率是否为预设频率。
可选地,通过类调用资源库的方式播放采样频率为所述预设频率的彩铃。
可选地,所述预设频率为44kHz。
根据本发明实施例的一个方面,提供了一种彩铃的播放装置,包括:获取模块,设置为获取待播放彩铃的音频信息;判断模块,设置为判断所述音频信息的采样频率是否为预设频率,在判断结果为否时,将所述音频信息的采样频率转换为预设频率;播放模块,设置为播放采样频率为所述预设频率的彩铃。
可选地,所述获取模块包括:接收单元,设置为接收用于播放待播放彩铃的请求消息,其中,所述请求消息中携带有所述待播放彩铃的音频信息;加载单元,设置为将所述音频信息以字节的形式加载到SWF文件中;第一获取单元,设置为获取所述SWF文件中字节流信息,其中,所述字节流信息为所述音频信息。
可选地,所述判断模块包括:压入单元,设置为将所述字节流信息压入数据
栈中;第二获取单元,设置为获取所述数据栈中所述音频信息的音频头信息;解码单元,设置为依据所述音频头信息,对所述音频信息进行解码;判断单元,设置为判断解码后的所述音频信息采样频率是否为预设频率。
可选地,通过类调用资源库的方式播放采样频率为所述预设频率的彩铃。
可选地,所述预设频率为44kHz。
通过本发明实施例,采用在获取到待播放彩铃的音频信息之后,判断该音频信息的采样频率是否为预设频率,如果不是则将该音频信息的采样频率转换为预设频率,并将播放采样频率为预设频率的彩铃的方式,此过程中,执行上述步骤的主体可以是Flex铃音播放模块,该Flex铃音播放模块在播放彩铃的过程中并不需要先转换音频文件的格式,只需要转换音频文件的采样频率,当然如果音频文件为预设采样频率时,则不需要转换,当音频文件为预设文件之后直接可以播放该音频文件,解决了相关技术中彩铃音频文件的播放不能立刻给用户试听或订购的问题,提高了用户体验。
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:
图1是相关技术中彩铃播放过程的示意图;
图2是根据本发明实施例的彩铃的播放方法流程图;
图3是根据本发明实施例的彩铃的播放装置结构框图;
图4是根据本发明实施例的彩铃的播放装置可选结构框图一;
图5是根据本发明实施例的彩铃的播放装置可选结构框图二;
图6是根据本发明可选实施例的基于FLEX铃音播放模块的彩铃播放过程示意图;
图7是根据本发明可选实施例的基于FLEX铃音播放模块的彩铃播放方法流程图;
图8是根据本发明可选实施例的彩铃播放过程示意图。
需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可
以相互组合。下面将参考附图并结合实施例来详细说明本发明。
本实施例提供了一种彩铃的播放方法,图2是根据本发明实施例的彩铃的播放方法流程图,如图2所示,该方法的步骤包括:
步骤S202:获取待播放彩铃的音频信息;
步骤S204:判断音频信息的采样频率是否为预设频率,在判断结果为否时,将音频信息的采样频率转换为预设频率;
步骤S206:播放采样频率为预设频率的彩铃。
通过本实施例,采用在获取到待播放彩铃的音频信息之后,判断该音频信息的采样频率是否为预设频率,如果不是则将该音频信息的采样频率转换为预设频率,并将播放采样频率为预设频率的彩铃的方式,此过程中,执行上述步骤的主体可以是Flex铃音播放模块,该Flex铃音播放模块在播放彩铃的过程中并不需要先转换音频文件的格式,只需要转换音频文件的采样频率,当然如果音频文件为预设采样频率时,则不需要转换,当音频文件为预设文件之后直接可以播放该音频文件,解决了相关技术中彩铃音频文件的播放不能立刻给用户试听或订购的问题,提高了用户体验。
对于本实施例中涉及到的获取待播放彩铃的音频信息的方式,在本实施例的一个可选实施方式中可以通过如下方式来实现:
步骤S11:接收用于播放待播放彩铃的请求消息,其中,请求消息中携带有待播放彩铃的音频信息;
步骤S12:将音频信息以字节的形式加载到SWF文件中;
步骤S13:获取SWF文件中字节流信息,其中,字节流信息为音频信息。
而在本实施例的另一个可选实施方式中,判断音频信息的采样频率是否为预设频率的方式可以通过如下步骤来实现:
步骤S21:将字节流信息压入数据栈中;
步骤S22:获取数据栈中音频信息的音频头信息;
其中,该音频头信息可以是wav格式的文件头;
步骤S23:依据音频头信息,对音频信息进行解码;
判断解码后的音频信息采样频率是否为预设频率。
另外在本实施例中,可选地,通过类调用资源库的方式播放采样频率为预设频率的彩铃。以及本实施例中的预设频率可以为44kHz。需要说明的是该预设频
率的取值仅仅是本发明的举例说明,可以根据实际情况进行相应的调整。其中,资源库是指Adobe公司或开源组织开发的与计算机***底层通信的核心类库,主要包括as3corelib、as3ds、asaplibrary等,此处播放的时候通过调用attachAudio()、play()等方法来实现播放。
在本实施例中还提供了一种彩铃的播放装置,该装置用于实现上述实施例及可选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”“单元”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。
图3是根据本发明实施例的彩铃的播放装置结构框图,如图3所示,该装置包括:获取模块32,设置为获取待播放彩铃的音频信息;判断模块34与获取模块32耦合连接,设置为判断音频信息的采样频率是否为预设频率,在判断结果为否时,将音频信息的采样频率转换为预设频率;播放模块36与判断模块34耦合连接,设置为播放采样频率为预设频率的彩铃。
图4是根据本发明实施例的彩铃的播放装置可选结构框图一,如图4,获取模块32包括:接收单元42,设置为接收用于播放待播放彩铃的请求消息,其中,请求消息中携带有待播放彩铃的音频信息;加载单元44与接收单元42耦合连接,设置为将音频信息以字节的形式加载到SWF文件中;第一获取单元46于加载单元44耦合连接,设置为获取SWF文件中字节流信息,其中,字节流信息为音频信息。
图5是根据本发明实施例的彩铃的播放装置可选结构框图二,如图5所示,判断模块34包括:压入单元52,设置为将字节流信息压入数据栈中;第二获取单元54与压入单元52耦合连接,设置为获取数据栈中音频信息的音频头信息;解码单元,设置为依据音频头信息,对音频信息进行解码;判断单元56与第二获取单元54耦合连接,设置为判断解码后的音频信息采样频率是否为预设频率。
可选地,通过类调用资源库的方式播放采样频率为预设频率的彩铃;以及预设频率为44kHz。
下面结合本发明的可选实施例对本发明进行举例说明;
本可选实施例的主要包含基于Flex开发的播放器二次开发、内部完成铃音文件格式和采用率的转换功能,其中,基于FLEX开发的内部格式转换并播放铃音模块,用于动态构造swf文件、加载外部的wav文件,音频的解码(G.711),内部完成音频采样率的转换装载等过程。
相关技术彩铃***在试听和播放铃音过程中,需要将所有音频文件格式和采
样率欲转化成符合Adobe公司的FLEX技术规范格式,转换后的文件对存储空间要进一步的扩充,该方式实时性和用户体验不佳,通过本可选实施例能避免不用额外增加存储空间和不影响当前的业务运营,又能解决数据的实时性,减少运营成本,提高了用户体验和增加运营商的经济收入。
图6是根据本发明可选实施例的基于Flex铃音播放模块的彩铃播放过程示意图,如图6所示,该方法的步骤包括:
步骤S602:动态构造一个swf文件;
步骤S604:以字节形式加载外部的wav文件;
步骤S606:判断读取音频文件字节流数据是否成功;判断结果为是时执行步骤S608,判断结果为否时,执行步骤S622;
步骤S608:将数据从音频流压入栈;
步骤S610:从入栈数据获取到音频头信息,采用G.711(mu-law)解码;
步骤S612:判断被解码的音频数据采样率是否正确;判断结果为是时执行步骤S616,判断结果为否时,执行步骤S614;
步骤S614:将非44100采样率转换成44100;
步骤S616:判断重新采样率是否成功;判断结果为是时执行步骤S718,判断结果为否时,执行步骤S724;
步骤S618:输出成44100采样率的解码流输出到wav格式文件;
步骤S620:将此wav数据内嵌到构造的swf文件中;
步骤S622:通过类调用资源库的方式,播放此swf内部的wav;
步骤S624:返回播放失败;
步骤S626:错误信息保存;
图7是根据本发明可选实施例的基于FLEX铃音播放模块的彩铃播放方法流程图,如图7所示,该方法包括:
步骤S702:将区域内的同类型小小区编号;每个小小区各自为一簇;收集两两小小区间的RSRP较大值;将RSRP列表Q从大到小排序,低于门限值L的RSRP值不予统计入列表;
步骤S704:判断Q集合是否为空集;在Q集为空时,执行步骤S706;在Q集不为空时,执行步骤S708;
步骤S706:分簇完毕;
步骤S708:判断列表中RSRP最大值相对应的两个小小区所在的簇合并后是否超过簇内的小小区个数门限T;判断结果为否时,执行步骤S712,在判断结果为是时,执行步骤S710;
步骤S710:两簇不作调整且该行从列表Q中剔除;
步骤S712:两簇合并,两小小区端点间添加边,且该行从列表Q中剔除。
在图7的基础上结合图8进行相应的说明,图8是根据本发明可选实施例的彩铃播放过程示意图,如图8所示,FLEX铃音播放模块负责彩铃***中铃音文件的播放,首先是需要动态构建一个wsf(shock wave flash)文件,将获取到的HTTP/HTTPS请求的资源以字节形式加载到wsf文件中,判断读取音频文件字节流数据是否成功,如果成功将数据从音频流压入数据栈中,否则将错误信息返回并记录错误信息日志,然后从数据栈中获取到音频头信息,采用G.711(mu-law)解码,判断被解码的音频数据采样频率是否正确,即判断采样率是否是44kHz,如果不是44kHz需要将采样频率转换为44kHz,然后继续判断采样率采样是否成功,如果失败,则将返回播放失败信息并将结果保留到信息日志,如果成功则输出成44100频率的解码流输出到wav格式文件中,将此wav格式文件内嵌到构造的swf文件中,最后通过类调用资源库的方式,播放此swf内部的wav文件。
本可选实施例中由铃音播放模块完成音频格式转换,采用实时播放和实时转换,将异常处理信息保存起来,便于维护运营商检查铃音文件的正确性,此外在确保了***可用性的同时,提高了***处理的实时性和准确性。
上仅为本发明的可选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。
通过本发明实施例,采用在获取到待播放彩铃的音频信息之后,判断该音频信息的采样频率是否为预设频率,如果不是则将该音频信息的采样频率转换为预设频率,并将播放采样频率为预设频率的彩铃的方式,此过程中,执行上述步骤的主体可以是Flex铃音播放模块,该Flex铃音播放模块在播放彩铃的过程中并不需要先转换音频文件的格式,只需要转换音频文件的采样频率,当然如果音频文件为预设采样频率时,则不需要转换,当音频文件为预设文件之后直接可以播放该音频文件,解决了相关技术中彩铃音频文件的播放不能立刻给用户试听或订购的问题,提高了用户体验。
Claims (10)
- 一种彩铃的播放方法,包括:获取待播放彩铃的音频信息;判断所述音频信息的采样频率是否为预设频率,在判断结果为否时,将所述音频信息的采样频率转换为预设频率;播放采样频率为所述预设频率的彩铃。
- 根据权利要求1所述的方法,其中,获取待播放彩铃的音频信息包括:接收用于播放待播放彩铃的请求消息,其中,所述请求消息中携带有所述待播放彩铃的音频信息;将所述音频信息以字节的形式加载到SWF文件中;获取所述SWF文件中字节流信息,其中,所述字节流信息为所述音频信息。
- 根据权利要求2所述的方法,其中,判断所述音频信息的采样频率是否为预设频率包括:将所述字节流信息压入数据栈中;获取所述数据栈中所述音频信息的音频头信息;依据所述音频头信息,对所述音频信息进行解码;判断解码后的所述音频信息采样频率是否为预设频率。
- 根据权利要求1所述的方法,其中,通过类调用资源库的方式播放采样频率为所述预设频率的彩铃。
- 根据权利要求1至4任一项所述的方法,其中,所述预设频率为44kHz。
- 一种彩铃的播放装置,包括:获取模块,设置为获取待播放彩铃的音频信息;判断模块,设置为判断所述音频信息的采样频率是否为预设频率,在判断结果为否时,将所述音频信息的采样频率转换为预设频率;播放模块,设置为播放采样频率为所述预设频率的彩铃。
- 根据权利要求6所述的装置,其中,所述获取模块包括:接收单元,设置为接收用于播放待播放彩铃的请求消息,其中,所述请求消息中携带有所述待播放彩铃的音频信息;加载单元,设置为将所述音频信息以字节的形式加载到SWF文件中;第一获取单元,设置为获取所述SWF文件中字节流信息,其中,所述字节流信息为所述音频信息。
- 根据权利要求7所述的装置,其中,所述判断模块包括:压入单元,设置为将所述字节流信息压入数据栈中;第二获取单元,设置为获取所述数据栈中所述音频信息的音频头信息;解码单元,设置为依据所述音频头信息,对所述音频信息进行解码;判断单元,设置为判断解码后的所述音频信息采样频率是否为预设频率。
- 根据权利要求6所述的装置,其中,通过类调用资源库的方式播放采样频率为所述预设频率的彩铃。
- 根据权利要求6至9任一项所述的装置,其中,所述预设频率为44kHz。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410853599.3 | 2014-12-30 | ||
CN201410853599.3A CN105813031A (zh) | 2014-12-30 | 2014-12-30 | 彩铃的播放方法及装置 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2016107178A1 true WO2016107178A1 (zh) | 2016-07-07 |
Family
ID=56284123
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2015/086273 WO2016107178A1 (zh) | 2014-12-30 | 2015-08-06 | 彩铃的播放方法及装置 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN105813031A (zh) |
WO (1) | WO2016107178A1 (zh) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106850629B (zh) * | 2017-02-09 | 2020-05-12 | Oppo广东移动通信有限公司 | 一种流媒体数据的处理方法及移动终端 |
CN110177176B (zh) * | 2019-05-27 | 2021-06-08 | 深圳市万普拉斯科技有限公司 | 提升通话音质的方法、装置及移动终端 |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20020014875A (ko) * | 2000-08-19 | 2002-02-27 | 윤종용 | 엠피쓰리 플레이어 기능을 내장한 디지털 방송수신기 |
US20040197085A1 (en) * | 2003-04-04 | 2004-10-07 | Kaoru Urata | Data reproduction method and data reproduction apparatus |
CN101237488A (zh) * | 2008-02-22 | 2008-08-06 | 华为技术有限公司 | 实现彩铃业务的装置和方法及获取彩铃文件的装置 |
CN101364417A (zh) * | 2008-09-17 | 2009-02-11 | 青岛海信移动通信技术股份有限公司 | 一种音频快速播放方法及装置 |
KR20110015119A (ko) * | 2009-08-07 | 2011-02-15 | 주식회사 텔레칩스 | 오디오 파일 재생시 메시지 청취 장치 및 방법 |
CN102355309A (zh) * | 2011-08-09 | 2012-02-15 | 中兴通讯股份有限公司 | 一种支持多种采样率的蓝牙立体声的实现方法和装置 |
-
2014
- 2014-12-30 CN CN201410853599.3A patent/CN105813031A/zh active Pending
-
2015
- 2015-08-06 WO PCT/CN2015/086273 patent/WO2016107178A1/zh active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20020014875A (ko) * | 2000-08-19 | 2002-02-27 | 윤종용 | 엠피쓰리 플레이어 기능을 내장한 디지털 방송수신기 |
US20040197085A1 (en) * | 2003-04-04 | 2004-10-07 | Kaoru Urata | Data reproduction method and data reproduction apparatus |
CN101237488A (zh) * | 2008-02-22 | 2008-08-06 | 华为技术有限公司 | 实现彩铃业务的装置和方法及获取彩铃文件的装置 |
CN101364417A (zh) * | 2008-09-17 | 2009-02-11 | 青岛海信移动通信技术股份有限公司 | 一种音频快速播放方法及装置 |
KR20110015119A (ko) * | 2009-08-07 | 2011-02-15 | 주식회사 텔레칩스 | 오디오 파일 재생시 메시지 청취 장치 및 방법 |
CN102355309A (zh) * | 2011-08-09 | 2012-02-15 | 中兴通讯股份有限公司 | 一种支持多种采样率的蓝牙立体声的实现方法和装置 |
Also Published As
Publication number | Publication date |
---|---|
CN105813031A (zh) | 2016-07-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10200004B2 (en) | Last mile equalization | |
US11081101B1 (en) | Real time popularity based audible content acquisition | |
TW201427457A (zh) | 資訊共用方法、終端、伺服器及系統 | |
CN109271130B (zh) | 音频播放方法、介质、装置和计算设备 | |
WO2022110943A1 (zh) | 语音预览的方法及装置 | |
CN104091596A (zh) | 一种乐曲识别方法、***和装置 | |
WO2020114181A1 (zh) | 网络语音识别方法、网络业务交互方法及智能耳机 | |
CN110958298A (zh) | 无线音频播放设备及其无线互联网音频播放方法 | |
WO2012065567A1 (zh) | 文本信息的转换方法及装置 | |
WO2016107178A1 (zh) | 彩铃的播放方法及装置 | |
WO2019149017A1 (zh) | 一种音频数据处理方法、装置、电子设备及存储介质 | |
CN104038772B (zh) | 生成铃声文件的方法及装置 | |
CN105957542B (zh) | 一种音频文件编辑方法及装置 | |
JP5878148B2 (ja) | 音声品質測定システム | |
CN114257905A (zh) | 音频处理方法、计算机可读存储介质、及电子设备 | |
CN115278456A (zh) | 一种音响设备及音频信号处理方法 | |
WO2017107750A1 (zh) | 呼叫放音控制方法及装置 | |
CN111147655B (zh) | 模型生成方法和装置 | |
CN109375892B (zh) | 用于播放音频的方法和装置 | |
CN108831475B (zh) | 一种文本消息提取方法及*** | |
WO2020024508A1 (zh) | 语音信息的获取方法及装置 | |
US20190132640A1 (en) | Automated Playback and Redistribution of Internet Streaming Content | |
WO2020087788A1 (zh) | 音频处理方法和装置 | |
US20230163742A1 (en) | Audio system equalization based on type of audio being broadcast | |
CN113593568B (zh) | 将语音转换成文本的方法、***、装置、设备及存储介质 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 15874867 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 15874867 Country of ref document: EP Kind code of ref document: A1 |