WO2016155139A1 - Ringtone playing method and apparatus, terminal and storage medium - Google Patents

Ringtone playing method and apparatus, terminal and storage medium Download PDF

Info

Publication number
WO2016155139A1
WO2016155139A1 PCT/CN2015/083554 CN2015083554W WO2016155139A1 WO 2016155139 A1 WO2016155139 A1 WO 2016155139A1 CN 2015083554 W CN2015083554 W CN 2015083554W WO 2016155139 A1 WO2016155139 A1 WO 2016155139A1
Authority
WO
WIPO (PCT)
Prior art keywords
audio
duration
segment
audio file
ringing
Prior art date
Application number
PCT/CN2015/083554
Other languages
French (fr)
Chinese (zh)
Inventor
付剑楠
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2016155139A1 publication Critical patent/WO2016155139A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/60Substation equipment, e.g. for use by subscribers including speech amplifiers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M19/00Current supply arrangements for telephone systems
    • H04M19/02Current supply arrangements for telephone systems providing ringing current or supervisory tones, e.g. dialling tone or busy tone
    • H04M19/04Current supply arrangements for telephone systems providing ringing current or supervisory tones, e.g. dialling tone or busy tone the ringing-current being generated at the substations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/725Cordless telephones

Definitions

  • the present invention relates to the field of terminal technologies, and in particular, to a ringtone playing method and apparatus, a terminal, and a storage medium.
  • the alarm clock function on smart terminals has become a standard function, becoming an indispensable part of people's daily life.
  • the function of the alarm clock is very powerful, you can set it to various modes at will, but it lacks the setting of personalized alarm ringtone. You can only set one type of alarm song at a time, and each time you play it, you can play the same song from the beginning. It will be boring and the user experience is not good.
  • the current call ringtone of the terminal also lacks personalized settings, and only one type of ringtone song can be set at a time, and each time it is played, the same song is played from the beginning, which is also relatively boring and the user experience is not good.
  • the main technical problem to be solved by the present invention is to provide a ringtone playing method and device, a terminal, and a storage medium, which can solve the technical problem that the user experience is poor due to the fact that the terminal cannot implement personalized ringtone setting and playing.
  • the embodiment of the present invention provides a ringtone playing method, including the following steps:
  • Selecting at least one audio file from the audio file stored in the terminal cutting the selected audio file according to the duration of the ringing to obtain a plurality of audio segments, and storing the audio segment;
  • the corresponding audio segment is called from the storage for playing.
  • the step of cutting the selected audio file according to the duration of the ring to obtain a plurality of audio segments comprises:
  • the total audio file is cut according to the duration of the ringing to obtain an audio segment having a duration equal to the duration of the ringing.
  • the step of generating a total audio file according to all selected audio files comprises:
  • All selected audio files are arranged to obtain a total audio file, and the duration of the total audio file is the sum of the durations of all selected audio files.
  • the step of cutting the total audio file according to the duration of the ring to obtain an audio segment having a duration equal to the duration of the ring duration includes:
  • the total audio file is segment cut by the duration of the ring duration as a segment to obtain a plurality of audio segments.
  • the step of cutting the total audio file according to the duration of the ring to obtain an audio segment having a plurality of durations equal to the duration of the ring duration further includes:
  • the duration of the total audio file is not an integer multiple of the duration of the ring duration, segmenting the total audio file by using the duration of the ring duration as a segment to obtain a plurality of audio segments;
  • the preset audio file is filled
  • the duration of the audio segment is made equal to the duration of the ringing to the audio segment.
  • the method before the cutting the selected audio file according to the duration of the ring to obtain a plurality of audio segments, the method further includes:
  • the method further includes:
  • the audio corresponding to the missing phrase of the audio segment is added to the audio segment such that the phrase of the audio segment is complete.
  • the step of calling the corresponding audio segment from the storage for playing includes:
  • the corresponding audio segment is called from the storage for playback according to the number of rings.
  • the embodiment of the present invention further provides a ringtone playing device, including: an acquiring module, a selecting module, an audio processing module, a storage module, and a playing module;
  • the obtaining module is configured to obtain a duration of a ring set by a user
  • the selecting module is configured to select at least one audio file from the audio file stored by the terminal;
  • the audio processing module is configured to cut a selected audio file according to the duration of the ring to obtain a plurality of audio segments;
  • the storage module is configured to store the audio segment
  • the playing module is configured to, after the ringing is triggered, invoke the corresponding audio segment from the storage module for playing.
  • the audio processing module is configured to:
  • the total audio file is cut according to the duration of the ringing to obtain an audio segment having a duration equal to the duration of the ringing.
  • the audio processing module is configured to arrange all the selected audio files to obtain a total audio file, and the duration of the total audio file is the sum of the durations of all the selected audio files.
  • the audio processing module is configured to:
  • the duration of the total audio file is an integer multiple of the duration of the ringing, segmenting the total audio file by using the duration of the ringing duration as a segment to obtain a plurality of audio segments;
  • the duration of the total audio file is not an integer multiple of the duration of the ring duration, segmenting the total audio file by using the duration of the ring duration as a segment to obtain a plurality of audio segments;
  • a preset audio file is filled into the audio segment such that the duration of the audio segment is equal to the duration of the ringing.
  • the apparatus further includes: a phrase recognition module, a judgment module, and a phrase supplementation module:
  • the word recognition module is configured to: after the selection module selects an audio file, before the storage module stores the audio segment, the selected audio file is identified to obtain an audio time point of the complete word of the audio file;
  • the determining module is configured to: after the audio processing module performs cutting to obtain a plurality of audio segments, the audio processing module determines, according to the audio time point of the complete phrase and the time point of the audio segment, before the storage module stores the audio segment Whether the words of the audio segment are complete, and the time point of the audio segment includes the start and/or end time points of the audio segment;
  • the phrase supplementing module is configured to, when the determining module is negative, the audio corresponding to the missing phrase of the audio segment is added to the audio segment such that the phrase of the audio segment is complete.
  • the playing module is configured to call the corresponding audio segment from the storage for playing according to the number of rings.
  • an embodiment of the present invention further provides a terminal, including: a processor and a memory, where the processor is configured to:
  • the corresponding audio segment is called from the memory for playing.
  • an embodiment of the present invention provides a computer storage medium, where the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the ringtone playing method provided by the first aspect of the present invention.
  • the embodiment of the present invention provides a ringtone playing method and device, a terminal, and a storage medium, wherein: obtaining a ring duration; selecting at least one audio file from the audio files stored by the terminal, and selecting according to the duration of the ringing
  • the audio file is cut to obtain a plurality of audio segments, and the audio segment is stored; after the ringing is triggered, the corresponding audio segment is called from the storage for playing; the ringtone playing method of the present invention can select the user from the terminal storage.
  • the desired audio file and then the selected audio file is cut into a plurality of audio segments, and the audio segment is used as a ringtone of the terminal (calling ringtone or alarm ringtone), and the method of the present invention can be used to implement personalized or diverse ringtone settings and Play, enhance the user experience.
  • FIG. 1 is a schematic flowchart of a ringtone playing method according to Embodiment 1 of the present invention.
  • FIG. 2 is a schematic flowchart of a ringtone playing process of an alarm clock according to Embodiment 1 of the present invention
  • FIG. 3 is a schematic structural diagram of a ringtone playing device according to Embodiment 2 of the present invention.
  • FIG. 4 is a schematic structural diagram of another ringtone playing device according to Embodiment 2 of the present invention.
  • FIG. 5 is a schematic structural diagram of a terminal according to Embodiment 3 of the present invention.
  • FIG. 6 is a schematic structural diagram of an alarm clock ringing device according to Embodiment 4 of the present invention.
  • Embodiment 1 is a diagrammatic representation of Embodiment 1:
  • the present invention provides a method for playing a ringtone, which can be used to play an incoming call ringtone or an alarm ringtone. As shown in FIG. 1, the following steps are included:
  • Step 101 Obtain a ring duration.
  • the duration of the ringing time set by the user on the terminal can be obtained. For example, when the alarm ringtone is played, the duration of the alarm that is set by the user on the terminal or the default of the terminal can be obtained. You can get the duration of the incoming call ringing from the network side, or you can measure the incoming call ringtone to get the duration of the incoming call ring. For example, you can measure the average duration of an incoming call ring.
  • the duration of the ringing duration refers to: the duration of the continuous playing of the ringtone; in the case where the alarm is set or the incoming call event is triggered multiple times, the duration of the ringing in this embodiment is the duration of the single ringing. For example, if the alarm is triggered, it needs to be ringed five times. The interval of the ringing is 1 minute. At this time, the duration of the ringing is the duration of each ringing (for example, 1 minute).
  • Step 102 Select at least one audio file from the audio file stored by the terminal, and cut the selected audio file according to the duration of the ring to obtain a plurality of audio segments, and store the audio file. Audio clip.
  • the audio file may be a song stored by the terminal.
  • at least one song may be selected from the songs stored by the terminal and marked as favorites according to a preset audio selection rule.
  • the preset audio selection rule in this embodiment may include: selecting an audio file with strong rhythm feeling, or selecting an audio file of a predetermined genre.
  • audio filtering of songs in the user's music library marked as favorite song list filtering out soft, slow, slow-paced, unsuitable songs as an alarm clock, select a strong sense of rhythm, suitable as a ringtone (alarm or call) Ringtones); for example, select an audio file for the rap class.
  • the preset audio selection rule may be set according to the actual needs of the user, so as to select an audio file required by the user as an alarm or an incoming call ringtone.
  • the process of cutting the selected audio file according to the duration of the ringing to obtain a plurality of audio segments in this step may include:
  • the total audio file is cut according to the duration of the ringing to obtain an audio segment having a duration equal to the duration of the ringing.
  • all the selected audio files may be combined to generate a total audio file.
  • all the selected audio files may be arranged to obtain a total audio file, and the total audio file duration. The sum of the durations of all selected audio files. For example, all the audio files are arranged in order, and the end time point of the previous audio file is used as the starting time point of the next audio file, so that all the audio files are temporally connected to form a total audio file.
  • this embodiment may also have other ways to generate a total audio file, such as selecting the audio portion with the strongest rhythm in each audio file, and then composing the selected audio portion into an audio file.
  • the total audio file is input according to the duration of the ringing duration.
  • the specific process of cutting a plurality of audio segments having a duration equal to the duration of the ring duration may include:
  • the duration of the total audio file is an integer multiple of the duration of the ringing, segmenting the total audio file by using the duration of the ringing duration as a segment to obtain a plurality of audio segments;
  • the duration of the total audio file is not an integer multiple of the duration of the ring duration, segmenting the total audio file by using the duration of the ring duration as a segment to obtain a plurality of audio segments;
  • a preset audio file is filled into the audio segment such that the duration of the audio segment is equal to the duration of the ringing.
  • A, B, C, and D there are three songs marked as favorite songs A, B, C, and D.
  • A, B, and C meet the conditions as an alarm clock.
  • the duration of A is 02:40
  • the duration of B is 03:00
  • the duration of C is For 03:10, the user set the alarm duration to 1 minute, then after the data calculation process, the total length is 08:50, generating 9 clips, and the last clip is filled with the default ringtone of 10 seconds.
  • Step 103 After the ringing is triggered, the corresponding audio segment is called from the storage for playing.
  • the alarm is triggered to ring, or when the terminal receives the call, the terminal is triggered to ring.
  • the process of calling the corresponding audio segment from the storage for playing in this step includes: calling the corresponding audio segment from the storage for playing according to the number of rings. Further, the method of this embodiment can call different audio segments from the storage for playing according to the number of rings.
  • the first audio segment is played when the alarm sounds for the first time
  • the second audio segment is played after the delay
  • the second audio segment is played, and so on.
  • the Nth audio segment is played.
  • the same is true when the incoming call is ringing, and each ringing calls a different audio segment to play.
  • the terminal can select the audio file required by the user from the terminal storage, and then cut the selected audio file into multiple audio segments, and use the audio segment as the ringtone of the terminal (caller ringtone or alarm ringtone), enriching
  • the ringtone of the terminal realizes the personalized and diverse device and playback of the ringtone, which enhances the user experience.
  • the method in this embodiment can also The incomplete audio clips are complemented to make them complete. Specifically, before the method of cutting the selected audio file according to the duration of the ringing to obtain a plurality of audio segments, the method further includes: identifying the selected audio file, and acquiring the complete word in the selected audio file. Time point
  • the method in this embodiment further includes:
  • the audio corresponding to the missing phrase of the audio segment is added to the audio segment such that the phrase of the audio segment is complete.
  • the time point of the audio clip in this embodiment is: the cut point time of the total audio file.
  • the method of the embodiment can automatically supplement the imperfection of the words caused by the segment cutting.
  • the time point of the complete sentence of the selected audio file including the starting time point and/or the ending time point
  • comparing the starting time point and the ending time point of each audio segment with the corresponding time point of completing the word according to the comparison result to determine whether the audio segment is complete; for example, audio segment knot
  • the bundle point is in the middle of a lyric, that is, the end point time is less than the complete end time point of the sentence, so that the lyrics of the sentence are not played, the ringtone is automatically extended until the sentence is finished, and the end time of the segment is automatically updated.
  • the method for playing the alarm ringtone is taken as an example to specifically describe the method in this embodiment. As shown in FIG. 2, the method includes the following steps:
  • Step 201 Detect a song marked as a user's favorite in the terminal music library and an alarm clock duration set by the user.
  • the method of the embodiment can periodically detect the song track in the music library that is marked as favorite by the user and the duration of the alarm ringtone set by the user each time.
  • Step 202 Select a song with strong rhythm from the songs that the user likes.
  • Step 203 Identify the audio time point of the complete sentence of the song by identifying the selected song.
  • the point in time at which the complete sentence of the song has been filtered is identified, and the audio time point of each complete sentence is saved.
  • the audio time point of the complete sentence of each song can be identified according to the parameters of the filtered song.
  • the embodiment may also identify the audio time point of the complete sentence, and then save it, so as to call the corresponding audio time point by the identifier when the integrity is judged later, for example, the song name to which the complete word belongs is used as Logo,.
  • Step 204 Arranging the selected songs to generate an alarm clock song, and cutting the alarm clock song according to the alarm bell ringing duration to obtain an audio segment having a duration equal to that of the alarm clock.
  • the selected songs are arranged into one song as an alarm clock, and the duration of the alarm clock is equal to the sum of the durations of all the selected songs; then, the alarm clock is cut into a plurality of audio segments in units of the alarm ring duration.
  • the duration of cutting the plurality of audio segments is equal to the duration of the alarm
  • the audio segment that is longer than the duration of the alarm bell is present in the plurality of audio segments, such as the last cut audio segment, for which the audio segment needs to be Fill the audio file for a duration equal to the duration of the alarm, such as populating the terminal's default ringtone value for that audio clip.
  • A, B, C, and D there are three songs marked as favorite songs A, B, C, and D.
  • A, B, and C meet the conditions as an alarm clock.
  • the duration of A is 02:40
  • the duration of B is 03:00
  • the duration of C is 03:10
  • the user set the alarm duration to 1 minute
  • the total length is 08:50, generating 9 segments, and the last segment is filled with the default ringtone of 10 seconds.
  • Step 205 Determine whether the words of the audio segment are complete according to the audio time point of the complete phrase and the time point of the audio segment. If not, execute step 206, and if yes, perform step 207.
  • the audio time point of the corresponding complete word can be obtained according to the identifier of the audio time point of the completed phrase (for example, the song name), and then compared with the corresponding audio segment, and the word segment of the audio segment is determined to be complete according to the comparison result.
  • Step 206 Add audio corresponding to the missing phrase of the audio segment to the audio segment such that the phrase of the audio segment is complete.
  • the word segment of the audio segment is determined to be incomplete. At this point, it is necessary to supplement the audio corresponding to the missing words to the segment, so that the complete lyrics are played.
  • the forward adaptation needs to be complemented by the complete sentence.
  • the audio clips are:
  • the parameter of ...A/B represents the encoding order of the song after the operation processing
  • the latter time represents the starting point or ending point of the audio segment
  • "xxx" represents the song name
  • "2:40” represents the total duration of the song
  • Each clip has two sets of data.
  • the second time factor in the first data represents the start time of the clip
  • the second time factor in the second data represents the end time of the clip.
  • the end point of the previous segment and the starting point of the next segment may be sequentially arranged (such as the first audio segment and the second audio segment), or may exist because the words are automatically added. Overlapping parts (such as the second audio clip and the third audio clip).
  • Step 207 The audio clip is marked and stored.
  • each audio segment is numbered, and then the audio segment and its number are stored.
  • Step 208 After the alarm is triggered, the corresponding audio segment is called from the storage to play according to the number of times the alarm is ringed.
  • the corresponding audio segment can be called for playing according to the number of times the alarm is ringed and the number sequence of the audio segment.
  • the first audio segment is played
  • the second audio segment is played after the delay
  • the second audio segment is played, and so on.
  • the Nth audio segment is played.
  • the method in this embodiment can also update the ringtone.
  • the ringtone can be reset according to the above steps when the ring duration is long or the audio file stored by the terminal changes.
  • the method can adaptively adjust the playing of the alarm ringtone according to the change of the duration of the alarm clock, automatically filter the user's favorite song as the ringtone and supplement the completeness of the audio segment, and realize the diversification of the alarm ringtone and improve the user experience.
  • the method of the embodiment can provide a user with a variety of alarm clock ringing modes, which is highly friendly and enhances the user experience.
  • Embodiment 2 is a diagrammatic representation of Embodiment 1:
  • the present embodiment provides a ringtone playback apparatus 300, including: an acquisition module 301, a selection module 302, an audio processing module 303, a storage module 304, and a playback module 305, where:
  • the obtaining module 301 is configured to acquire a duration of a ring set by a user
  • the selecting module 302 is configured to select at least one audio file from the audio files stored by the terminal;
  • the audio processing module 303 is configured to cut a selected audio file according to the duration of the ring to obtain a plurality of audio segments;
  • the storage module 304 is configured to store the audio segment
  • the playing module 305 is configured to: after the ringing is triggered, invoke the corresponding audio segment from the storage module for playing.
  • the ringtone playing device of the embodiment can implement the setting and playing of the ringtone diversification or personalization, thereby improving the user experience.
  • the audio processing module 303 is configured to:
  • the audio processing module 303 is configured to arrange all the selected audio files to obtain a total audio file, and the duration of the total audio file is the sum of the durations of all the selected audio files.
  • the audio processing module 303 is configured to:
  • the duration of the total audio file is an integer multiple of the duration of the ringing, segmenting the total audio file by using the duration of the ringing duration as a segment to obtain a plurality of audio segments;
  • the duration of the total audio file is not an integer multiple of the duration of the ring duration, segmenting the total audio file by using the duration of the ring duration as a segment to obtain a plurality of audio segments;
  • a preset audio file is filled into the audio segment such that the duration of the audio segment is equal to the duration of the ringing.
  • the apparatus of this embodiment may further include: a phrase recognition module 308, a determination module 306, and a phrase supplementation module 307, wherein;
  • the word recognition module 308 is configured to: after the selection module selects an audio file, the storage module identifies an audio time point of the complete word of the audio file before the audio module stores the audio segment;
  • the determining module 306 is configured to: after the audio processing module performs cutting to obtain a plurality of audio segments, the audio processing module determines, according to the audio time point of the complete phrase and the time point of the audio segment, before the storage module stores the audio segment Whether the words of the audio segment are complete, and the time point of the audio segment includes a start and/or an end time point of the audio segment;
  • the phrase supplementing module 307 is configured to, when the determining module is negative, the audio corresponding to the missing phrase of the audio segment is added to the audio segment such that the phrase of the audio segment is complete.
  • the playing module 305 is configured to call the corresponding audio segment from the storage to play according to the number of rings.
  • the device can adaptively adjust the playing of the alarm ringtone according to the change of the duration of the alarm clock, automatically filter the user's favorite song as the ringtone and supplement the completeness of the audio segment, realize the diversification of the alarm ringtone, and improve the user experience.
  • Embodiment 3 is a diagrammatic representation of Embodiment 3
  • the embodiment provides a terminal 500, including: a processor 501 and a memory 502.
  • the processor 501 is configured to:
  • Selecting at least one audio file from the audio files stored in the terminal cutting the selected audio file according to the duration of the ringing to obtain a plurality of audio segments, and storing the audio segments into the memory;
  • the corresponding audio segment is called from the memory for playing.
  • the step of cutting the selected audio file according to the duration of the ring to obtain a plurality of audio segments comprises:
  • the total audio file is cut according to the duration of the ringing to obtain an audio segment having a duration equal to the duration of the ringing.
  • the step of generating a total audio file according to all selected audio files includes:
  • All selected audio files are arranged to obtain a total audio file, and the duration of the total audio file is the sum of the durations of all selected audio files.
  • the step of cutting the total audio file according to the duration of the ring to obtain an audio segment having a duration equal to the duration of the ring duration includes:
  • the duration of the total audio file is an integer multiple of the duration of the ringing
  • the duration of the ring is a duration of a segment
  • the total audio file is segment-cut to obtain a plurality of audio segments
  • the duration of the total audio file is not an integer multiple of the duration of the ring duration, segmenting the total audio file by using the duration of the ring duration as a segment to obtain a plurality of audio segments;
  • a preset audio file is filled into the audio segment such that the duration of the audio segment is equal to the duration of the ringing.
  • the processor is further configured to: after the selected audio file is cut according to the duration of the ring to obtain a plurality of audio segments, identify the selected audio file to obtain the selected audio. An audio time point of the complete sentence of the file; after the ringing of the selected audio file according to the duration of the ring to obtain a plurality of audio segments, before the ringing is triggered, according to the audio time point of the complete phrase and the Determining whether the words of the audio segment are complete at a time point of the audio segment, the time point of the audio segment includes a start and/or an end time point of the audio segment, and if not, the audio corresponding to the word segment missing from the audio segment Supplementing to the audio segment completes the phrase of the audio segment.
  • Embodiment 4 is a diagrammatic representation of Embodiment 4:
  • the embodiment provides an alarm clock ringing device, including: a first detecting module 601, a second detecting module 602, an audio filtering module 603, a word recognition module 606, a determining module 604, and a data calculating module 605. , an adaptive sentence supplementing module 607, a data storage module 608, a playing module 609, and a counter 610, wherein
  • the first detecting module 601 is configured to detect an alarm duration of the alarm module, and when the duration setting parameter changes, the parameter is obtained and transmitted to the next unit module; if the parameter does not change, the data is not transmitted to Next module;
  • the second detecting module 602 is configured to detect the favorite songs marked by the user in the music library; the detecting method is timing detection, and the system defaults to one week, and the user can adjust the time by himself. Inspection When the favorite song list is found to be empty, the default alarm is adopted; when the number of favorite songs is detected, including adding, deleting, and replacing, the song parameters in this state are transmitted to the next unit module;
  • the audio filtering module 603 is configured to receive the song parameters transmitted by the previous module, and filter the songs, and filter out the soft, slow, rhythmic songs according to the rhythm, tune, speed, strength, and the like of the music, and retain the rhythm. Strong and dynamic songs, and the selected songs are transmitted to the data calculation unit on the one hand, and to the word recognition unit on the other hand; if there is no song suitable as the alarm ringtone after screening, the current state remains unchanged. change;
  • the word recognition module 606 is configured to identify a time point for determining each complete sentence according to the nature and parameters of the song, and retain the data according to the song name for reference by the data calculation module;
  • the determining module 604 is configured to first determine whether the received time parameter and the song parameter are consistent with the last received parameter. If they are consistent, the current state is maintained without change; if one of the two parameters is inconsistent, the data calculating unit is needed. Recalculate processing.
  • the data calculation module 605 is configured to obtain the filtered song data, arrange the numbers in a certain order, calculate the length of time of all the songs, and then perform segment cutting with the alarm duration parameter as a unit, and the audio segments are The starting point parameters are stored. If the user sets the alarm duration to "always", then no song cuts are required, and all songs are played as a whole. If the last clip song is less than one unit long after the cut is completed, it is filled with the default alarm ringtone. And passing the cut segment parameters to the adaptive word supplementing unit;
  • the adaptive phrase supplementation module 607 is configured to automatically supplement the imperfection of the phrase due to segmentation.
  • the judgment of the cut point of the audio segment needs to be compared with the time point of the complete word that has been identified in the word recognition unit. It is necessary to preferentially pass the characteristic factors of the song, such as the song name, type, and the like, to obtain the corresponding saved data in the word recognition unit, and compare and compare the data according to the comparison; and determine whether the audio segment is complete according to the comparison result;
  • the data storage module 608 is configured to store the received song parameters and parameters of the audio frequency band after the cutting and adaptive phrase supplementation. These parameters mainly include but are not limited to the following parts, such as clip number, song number, time point, song name, song length, category, and so on.
  • the playing module 609 is configured to be triggered after the alarm ringing command occurs, and will be played in the order of the audio segments.
  • the counter is incremented by one
  • the second audio segment is played after the delay
  • the second audio segment is played
  • the counter 610 is incremented by one, and so on.
  • the Nth audio is played. Fragment.
  • the counter is cleared and restarted; if there is no data update after the last audio clip is played, the audio clip is looped and starts from the first one.
  • the device of the embodiment can adaptively adjust the playing of the alarm ringtone according to the change of the alarm duration, automatically filter the user's favorite song as the ringtone and supplement the completeness of the audio segment, realize the diversification of the alarm ringtone, and improve the user experience.
  • the acquiring module, the selecting module, the audio processing module, the storage module and the playing module in the ringtone playing device can all be implemented by a processor in the ringtone playing device;
  • the specific logic circuit is implemented; in the process of the specific embodiment, the processor may be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP), or a field programmable gate array (FPGA).
  • CPU central processing unit
  • MPU microprocessor
  • DSP digital signal processor
  • FPGA field programmable gate array
  • the ringtone playing method described above is implemented in the form of a software function module and sold or used as a standalone product, it may also be stored in a computer readable storage medium.
  • the technical solution of the embodiments of the present invention may be embodied in the form of a software product in essence or in the form of a software product stored in a storage medium, including a plurality of instructions.
  • a computer device (which may be a personal computer, server, or network device, etc.) is caused to perform all or part of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read only memory (ROM, a read only memory), a magnetic disk, or an optical disk, and the like.
  • the medium in which the program code is stored includes: a U disk, a mobile hard disk, a read only memory (ROM, a read only memory), a magnetic disk, or an optical disk, and the like.
  • the medium in which the program code is stored includes: a U disk, a mobile hard disk, a read only memory (ROM, a read only memory), a magnetic disk, or an optical disk, and the like.
  • the embodiment of the present invention further provides a computer storage medium, where the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the ringtone playing method in the embodiment of the present invention.
  • the ring duration is obtained; at least one audio file is selected from the audio file stored by the terminal, and the selected audio file is cut according to the duration of the ring to obtain a plurality of audio segments, and the audio is stored. a segment; after the ringing is triggered, the corresponding audio segment is called from the storage for playing; thus, the ringtone playing method of the present invention can select an audio file required by the user from the terminal storage, and then cut the selected audio file into A plurality of audio segments, the audio segment is used as a ringtone of the terminal, and the terminal of the method of the present invention can implement personalized or diverse ringtone setting and playing, thereby improving the user experience.

Abstract

Disclosed are a ringtone playing method and apparatus, a terminal and a storage medium. The method comprises: acquiring a time duration of a ringtone; selecting at least one audio file from audio files stored in a terminal, cutting the selected audio file according to the time duration of the ringtone to obtain a plurality of audio segments, and storing the audio segments; and after triggering the ringtone, calling the stored corresponding audio segment for playing.

Description

一种铃声播放方法和装置、终端、存储介质Ringtone playing method and device, terminal, storage medium 技术领域Technical field
本发明涉及终端技术领域,尤其涉及一种铃声播放方法和装置、终端、存储介质。The present invention relates to the field of terminal technologies, and in particular, to a ringtone playing method and apparatus, a terminal, and a storage medium.
背景技术Background technique
随着智能终端的飞速发展,智能终端上的闹钟功能也几乎成为标配的功能,成为人们日常生活中不可缺少的一部分。虽然目前闹钟的功能已十分强大,可随意设置为各种模式,但是却缺少个性化的闹钟铃声的设置,每次只能设置一种闹铃歌曲,且每次响起都是从头播放一样的歌曲,会比较枯燥乏味,用户体验比较不好。With the rapid development of intelligent terminals, the alarm clock function on smart terminals has become a standard function, becoming an indispensable part of people's daily life. Although the function of the alarm clock is very powerful, you can set it to various modes at will, but it lacks the setting of personalized alarm ringtone. You can only set one type of alarm song at a time, and each time you play it, you can play the same song from the beginning. It will be boring and the user experience is not good.
另外,目前终端的来电铃声也缺少个性化的设置,每次只能设置一种来电铃声歌曲,且每次响起都是从头播放一样的歌曲,同样会比较枯燥乏味,用户体验不好。In addition, the current call ringtone of the terminal also lacks personalized settings, and only one type of ringtone song can be set at a time, and each time it is played, the same song is played from the beginning, which is also relatively boring and the user experience is not good.
由此可见,由于目前终端不能实现个性化的铃声设置和播放,会导致用户体验差。It can be seen that the current user cannot experience personalized ringtone setting and playing, which may result in poor user experience.
发明内容Summary of the invention
本发明要解决的主要技术问题是,提供一种铃声播放方法和装置、终端、存储介质,能够解决由于目前终端不能实现个性化的铃声设置和播放导致用户体验差的技术问题。The main technical problem to be solved by the present invention is to provide a ringtone playing method and device, a terminal, and a storage medium, which can solve the technical problem that the user experience is poor due to the fact that the terminal cannot implement personalized ringtone setting and playing.
本发明实施例的技术方案如下:The technical solution of the embodiment of the present invention is as follows:
第二当面,本发明实施例提供一种铃声播放方法,包括如下步骤:In a second aspect, the embodiment of the present invention provides a ringtone playing method, including the following steps:
获取响铃持续时长; Get the duration of the ring;
从终端存储的音频文件中选取至少一个音频文件;根据所述响铃持续时长对选取的音频文件进行切割得到多个音频片段,存储所述音频片段;Selecting at least one audio file from the audio file stored in the terminal; cutting the selected audio file according to the duration of the ringing to obtain a plurality of audio segments, and storing the audio segment;
在触发响铃后,从存储中调用对应的所述音频片段进行播放。After the ringing is triggered, the corresponding audio segment is called from the storage for playing.
在本发明的一种实施例中,所述根据所述响铃持续时长对选取的音频文件进行切割得到多个音频片段的步骤包括:In an embodiment of the present invention, the step of cutting the selected audio file according to the duration of the ring to obtain a plurality of audio segments comprises:
根据所有选取的音频文件生成一个总音频文件;Generate a total audio file based on all selected audio files;
根据所述响铃持续时长对所述总音频文件进行切割得到多个时长与所述响铃持续时长相等的音频片段。The total audio file is cut according to the duration of the ringing to obtain an audio segment having a duration equal to the duration of the ringing.
在本发明的一种实施例中,所述根据所有选取的音频文件生成一个总音频文件的步骤包括:In an embodiment of the invention, the step of generating a total audio file according to all selected audio files comprises:
对所有选取的音频文件进行排列得到一个总音频文件,所述总音频文件的时长为所有选取的音频文件时长之和。All selected audio files are arranged to obtain a total audio file, and the duration of the total audio file is the sum of the durations of all selected audio files.
在本发明的一种实施例中,所述根据所述响铃持续时长对所述总音频文件进行切割得到多个时长与所述响铃持续时长相等的音频片段的步骤包括:In an embodiment of the present invention, the step of cutting the total audio file according to the duration of the ring to obtain an audio segment having a duration equal to the duration of the ring duration includes:
当所述总音频文件的时长为所述响铃持续时长的整数倍时,以所述响铃持续时长为一个片段的时长对所述总音频文件进行片段切割得到多个音频片段。When the duration of the total audio file is an integer multiple of the duration of the ring duration, the total audio file is segment cut by the duration of the ring duration as a segment to obtain a plurality of audio segments.
在本发明的一种实施例中,所述根据所述响铃持续时长对所述总音频文件进行切割得到多个时长与所述响铃持续时长相等的音频片段的步骤还包括:In an embodiment of the present invention, the step of cutting the total audio file according to the duration of the ring to obtain an audio segment having a plurality of durations equal to the duration of the ring duration further includes:
当所述总音频文件的时长不为所述响铃持续时长的整数倍时,以所述响铃持续时长为一个片段的时长对所述总音频文件进行片段切割得到多个音频片段;When the duration of the total audio file is not an integer multiple of the duration of the ring duration, segmenting the total audio file by using the duration of the ring duration as a segment to obtain a plurality of audio segments;
对于时长小于所述响铃持续时长的音频片段,将预设的音频文件填充 至该音频片段中使得该音频片段的时长等于所述响铃持续时长。For an audio clip whose duration is less than the duration of the ring duration, the preset audio file is filled The duration of the audio segment is made equal to the duration of the ringing to the audio segment.
在本发明的一种实施例中,在所述根据所述响铃持续时长对选取的音频文件进行切割得到多个音频片段之前,所述方法还包括:In an embodiment of the present invention, before the cutting the selected audio file according to the duration of the ring to obtain a plurality of audio segments, the method further includes:
对选取的音频文件进行识别获取选取的音频文件的完整词句的音频时间点;Identifying the selected audio file to obtain an audio time point of the complete sentence of the selected audio file;
在所述根据所述响铃持续时长对选取的音频文件进行切割得到多个音频片段之后,触发响铃之前,所述方法还包括:After the ringing of the selected audio file according to the duration of the ringing to obtain a plurality of audio segments, before the ringing is triggered, the method further includes:
根据所述完整词句的音频时间点和所述音频片段的时间点判断所述音频片段的词句是否完整,所述音频片段的时间点包括音频片段的起始和/或结束时间点;Determining whether the words of the audio segment are complete according to an audio time point of the complete phrase and a time point of the audio segment, the time point of the audio segment including a start and/or an ending time point of the audio segment;
若否,则将所述音频片段缺失的词句对应的音频补充至所述音频片段使得所述音频片段的词句完整。If not, the audio corresponding to the missing phrase of the audio segment is added to the audio segment such that the phrase of the audio segment is complete.
在本发明的一种实施例中,所述从存储中调用对应的所述音频片段进行播放的步骤包括:In an embodiment of the present invention, the step of calling the corresponding audio segment from the storage for playing includes:
根据响铃次数从存储中调用对应的所述音频片段进行播放。The corresponding audio segment is called from the storage for playback according to the number of rings.
第二方面,本发明实施例还提供了一种铃声播放装置,包括:获取模块、选取模块、音频处理模块、存储模块和播放模块;In a second aspect, the embodiment of the present invention further provides a ringtone playing device, including: an acquiring module, a selecting module, an audio processing module, a storage module, and a playing module;
所述获取模块,配置为获取用户设置的响铃持续时长;The obtaining module is configured to obtain a duration of a ring set by a user;
所述选取模块,配置为从终端存储的音频文件中选取至少一个音频文件;The selecting module is configured to select at least one audio file from the audio file stored by the terminal;
所述音频处理模块,配置为根据所述响铃持续时长对选取的音频文件进行切割得到多个音频片段;The audio processing module is configured to cut a selected audio file according to the duration of the ring to obtain a plurality of audio segments;
所述存储模块,配置为存储所述音频片段;The storage module is configured to store the audio segment;
所述播放模块,配置为在触发响铃后,从所述存储模块中调用对应的所述音频片段进行播放。 The playing module is configured to, after the ringing is triggered, invoke the corresponding audio segment from the storage module for playing.
在本发明的一种实施例中,所述音频处理模块,配置为:In an embodiment of the invention, the audio processing module is configured to:
根据所有选取的音频文件生成一个总音频文件;Generate a total audio file based on all selected audio files;
根据所述响铃持续时长对所述总音频文件进行切割得到多个时长与所述响铃持续时长相等的音频片段。The total audio file is cut according to the duration of the ringing to obtain an audio segment having a duration equal to the duration of the ringing.
在本发明的一种实施例中,所述音频处理模块,配置为对所有选取的音频文件进行排列得到一个总音频文件,所述总音频文件的时长为所有选取的音频文件时长之和。In an embodiment of the present invention, the audio processing module is configured to arrange all the selected audio files to obtain a total audio file, and the duration of the total audio file is the sum of the durations of all the selected audio files.
在本发明的一种实施例中,所述音频处理模块,配置为:In an embodiment of the invention, the audio processing module is configured to:
当所述总音频文件的时长为所述响铃持续时长的整数倍时,以所述响铃持续时长为一个片段的时长对所述总音频文件进行片段切割得到多个音频片段;When the duration of the total audio file is an integer multiple of the duration of the ringing, segmenting the total audio file by using the duration of the ringing duration as a segment to obtain a plurality of audio segments;
当所述总音频文件的时长不为所述响铃持续时长的整数倍时,以所述响铃持续时长为一个片段的时长对所述总音频文件进行片段切割得到多个音频片段;When the duration of the total audio file is not an integer multiple of the duration of the ring duration, segmenting the total audio file by using the duration of the ring duration as a segment to obtain a plurality of audio segments;
对于时长小于所述响铃持续时长的音频片段,将预设的音频文件填充至该音频片段中使得该音频片段的时长等于所述响铃持续时长。For an audio segment whose duration is less than the duration of the ringing, a preset audio file is filled into the audio segment such that the duration of the audio segment is equal to the duration of the ringing.
在本发明的一种实施例中,所述装置还包括:词句识别模块、判断模块和词句补充模块:In an embodiment of the present invention, the apparatus further includes: a phrase recognition module, a judgment module, and a phrase supplementation module:
所述词句识别模块,配置为在所述选取模块选取音频文件之后,所述存储模块存储音频片段之前,对选取的音频文件进行识别获取音频文件的完整词句的音频时间点;The word recognition module is configured to: after the selection module selects an audio file, before the storage module stores the audio segment, the selected audio file is identified to obtain an audio time point of the complete word of the audio file;
所述判断模块,配置为在所述存储模块存储音频片段之前,所述音频处理模块进行切割得到多个音频片段之后,根据所述完整词句的音频时间点和所述音频片段的时间点判断所述音频片段的词句是否完整,所述音频片段的时间点包括音频片段的起始和/或结束时间点; The determining module is configured to: after the audio processing module performs cutting to obtain a plurality of audio segments, the audio processing module determines, according to the audio time point of the complete phrase and the time point of the audio segment, before the storage module stores the audio segment Whether the words of the audio segment are complete, and the time point of the audio segment includes the start and/or end time points of the audio segment;
所述词句补充模块,配置为当所述判断模块为否的情况下,所述音频片段缺失的词句对应的音频补充至所述音频片段使得所述音频片段的词句完整。The phrase supplementing module is configured to, when the determining module is negative, the audio corresponding to the missing phrase of the audio segment is added to the audio segment such that the phrase of the audio segment is complete.
在本发明的一种实施例中,所述播放模块,配置为根据响铃次数从存储中调用对应的所述音频片段进行播放。In an embodiment of the present invention, the playing module is configured to call the corresponding audio segment from the storage for playing according to the number of rings.
第三方面,本发明实施例还提供了一种终端,包括:处理器和存储器,所述处理器配置为:In a third aspect, an embodiment of the present invention further provides a terminal, including: a processor and a memory, where the processor is configured to:
获取响铃持续时长;Get the duration of the ring;
从终端存储的音频文件中选取至少一个满足预设音频条件的音频文件;根据所述响铃持续时长对选取的音频文件进行切割得到多个音频片段,将所述音频片段存储至所述存储器;Selecting at least one audio file that satisfies a preset audio condition from the audio file stored in the terminal; cutting the selected audio file according to the duration of the ringing to obtain a plurality of audio segments, and storing the audio segment into the memory;
在触发响铃后,从所述存储器中调用对应的所述音频片段进行播放。After the ringing is triggered, the corresponding audio segment is called from the memory for playing.
第四方面,本发明实施例提供一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,该计算机可执行指令用于执行本发明第一方面实施例提供的铃声播放方法。In a fourth aspect, an embodiment of the present invention provides a computer storage medium, where the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the ringtone playing method provided by the first aspect of the present invention.
本发明实施例的有益效果是:The beneficial effects of the embodiments of the present invention are:
本发明实施例提供了一种铃声播放方法和装置、终端、存储介质,其中:获取响铃持续时长;从终端存储的音频文件中选取至少一个音频文件,并根据所述响铃持续时长对选取的音频文件进行切割得到多个音频片段,存储所述音频片段;在触发响铃后,从存储中调用对应的所述音频片段进行播放;本发明的铃声播放方法可以从终端存储中选取用户所需的音频文件,然后将选取的音频文件切割成多个音频片段,将音频片段作为终端的铃声(来电铃声或者闹钟铃声),应用本发明的方法终端可以实现个性化或者多样化的铃声设置和播放,提升了用户体验。 The embodiment of the present invention provides a ringtone playing method and device, a terminal, and a storage medium, wherein: obtaining a ring duration; selecting at least one audio file from the audio files stored by the terminal, and selecting according to the duration of the ringing The audio file is cut to obtain a plurality of audio segments, and the audio segment is stored; after the ringing is triggered, the corresponding audio segment is called from the storage for playing; the ringtone playing method of the present invention can select the user from the terminal storage. The desired audio file, and then the selected audio file is cut into a plurality of audio segments, and the audio segment is used as a ringtone of the terminal (calling ringtone or alarm ringtone), and the method of the present invention can be used to implement personalized or diverse ringtone settings and Play, enhance the user experience.
附图说明DRAWINGS
图1为本发明实施例一提供的一种铃声播放方法的流程示意图;1 is a schematic flowchart of a ringtone playing method according to Embodiment 1 of the present invention;
图2为本发明实施例一提供的一种闹钟铃声播放过程的流程示意图;2 is a schematic flowchart of a ringtone playing process of an alarm clock according to Embodiment 1 of the present invention;
图3为本发明实施例二提供的一种铃声播放装置的结构示意图;3 is a schematic structural diagram of a ringtone playing device according to Embodiment 2 of the present invention;
图4为本发明实施例二提供的另一种铃声播放装置的结构示意图;4 is a schematic structural diagram of another ringtone playing device according to Embodiment 2 of the present invention;
图5为本发明实施例三提供的一种终端的结构示意图;FIG. 5 is a schematic structural diagram of a terminal according to Embodiment 3 of the present invention; FIG.
图6为本发明实施例四提供的一种闹钟铃声播放装置的结构示意图。FIG. 6 is a schematic structural diagram of an alarm clock ringing device according to Embodiment 4 of the present invention.
具体实施方式detailed description
下面通过具体实施方式结合附图对本发明作进一步详细说明。The present invention will be further described in detail below with reference to the accompanying drawings.
实施例一:Embodiment 1:
目前终端不能实现个性化的铃声设置和播放导致用户体验差的技术问题,本实施例提供了一种铃声播放方法,可用于播放来电铃声或者闹钟铃声,如图1所示,包括如下步骤:The present invention provides a method for playing a ringtone, which can be used to play an incoming call ringtone or an alarm ringtone. As shown in FIG. 1, the following steps are included:
步骤101:获取响铃持续时长。Step 101: Obtain a ring duration.
具体,本步骤可以获取用户在终端上设置的响铃持续时长,例如在播放闹钟铃声时,可以获取用户在终端上设置或者终端默认的闹钟响铃持续时长,应用本实施例方法播放来电铃声时,可以从网络侧获取来电响铃持续时长,或者之前对来电铃声进行测量来获取来电响铃持续时长,例如可以测量出一个来电响铃持续的平均时长。Specifically, in this step, the duration of the ringing time set by the user on the terminal can be obtained. For example, when the alarm ringtone is played, the duration of the alarm that is set by the user on the terminal or the default of the terminal can be obtained. You can get the duration of the incoming call ringing from the network side, or you can measure the incoming call ringtone to get the duration of the incoming call ring. For example, you can measure the average duration of an incoming call ring.
本实施例中响铃持续时长指的是:连续播放铃声的时长;在设置闹钟或者来电事件被触发后多次响铃的情况下,本实施例中响铃持续时长为单次响铃持续时长,例如设置闹钟被触发后需要进行五次响铃,响铃的间隔时长为1分钟,此时,响铃持续时长为每次响铃持续时长(例如为1分钟)。In this embodiment, the duration of the ringing duration refers to: the duration of the continuous playing of the ringtone; in the case where the alarm is set or the incoming call event is triggered multiple times, the duration of the ringing in this embodiment is the duration of the single ringing. For example, if the alarm is triggered, it needs to be ringed five times. The interval of the ringing is 1 minute. At this time, the duration of the ringing is the duration of each ringing (for example, 1 minute).
步骤102:从终端存储的音频文件中选取至少一个音频文件,并根据所述响铃持续时长对选取的音频文件进行切割得到多个音频片段,存储所述 音频片段。Step 102: Select at least one audio file from the audio file stored by the terminal, and cut the selected audio file according to the duration of the ring to obtain a plurality of audio segments, and store the audio file. Audio clip.
具体地,本实施例中音频文件可以为终端存储的歌曲,本实施例步骤可以根据预设音频选取规则从终端存储的且标记为喜爱的歌曲中选取至少一个歌曲。本实施例中预设音频选取规则可以包括:选取节奏感强的音频文件,或者选取预定曲风的音频文件等。Specifically, in this embodiment, the audio file may be a song stored by the terminal. In this embodiment, at least one song may be selected from the songs stored by the terminal and marked as favorites according to a preset audio selection rule. The preset audio selection rule in this embodiment may include: selecting an audio file with strong rhythm feeling, or selecting an audio file of a predetermined genre.
例如,将用户音乐库中标记为喜爱的歌曲列表中的歌曲进行音频过滤,滤掉柔和、低缓、节奏感慢、不适合作为闹钟的歌曲,选取节奏感强、适合作为铃声(闹钟或来电的铃声);又例如,选取说唱类的音频文件。本实施例中预设音频选取规则可以根据用户的实际需求进行设定,以选择用户所需的音频文件作为闹铃或者来电铃声。For example, audio filtering of songs in the user's music library marked as favorite song list, filtering out soft, slow, slow-paced, unsuitable songs as an alarm clock, select a strong sense of rhythm, suitable as a ringtone (alarm or call) Ringtones); for example, select an audio file for the rap class. In this embodiment, the preset audio selection rule may be set according to the actual needs of the user, so as to select an audio file required by the user as an alarm or an incoming call ringtone.
本步骤中根据所述响铃持续时长对选取的音频文件进行切割得到多个音频片段的过程可以包括:The process of cutting the selected audio file according to the duration of the ringing to obtain a plurality of audio segments in this step may include:
根据所有选取的音频文件生成一个总音频文件;Generate a total audio file based on all selected audio files;
根据所述响铃持续时长对所述总音频文件进行切割得到多个时长与所述响铃持续时长相等的音频片段。The total audio file is cut according to the duration of the ringing to obtain an audio segment having a duration equal to the duration of the ringing.
在本实施例中选取音频文件之后,可以将所有选取的音频文件进行组合生成一个总音频文件,具体地,可以对所有选取的音频文件进行排列得到一个总音频文件,所述总音频文件的时长为所有选取的音频文件时长之和。例如将所有音频文件依次排列将前一个音频文件的结束时间点作为后一个音频文件的起始时间点,这样就将所有音频文件在时间上连接起来组成一个总音频文件。After the audio file is selected in this embodiment, all the selected audio files may be combined to generate a total audio file. Specifically, all the selected audio files may be arranged to obtain a total audio file, and the total audio file duration. The sum of the durations of all selected audio files. For example, all the audio files are arranged in order, and the end time point of the previous audio file is used as the starting time point of the next audio file, so that all the audio files are temporally connected to form a total audio file.
当然,本实施例还可以有其他方式来生成总音频文件,例如选取每个音频文件中节奏感最强的音频部分,然后将选取的音频部分组成一个音频文件。Of course, this embodiment may also have other ways to generate a total audio file, such as selecting the audio portion with the strongest rhythm in each audio file, and then composing the selected audio portion into an audio file.
具体地,本实施例方法中根据所述响铃持续时长对所述总音频文件进 行切割得到多个时长与所述响铃持续时长相等的音频片段的具体过程可以包括:Specifically, in the method of this embodiment, the total audio file is input according to the duration of the ringing duration. The specific process of cutting a plurality of audio segments having a duration equal to the duration of the ring duration may include:
当所述总音频文件的时长为所述响铃持续时长的整数倍时,以所述响铃持续时长为一个片段的时长对所述总音频文件进行片段切割得到多个音频片段;When the duration of the total audio file is an integer multiple of the duration of the ringing, segmenting the total audio file by using the duration of the ringing duration as a segment to obtain a plurality of audio segments;
当所述总音频文件的时长不为所述响铃持续时长的整数倍时,以所述响铃持续时长为一个片段的时长对所述总音频文件进行片段切割得到多个音频片段;When the duration of the total audio file is not an integer multiple of the duration of the ring duration, segmenting the total audio file by using the duration of the ring duration as a segment to obtain a plurality of audio segments;
对于时长小于所述响铃持续时长的音频片段,将预设的音频文件填充至该音频片段中使得该音频片段的时长等于所述响铃持续时长。For an audio segment whose duration is less than the duration of the ringing, a preset audio file is filled into the audio segment such that the duration of the audio segment is equal to the duration of the ringing.
例如,有三首用户标记为喜爱的歌曲A、B、C、D,筛选后A,B,C符合作为闹钟的条件,A的时长为02:40,B的时长为03:00,C的时长为03:10,用户设置的闹钟持续时间为1分钟,那么数据计算处理后,时长共计08:50,生成9个片段,最后一个片段填充10秒的默认铃声。For example, there are three songs marked as favorite songs A, B, C, and D. After screening, A, B, and C meet the conditions as an alarm clock. The duration of A is 02:40, the duration of B is 03:00, and the duration of C is For 03:10, the user set the alarm duration to 1 minute, then after the data calculation process, the total length is 08:50, generating 9 clips, and the last clip is filled with the default ringtone of 10 seconds.
步骤103:在触发响铃后,从存储中调用对应的所述音频片段进行播放。Step 103: After the ringing is triggered, the corresponding audio segment is called from the storage for playing.
具体地,在当前时间到达闹钟设置的时间时,触发闹钟响铃,或者终端接收到呼叫时,触发终端来电响铃。Specifically, when the current time reaches the time set by the alarm, the alarm is triggered to ring, or when the terminal receives the call, the terminal is triggered to ring.
在一次事件多次响铃的情况下,本步骤中从存储中调用对应的所述音频片段进行播放的过程包括:根据响铃次数从存储中调用对应的所述音频片段进行播放。进一步地,本实施例方法可以根据响铃次数从存储中调用不同的音频片段进行播放。In the case that an event is ringed multiple times, the process of calling the corresponding audio segment from the storage for playing in this step includes: calling the corresponding audio segment from the storage for playing according to the number of rings. Further, the method of this embodiment can call different audio segments from the storage for playing according to the number of rings.
例如,当触发闹钟响铃后,闹钟第一次响起时,播放第一音频片段,延迟后再次响起,播放第二音频片段,依次类推,当闹钟第N次响起时,播放第N个音频片段。同理,当触发来电响铃后也是一样,每次响铃调用不同的音频片段进行播放。 For example, when the alarm is triggered, the first audio segment is played when the alarm sounds for the first time, the second audio segment is played after the delay, the second audio segment is played, and so on. When the alarm sounds for the Nth time, the Nth audio segment is played. . In the same way, the same is true when the incoming call is ringing, and each ringing calls a different audio segment to play.
本实施例方法可以从终端可以从终端存储中选取用户所需的音频文件,然后将选取的音频文件切割成多个音频片段,将音频片段作为终端的铃声(来电铃声或者闹钟铃声),丰富了终端的铃声,实现了铃声个性化与多样化的设备和播放,提升了用户体验。In this embodiment, the terminal can select the audio file required by the user from the terminal storage, and then cut the selected audio file into multiple audio segments, and use the audio segment as the ringtone of the terminal (caller ringtone or alarm ringtone), enriching The ringtone of the terminal realizes the personalized and diverse device and playback of the ringtone, which enhances the user experience.
考虑到对音频文件切割会造成音频片段的词句不完整,在播放音频片段时用户听到的不是完整的词句,用户体验会差一点,因此,为了进一步提高用户体验,本实施例方法还可以对词句不完整的音频片段进行补充使其完整。具体地,本实施例方法在在所述根据所述响铃持续时长对选取的音频文件进行切割得到多个音频片段之前还包括:对选取的音频文件进行识别获取选取的音频文件中完整词句的时间点;Considering that the audio file is cut, the words of the audio segment are incomplete. When the audio clip is played, the user does not hear the complete phrase, and the user experience is a little worse. Therefore, in order to further improve the user experience, the method in this embodiment can also The incomplete audio clips are complemented to make them complete. Specifically, before the method of cutting the selected audio file according to the duration of the ringing to obtain a plurality of audio segments, the method further includes: identifying the selected audio file, and acquiring the complete word in the selected audio file. Time point
在所述根据所述响铃持续时长对选取的音频文件进行切割得到多个音频片段之后,触发响铃之前,本实施例方法还包括:After the ringing of the selected audio file to obtain a plurality of audio segments according to the duration of the ringing, before the ringing is triggered, the method in this embodiment further includes:
根据所述完整词句的时间点和所述音频片段的时间点判断所述音频片段的词句是否完整,所述音频片段的时间点包括音频片段的起始和/或结束时间点;Determining whether the words of the audio segment are complete according to a time point of the complete phrase and a time point of the audio segment, the time point of the audio segment including a start and/or an ending time point of the audio segment;
若否,则将所述音频片段缺失的词句对应的音频补充至所述音频片段使得所述音频片段的词句完整。If not, the audio corresponding to the missing phrase of the audio segment is added to the audio segment such that the phrase of the audio segment is complete.
例如,可以在切割音频片段之后,存储音频片段之前,判断词句是否完整,以及补充音频片段的词句;又或者,在存储音频片段之后,在判断词句是否完整,以及补充音频片段的词句。For example, after cutting the audio segment, before the audio segment is stored, it is judged whether the phrase is complete, and the phrase of the audio segment is supplemented; or, after the audio segment is stored, it is judged whether the phrase is complete, and the phrase of the audio segment is supplemented.
本实施例中音频片段的时间点为:总音频文件的切割点时间。The time point of the audio clip in this embodiment is: the cut point time of the total audio file.
本实施例方法可以自动补充因片段切割而造成的词句不完整性。首先获取选取的音频文件的完整词句的时间点(包括起始时间点和/或结束时间点);然后将各个音频片段的起始时间点和结束时间点与对应的完成词句的时间点进行比较,根据比较结果判断音频片段是否完整;例如音频片段结 束点在一句歌词中间,即该结束点时间小于本句完整的结束时间点,导致本句歌词未播放完,则自动延长铃声播放,直至本句播放完毕,自动更新片段结束点时间为该句结束的时间点;对于音频片段起始点,若该点在一句歌词中间,即该时间点大于本句完整的起始点,导致本句未从完整句子播放,也就是说是从半句话开始播放,则向前自适应补充完整该句子,已达到完整句子的播放,并自动更新片段起始点为该句起始的时间点。The method of the embodiment can automatically supplement the imperfection of the words caused by the segment cutting. First, the time point of the complete sentence of the selected audio file (including the starting time point and/or the ending time point); then comparing the starting time point and the ending time point of each audio segment with the corresponding time point of completing the word , according to the comparison result to determine whether the audio segment is complete; for example, audio segment knot The bundle point is in the middle of a lyric, that is, the end point time is less than the complete end time point of the sentence, so that the lyrics of the sentence are not played, the ringtone is automatically extended until the sentence is finished, and the end time of the segment is automatically updated. The time point of the end; for the beginning of the audio clip, if the point is in the middle of a lyric, that is, the time point is greater than the complete starting point of the sentence, the sentence is not played from the complete sentence, that is, it starts from a half sentence. , the forward adaptive complements the sentence, has reached the full sentence play, and automatically updates the start point of the clip to the point in time at which the sentence begins.
下面以播放闹钟铃声为例,来具体说明本实施例的方法,如图2所示,包括如下步骤:The method for playing the alarm ringtone is taken as an example to specifically describe the method in this embodiment. As shown in FIG. 2, the method includes the following steps:
步骤201:检测终端音乐库中标记为用户喜欢的歌曲和用户设置的闹钟响铃时长。Step 201: Detect a song marked as a user's favorite in the terminal music library and an alarm clock duration set by the user.
本实施例方法可以定时检测音乐库中被用户标记为喜欢的歌曲曲目和用户每次设置的闹钟铃声持续时长。The method of the embodiment can periodically detect the song track in the music library that is marked as favorite by the user and the duration of the alarm ringtone set by the user each time.
步骤202:从用户喜欢的歌曲中选取节奏感强的歌曲。Step 202: Select a song with strong rhythm from the songs that the user likes.
具体地,可以对检测到用户喜欢的歌曲进行过滤,过滤掉柔和、低缓、节奏感慢、不适合作为闹钟的歌曲,保留节奏感强、适合作为闹钟的歌曲。Specifically, it is possible to filter the songs that the user likes to be detected, and filter out songs that are soft, slow, slow-paced, unsuitable as an alarm clock, and retain a song that is strong in rhythm and suitable as an alarm clock.
步骤203:对选取的歌曲进行识别获取歌曲的完整词句的音频时间点。Step 203: Identify the audio time point of the complete sentence of the song by identifying the selected song.
具体地,识别出已过滤出歌曲的完整词句的时间点,并保存每一完整词句的音频时间点。具体地可以根据过滤出歌曲的参数识别出每一歌曲的完整词句的音频时间点。Specifically, the point in time at which the complete sentence of the song has been filtered is identified, and the audio time point of each complete sentence is saved. Specifically, the audio time point of the complete sentence of each song can be identified according to the parameters of the filtered song.
为了能够方便后续使用,本实施例还可以给完整词句的音频时间点进行标识,然后进行保存,以供后续判断完整性时通过标识调用对应的音频时间点,例如将完整词句所属的歌曲名称作为标识,。In order to facilitate subsequent use, the embodiment may also identify the audio time point of the complete sentence, and then save it, so as to call the corresponding audio time point by the identifier when the integrity is judged later, for example, the song name to which the complete word belongs is used as Logo,.
步骤204:对选取的歌曲进行排列生成一个闹钟歌曲,根据闹钟响铃时长对所述闹钟歌曲进行切割得到多个时长与所述闹钟响铃持续时长相等的音频片段。 Step 204: Arranging the selected songs to generate an alarm clock song, and cutting the alarm clock song according to the alarm bell ringing duration to obtain an audio segment having a duration equal to that of the alarm clock.
具体地,将选取的歌曲排列成一个歌曲作为闹钟歌曲,该闹钟歌曲的时长等于所有选取的歌曲的时长之和;然后以闹钟响铃持续时长为单元,将闹钟歌曲切割成多个音频片段。Specifically, the selected songs are arranged into one song as an alarm clock, and the duration of the alarm clock is equal to the sum of the durations of all the selected songs; then, the alarm clock is cut into a plurality of audio segments in units of the alarm ring duration.
当闹钟歌曲的时长为闹钟响铃持续时长的整数倍时,切割得到多个音频片段的时长均等于闹钟响铃持续时长;When the duration of the alarm clock is an integer multiple of the duration of the alarm, the duration of cutting the plurality of audio segments is equal to the duration of the alarm;
当闹钟歌曲的时长不为闹钟响铃持续时长的整数倍时,切割得到多个音频片段中会存在时长小于闹钟响铃持续时长的音频片段,例如最后切割的音频片段,对于该音频片段,需要填充音频文件使其时长等于闹钟响铃持续时长,例如填充终端默认的铃声值该音频片段。When the duration of the alarm clock song is not an integer multiple of the duration of the alarm, the audio segment that is longer than the duration of the alarm bell is present in the plurality of audio segments, such as the last cut audio segment, for which the audio segment needs to be Fill the audio file for a duration equal to the duration of the alarm, such as populating the terminal's default ringtone value for that audio clip.
例如有三首用户标记为喜爱的歌曲A、B、C、D,筛选后A,B,C符合作为闹钟的条件,A的时长为02:40,B的时长为03:00,C的时长为03:10,用户设置的闹钟持续时间为1分钟,那么数据计算处理后,时长共计08:50,生成9个片段,最后一个片段填充10秒的默认铃声。For example, there are three songs marked as favorite songs A, B, C, and D. After screening, A, B, and C meet the conditions as an alarm clock. The duration of A is 02:40, the duration of B is 03:00, and the duration of C is 03:10, the user set the alarm duration to 1 minute, then after the data calculation process, the total length is 08:50, generating 9 segments, and the last segment is filled with the default ringtone of 10 seconds.
步骤205:根据所述完整词句的音频时间点和所述音频片段的时间点判断所述音频片段的词句是否完整,若否,则执行步骤206,若是,则执行步骤207。Step 205: Determine whether the words of the audio segment are complete according to the audio time point of the complete phrase and the time point of the audio segment. If not, execute step 206, and if yes, perform step 207.
具体地,可以根据完成词句的音频时间点的标识(例如歌曲名称)获取对应的完整词句的音频时间点,然后与对应的音频片段进行比较,根据比较结果判断音频片段的词句是否完整。Specifically, the audio time point of the corresponding complete word can be obtained according to the identifier of the audio time point of the completed phrase (for example, the song name), and then compared with the corresponding audio segment, and the word segment of the audio segment is determined to be complete according to the comparison result.
步骤206:将所述音频片段缺失的词句对应的音频补充至所述音频片段使得所述音频片段的词句完整。Step 206: Add audio corresponding to the missing phrase of the audio segment to the audio segment such that the phrase of the audio segment is complete.
具体地,若音频片段的结束点在一句歌词中间,即该音频片段的结束时间点小于本句完整的音频结束时间点,导致本句歌词未播放完,则判定该音频片段的词句不完整,此时需要补充缺失词句对应的音频至该片段,使完整即播放完本局歌词。对于音频片段起始点,若该点在一句歌词中间, 即该音频片段的起始时间点大于本句完整的音频起始点,导致本句未从完整句子播放,则也就是说是从半句话开始播放,则判定该音频片段的词句不完整,此时需要向前自适应补充完整该句子。Specifically, if the end point of the audio segment is in the middle of a lyric, that is, the end time point of the audio segment is less than the complete audio end time point of the sentence, and the lyrics of the sentence are not played, the word segment of the audio segment is determined to be incomplete. At this point, it is necessary to supplement the audio corresponding to the missing words to the segment, so that the complete lyrics are played. For the beginning of the audio clip, if the point is in the middle of a lyric, That is, the starting time point of the audio segment is greater than the complete audio starting point of the sentence, so that the sentence is not played from the complete sentence, that is to say, starting from a half sentence, it is determined that the phrase of the audio segment is incomplete, The forward adaptation needs to be complemented by the complete sentence.
例如,对上述9个音频片段分别判断词句是否完整,若不完成则补充缺失词句对应的音频。经过词句补充后,音频片段分别为:For example, it is determined whether the words and phrases are complete for the above nine audio segments, and if not, the audio corresponding to the missing words is added. After the words are added, the audio clips are:
{(A,00:00,xxx,2:40,mp3)(A,01:00,xxx,2:40,mp3)},{(A,01:00,xxx,2:40,mp3)(A,02:10,xxx,2:40,mp3)},{(A,01:55,xxx,2:40,mp3),(B,00:20,xxx,3:00,mp3)}……A/B的参数代表获取经过操作处理后的歌曲的编码顺序,后面的时间代表音频片段的起始点或结束点,“xxx”代表歌曲名称,“2:40”代表歌曲总时长,“mp3”表示歌曲类型,每个片段有两组数据,第一个数据中的第二个时间因子代表片段起始时间,第二个数据中的第二个时间因子代表片段的结束时间。相邻的两个音频片段中,上一片段的结束点和下一片段的起始点可以是顺序排列(如第一个音频片段与第二个音频片段),也可以因为词句自动补充而存在有交叠部分(如第二个音频片段与第三个音频片段)。{(A, 00:00, xxx, 2:40, mp3) (A, 01:00, xxx, 2:40, mp3)}, {(A, 01:00, xxx, 2:40, mp3) ( A, 02:10, xxx, 2:40, mp3)}, {(A, 01:55, xxx, 2:40, mp3), (B, 00:20, xxx, 3:00, mp3)}... The parameter of ...A/B represents the encoding order of the song after the operation processing, the latter time represents the starting point or ending point of the audio segment, "xxx" represents the song name, "2:40" represents the total duration of the song, "mp3 "Represents the type of song. Each clip has two sets of data. The second time factor in the first data represents the start time of the clip, and the second time factor in the second data represents the end time of the clip. Among the two adjacent audio segments, the end point of the previous segment and the starting point of the next segment may be sequentially arranged (such as the first audio segment and the second audio segment), or may exist because the words are automatically added. Overlapping parts (such as the second audio clip and the third audio clip).
步骤207:对音频片段标记后进行存储。Step 207: The audio clip is marked and stored.
具体地,对每个音频片段编号,然后存储音频片段及其编号。Specifically, each audio segment is numbered, and then the audio segment and its number are stored.
步骤208:在触发闹钟响铃后,根据闹钟响铃的次数从存储中调用对应的音频片段进行播放。Step 208: After the alarm is triggered, the corresponding audio segment is called from the storage to play according to the number of times the alarm is ringed.
具体地,可以按照闹钟响铃的次数和音频片段的编号顺序调用对应的音频片段进行播放。Specifically, the corresponding audio segment can be called for playing according to the number of times the alarm is ringed and the number sequence of the audio segment.
例如,闹钟第一次响起时,播放第一音频片段,延迟后再次响起,播放第二音频片段,依次类推,当闹钟第N次响起时,播放第N个音频片段。For example, when the alarm sounds for the first time, the first audio segment is played, the second audio segment is played after the delay, the second audio segment is played, and so on. When the alarm sounds for the Nth time, the Nth audio segment is played.
上述介绍的是闹钟铃声播放的具体过程,然而对于来电铃声播放的过程与闹钟铃声播放的过程是类似的,可以参考上述内容。 The above describes the specific process of alarm ringtone playback. However, the process of ringtone playback is similar to the process of alarm ringtone playback. You can refer to the above.
在上述内容的基础上,本实施例方法还可以更新铃声,具体地,可以当响铃持续时长或者终端存储的音频文件变化时可以根据上述步骤来重新设置铃声。On the basis of the above content, the method in this embodiment can also update the ringtone. Specifically, the ringtone can be reset according to the above steps when the ring duration is long or the audio file stored by the terminal changes.
本实施例方法可以根据闹钟持续时间的变化自适应调整闹钟铃声的播放,自动筛选用户喜爱歌曲作为铃声并补充音频片段的词句完整,实现闹钟铃声的多样化,提升了用户体验。In this embodiment, the method can adaptively adjust the playing of the alarm ringtone according to the change of the duration of the alarm clock, automatically filter the user's favorite song as the ringtone and supplement the completeness of the audio segment, and realize the diversification of the alarm ringtone and improve the user experience.
应用本实施例方法能给用户带来多样化的闹钟铃声播放方式,友好度高,提升了用户使用体验。The method of the embodiment can provide a user with a variety of alarm clock ringing modes, which is highly friendly and enhances the user experience.
实施例二:Embodiment 2:
如图3所示,本实施例提供了一种铃声播放装置300包括:获取模块301、选取模块302、音频处理模块303、存储模块304和播放模块305,其中:As shown in FIG. 3, the present embodiment provides a ringtone playback apparatus 300, including: an acquisition module 301, a selection module 302, an audio processing module 303, a storage module 304, and a playback module 305, where:
所述获取模块301,配置为获取用户设置的响铃持续时长;The obtaining module 301 is configured to acquire a duration of a ring set by a user;
所述选取模块302,配置为从终端存储的音频文件中选取至少一个音频文件;The selecting module 302 is configured to select at least one audio file from the audio files stored by the terminal;
所述音频处理模块303,配置为根据所述响铃持续时长对选取的音频文件进行切割得到多个音频片段;The audio processing module 303 is configured to cut a selected audio file according to the duration of the ring to obtain a plurality of audio segments;
所述存储模块304,配置为存储所述音频片段;The storage module 304 is configured to store the audio segment;
所述播放模块305,配置为在触发响铃后,从所述存储模块中调用对应的所述音频片段进行播放。The playing module 305 is configured to: after the ringing is triggered, invoke the corresponding audio segment from the storage module for playing.
应用本实施例铃声播放装置可以实现铃声多样化或个性化的设置和播放,提升用户体验。The ringtone playing device of the embodiment can implement the setting and playing of the ringtone diversification or personalization, thereby improving the user experience.
本发明实施例中,所述音频处理模块303,配置为:In the embodiment of the present invention, the audio processing module 303 is configured to:
根据所有选取的音频文件生成一个总音频文件;Generate a total audio file based on all selected audio files;
根据所述响铃持续时长对所述总音频文件进行切割得到多个时长与所 述响铃持续时长相等的音频片段。Cutting the total audio file according to the duration of the ring to obtain a plurality of durations and locations An audio segment whose rings last for the same length.
本发明实施例中,所述音频处理模块303,配置为对所有选取的音频文件进行排列得到一个总音频文件,所述总音频文件的时长为所有选取的音频文件时长之和。In the embodiment of the present invention, the audio processing module 303 is configured to arrange all the selected audio files to obtain a total audio file, and the duration of the total audio file is the sum of the durations of all the selected audio files.
本发明实施例中,所述音频处理模块303,配置为:In the embodiment of the present invention, the audio processing module 303 is configured to:
当所述总音频文件的时长为所述响铃持续时长的整数倍时,以所述响铃持续时长为一个片段的时长对所述总音频文件进行片段切割得到多个音频片段;When the duration of the total audio file is an integer multiple of the duration of the ringing, segmenting the total audio file by using the duration of the ringing duration as a segment to obtain a plurality of audio segments;
当所述总音频文件的时长不为所述响铃持续时长的整数倍时,以所述响铃持续时长为一个片段的时长对所述总音频文件进行片段切割得到多个音频片段;When the duration of the total audio file is not an integer multiple of the duration of the ring duration, segmenting the total audio file by using the duration of the ring duration as a segment to obtain a plurality of audio segments;
对于时长小于所述响铃持续时长的音频片段,将预设的音频文件填充至该音频片段中使得该音频片段的时长等于所述响铃持续时长。For an audio segment whose duration is less than the duration of the ringing, a preset audio file is filled into the audio segment such that the duration of the audio segment is equal to the duration of the ringing.
如图4所示,在上述模块的基础上,本实施例装置还可以包括:词句识别模块308、判断模块306和词句补充模块307,其中;As shown in FIG. 4, on the basis of the foregoing modules, the apparatus of this embodiment may further include: a phrase recognition module 308, a determination module 306, and a phrase supplementation module 307, wherein;
所述词句识别模块308,配置为在所述选取模块选取音频文件之后,所述存储模块存储音频片段之前,对选取的音频文件进行识别获取音频文件的完整词句的音频时间点;The word recognition module 308 is configured to: after the selection module selects an audio file, the storage module identifies an audio time point of the complete word of the audio file before the audio module stores the audio segment;
所述判断模块306,配置为在所述存储模块存储音频片段之前,所述音频处理模块进行切割得到多个音频片段之后,根据所述完整词句的音频时间点和所述音频片段的时间点判断所述音频片段的词句是否完整,所述音频片段的时间点包括音频片段的起始和/或结束时间点;The determining module 306 is configured to: after the audio processing module performs cutting to obtain a plurality of audio segments, the audio processing module determines, according to the audio time point of the complete phrase and the time point of the audio segment, before the storage module stores the audio segment Whether the words of the audio segment are complete, and the time point of the audio segment includes a start and/or an end time point of the audio segment;
所述词句补充模块307,配置为当所述判断模块为否的情况下,所述音频片段缺失的词句对应的音频补充至所述音频片段使得所述音频片段的词句完整。 The phrase supplementing module 307 is configured to, when the determining module is negative, the audio corresponding to the missing phrase of the audio segment is added to the audio segment such that the phrase of the audio segment is complete.
本发明实施例中,所述播放模块305,配置为根据响铃次数从存储中调用对应的所述音频片段进行播放。In the embodiment of the present invention, the playing module 305 is configured to call the corresponding audio segment from the storage to play according to the number of rings.
本实施例装置可以根据闹钟持续时间的变化自适应调整闹钟铃声的播放,自动筛选用户喜爱歌曲作为铃声并补充音频片段的词句完整,实现闹钟铃声的多样化,提升了用户体验。In this embodiment, the device can adaptively adjust the playing of the alarm ringtone according to the change of the duration of the alarm clock, automatically filter the user's favorite song as the ringtone and supplement the completeness of the audio segment, realize the diversification of the alarm ringtone, and improve the user experience.
实施例三:Embodiment 3:
如图5所示,本实施例提供了一种终端500,包括:处理器501和存储器502;所述处理器501,配置为:As shown in FIG. 5, the embodiment provides a terminal 500, including: a processor 501 and a memory 502. The processor 501 is configured to:
获取响铃持续时长;Get the duration of the ring;
从终端存储的音频文件中选取至少一个音频文件;根据所述响铃持续时长对选取的音频文件进行切割得到多个音频片段,将所述音频片段存储至所述存储器;Selecting at least one audio file from the audio files stored in the terminal; cutting the selected audio file according to the duration of the ringing to obtain a plurality of audio segments, and storing the audio segments into the memory;
在触发响铃后,从所述存储器中调用对应的所述音频片段进行播放。After the ringing is triggered, the corresponding audio segment is called from the memory for playing.
本发明实施例中,所述根据所述响铃持续时长对选取的音频文件进行切割得到多个音频片段的步骤包括:In the embodiment of the present invention, the step of cutting the selected audio file according to the duration of the ring to obtain a plurality of audio segments comprises:
根据所有选取的音频文件生成一个总音频文件;Generate a total audio file based on all selected audio files;
根据所述响铃持续时长对所述总音频文件进行切割得到多个时长与所述响铃持续时长相等的音频片段。The total audio file is cut according to the duration of the ringing to obtain an audio segment having a duration equal to the duration of the ringing.
本发明实施例中,所述根据所有选取的音频文件生成一个总音频文件的步骤包括:In the embodiment of the present invention, the step of generating a total audio file according to all selected audio files includes:
对所有选取的音频文件进行排列得到一个总音频文件,所述总音频文件的时长为所有选取的音频文件时长之和。All selected audio files are arranged to obtain a total audio file, and the duration of the total audio file is the sum of the durations of all selected audio files.
本发明实施例中,所述根据所述响铃持续时长对所述总音频文件进行切割得到多个时长与所述响铃持续时长相等的音频片段的步骤包括:In the embodiment of the present invention, the step of cutting the total audio file according to the duration of the ring to obtain an audio segment having a duration equal to the duration of the ring duration includes:
当所述总音频文件的时长为所述响铃持续时长的整数倍时,以所述响 铃持续时长为一个片段的时长对所述总音频文件进行片段切割得到多个音频片段;When the duration of the total audio file is an integer multiple of the duration of the ringing, The duration of the ring is a duration of a segment, and the total audio file is segment-cut to obtain a plurality of audio segments;
当所述总音频文件的时长不为所述响铃持续时长的整数倍时,以所述响铃持续时长为一个片段的时长对所述总音频文件进行片段切割得到多个音频片段;When the duration of the total audio file is not an integer multiple of the duration of the ring duration, segmenting the total audio file by using the duration of the ring duration as a segment to obtain a plurality of audio segments;
对于时长小于所述响铃持续时长的音频片段,将预设的音频文件填充至该音频片段中使得该音频片段的时长等于所述响铃持续时长。For an audio segment whose duration is less than the duration of the ringing, a preset audio file is filled into the audio segment such that the duration of the audio segment is equal to the duration of the ringing.
本发明实施例中,所述处理器,还配置为:在所述根据所述响铃持续时长对选取的音频文件进行切割得到多个音频片段之前,对选取的音频文件进行识别获取选取的音频文件的完整词句的音频时间点;在所述根据所述响铃持续时长对选取的音频文件进行切割得到多个音频片段之后,触发响铃之前,根据所述完整词句的音频时间点和所述音频片段的时间点判断所述音频片段的词句是否完整,所述音频片段的时间点包括音频片段的起始和/或结束时间点,若否,则将所述音频片段缺失的词句对应的音频补充至所述音频片段使得所述音频片段的词句完整。In the embodiment of the present invention, the processor is further configured to: after the selected audio file is cut according to the duration of the ring to obtain a plurality of audio segments, identify the selected audio file to obtain the selected audio. An audio time point of the complete sentence of the file; after the ringing of the selected audio file according to the duration of the ring to obtain a plurality of audio segments, before the ringing is triggered, according to the audio time point of the complete phrase and the Determining whether the words of the audio segment are complete at a time point of the audio segment, the time point of the audio segment includes a start and/or an end time point of the audio segment, and if not, the audio corresponding to the word segment missing from the audio segment Supplementing to the audio segment completes the phrase of the audio segment.
实施例四:Embodiment 4:
如图6所示,本实施例提供了一种闹钟铃声播放装置,包括:第一检测模块601、第二检测模块602、音频过滤模块603、词句识别模块606、判断模块604、数据计算模块605、自适应词句补充模块607、数据存储模块608、播放模块609和计数器610,其中;As shown in FIG. 6, the embodiment provides an alarm clock ringing device, including: a first detecting module 601, a second detecting module 602, an audio filtering module 603, a word recognition module 606, a determining module 604, and a data calculating module 605. , an adaptive sentence supplementing module 607, a data storage module 608, a playing module 609, and a counter 610, wherein
第一检测模块601,配置为对闹钟模块的闹钟持续时间进行检测,当该持续时间设置参数有变化时,便获取该参数传递到下一单元模块;若该参数没有变化则不需传递数据至下一个模块;The first detecting module 601 is configured to detect an alarm duration of the alarm module, and when the duration setting parameter changes, the parameter is obtained and transmitted to the next unit module; if the parameter does not change, the data is not transmitted to Next module;
第二检测模块602,配置为对音乐库中用户标记的喜爱歌曲进行检测;该检测方法为定时检测,系统默认为一周,用户可以自行调整时间。当检 测到喜爱歌曲列表为空时,则采用默认闹铃;当检测到喜爱歌曲数量变化时,包括增加、删除、替换,都会将此状态下的歌曲参数传递至下一单元模块;The second detecting module 602 is configured to detect the favorite songs marked by the user in the music library; the detecting method is timing detection, and the system defaults to one week, and the user can adjust the time by himself. Inspection When the favorite song list is found to be empty, the default alarm is adopted; when the number of favorite songs is detected, including adding, deleting, and replacing, the song parameters in this state are transmitted to the next unit module;
音频过滤模块603,配置为接收到上一模块传递的歌曲参数,对歌曲进行筛选,可以根据音乐的节奏、曲调、速度、力度等因素,滤除掉柔和缓慢、节奏感弱的歌曲,保留节奏感强、动感强的歌曲,并将筛选出的歌曲一方面传递给数据计算单元,另一方面传递给词句识别单元;若筛选后无适合作为闹钟铃声的歌曲,则保持当前状态不变,不作变更;The audio filtering module 603 is configured to receive the song parameters transmitted by the previous module, and filter the songs, and filter out the soft, slow, rhythmic songs according to the rhythm, tune, speed, strength, and the like of the music, and retain the rhythm. Strong and dynamic songs, and the selected songs are transmitted to the data calculation unit on the one hand, and to the word recognition unit on the other hand; if there is no song suitable as the alarm ringtone after screening, the current state remains unchanged. change;
词句识别模块606,配置为根据歌曲性质及参数,识别判断出每一完整词句的时间点,并将此数据按歌曲名称保留,供数据计算模块参照对比;The word recognition module 606 is configured to identify a time point for determining each complete sentence according to the nature and parameters of the song, and retain the data according to the song name for reference by the data calculation module;
判断模块604,配置为先判断接收到的时间参数、歌曲参数是否与上次接收的参数一致,若一致,则保持当前状态,不作变更;若两者中有一方参数不一致,则需要数据计算单元重新计算处理。The determining module 604 is configured to first determine whether the received time parameter and the song parameter are consistent with the last received parameter. If they are consistent, the current state is maintained without change; if one of the two parameters is inconsistent, the data calculating unit is needed. Recalculate processing.
数据计算模块605,配置为获取到已筛选出的歌曲数据,按某种顺序排列后编号,计算出所有歌曲的时间长度和,然后将以闹钟持续时间参数为单元进行片段切割,将音频片段的起始点参数进行存储。如果用户设置的闹钟持续时间为“始终”,则不需进行歌曲切割,将所有歌曲作为一个整体进行循环播放。如果切割完成后,最后一个片段歌曲时长不足一个单元,则以默认的闹钟铃声进行填充。并将切割后的片段参数传给自适应词句补充单元;The data calculation module 605 is configured to obtain the filtered song data, arrange the numbers in a certain order, calculate the length of time of all the songs, and then perform segment cutting with the alarm duration parameter as a unit, and the audio segments are The starting point parameters are stored. If the user sets the alarm duration to "always", then no song cuts are required, and all songs are played as a whole. If the last clip song is less than one unit long after the cut is completed, it is filled with the default alarm ringtone. And passing the cut segment parameters to the adaptive word supplementing unit;
自适应词句补充模块607,配置为自动补充因片段切割而造成的词句不完整性。此处对于音频片段切割点的判断,则需要与词句识别单元中已识别出的完整词句时间点做比较。需要优先通过歌曲的特征因素,例如歌曲名称、类型等,获取词句识别单元中对应的已保存的数据,以此为依据进行对比比较;根据比较结果判断音频片段是否完整; The adaptive phrase supplementation module 607 is configured to automatically supplement the imperfection of the phrase due to segmentation. Here, the judgment of the cut point of the audio segment needs to be compared with the time point of the complete word that has been identified in the word recognition unit. It is necessary to preferentially pass the characteristic factors of the song, such as the song name, type, and the like, to obtain the corresponding saved data in the word recognition unit, and compare and compare the data according to the comparison; and determine whether the audio segment is complete according to the comparison result;
数据存储模块608,配置为存储接收到的歌曲参数以及进行切割、自适应词句补充后的音频频段的参数。这些参数主要包括但不限于以下几部分,如片段编号、歌曲序号、时间点、歌曲名称、歌曲长度、类别等等。The data storage module 608 is configured to store the received song parameters and parameters of the audio frequency band after the cutting and adaptive phrase supplementation. These parameters mainly include but are not limited to the following parts, such as clip number, song number, time point, song name, song length, category, and so on.
播放模块609,配置为当闹钟响铃命令发生后被触发,将按照音频片段顺序进行播放。闹钟第一次响起时,播放第一音频片段,计数器加一,延迟后再次响起,播放第二音频片段,计数器610再加一,依次类推,当闹钟第N次响起时,播放第N个音频片段。当数据更新,需要重新计算处理时,计数器清零,重新开始;如果播放到最后一个音频片段都未有数据更新,则音频片段循环播放,再从第一个开始。The playing module 609 is configured to be triggered after the alarm ringing command occurs, and will be played in the order of the audio segments. When the alarm sounds for the first time, the first audio segment is played, the counter is incremented by one, the second audio segment is played after the delay, the second audio segment is played, the counter 610 is incremented by one, and so on. When the alarm sounds for the Nth time, the Nth audio is played. Fragment. When the data is updated and the recalculation process is needed, the counter is cleared and restarted; if there is no data update after the last audio clip is played, the audio clip is looped and starts from the first one.
应用本实施例装置可以根据闹钟持续时间的变化自适应调整闹钟铃声的播放,自动筛选用户喜爱歌曲作为铃声并补充音频片段的词句完整,实现闹钟铃声的多样化,提升了用户体验。The device of the embodiment can adaptively adjust the playing of the alarm ringtone according to the change of the alarm duration, automatically filter the user's favorite song as the ringtone and supplement the completeness of the audio segment, realize the diversification of the alarm ringtone, and improve the user experience.
本发明实施例提供的铃声播放装置中的获取模块、选取模块、音频处理模块、存储模块和播放模块,都可以通过铃声播放装置中的处理器来实现;当然上述处理器完成的功能也可通过具体的逻辑电路实现;在具体实施例的过程中,处理器可以为中央处理器(CPU)、微处理器(MPU)、数字信号处理器(DSP)或现场可编程门阵列(FPGA)等。The acquiring module, the selecting module, the audio processing module, the storage module and the playing module in the ringtone playing device provided by the embodiment of the present invention can all be implemented by a processor in the ringtone playing device; The specific logic circuit is implemented; in the process of the specific embodiment, the processor may be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP), or a field programmable gate array (FPGA).
需要说明的是,本发明实施例中,如果以软件功能模块的形式实现上述的铃声播放方法,并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明实施例的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机、服务器、或者网络设备等)执行本发明各个实施例所述方法的全部或部分。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read Only Memory)、磁碟或者光盘等各种可以存 储程序代码的介质。这样,本发明实施例不限制于任何特定的硬件和软件结合。It should be noted that, in the embodiment of the present invention, if the ringtone playing method described above is implemented in the form of a software function module and sold or used as a standalone product, it may also be stored in a computer readable storage medium. Based on such understanding, the technical solution of the embodiments of the present invention may be embodied in the form of a software product in essence or in the form of a software product stored in a storage medium, including a plurality of instructions. A computer device (which may be a personal computer, server, or network device, etc.) is caused to perform all or part of the methods described in various embodiments of the present invention. The foregoing storage medium includes: a U disk, a mobile hard disk, a read only memory (ROM, a read only memory), a magnetic disk, or an optical disk, and the like. The medium in which the program code is stored. Thus, embodiments of the invention are not limited to any specific combination of hardware and software.
相应地,本发明实施例再提供一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,该计算机可执行指令用于执行本发明实施例中的铃声播放方法。Correspondingly, the embodiment of the present invention further provides a computer storage medium, where the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the ringtone playing method in the embodiment of the present invention.
以上内容是结合具体的实施方式对本发明所作的进一步详细说明,不能认定本发明的具体实施只局限于这些说明。对于本发明所属技术领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干简单推演或替换,都应当视为属于本发明的保护范围。The above is a further detailed description of the present invention in connection with the specific embodiments, and the specific embodiments of the present invention are not limited to the description. It will be apparent to those skilled in the art that the present invention may be made without departing from the spirit and scope of the invention.
工业实用性Industrial applicability
本发明实施例中:获取响铃持续时长;从终端存储的音频文件中选取至少一个音频文件,并根据所述响铃持续时长对选取的音频文件进行切割得到多个音频片段,存储所述音频片段;在触发响铃后,从存储中调用对应的所述音频片段进行播放;如此,本发明的铃声播放方法可以从终端存储中选取用户所需的音频文件,然后将选取的音频文件切割成多个音频片段,将音频片段作为终端的铃声,应用本发明的方法终端可以实现个性化或者多样化的铃声设置和播放,提升了用户体验。 In the embodiment of the present invention, the ring duration is obtained; at least one audio file is selected from the audio file stored by the terminal, and the selected audio file is cut according to the duration of the ring to obtain a plurality of audio segments, and the audio is stored. a segment; after the ringing is triggered, the corresponding audio segment is called from the storage for playing; thus, the ringtone playing method of the present invention can select an audio file required by the user from the terminal storage, and then cut the selected audio file into A plurality of audio segments, the audio segment is used as a ringtone of the terminal, and the terminal of the method of the present invention can implement personalized or diverse ringtone setting and playing, thereby improving the user experience.

Claims (15)

  1. 一种铃声播放方法,包括如下步骤:A ringtone playing method includes the following steps:
    获取响铃持续时长;Get the duration of the ring;
    从终端存储的音频文件中选取至少一个音频文件;根据所述响铃持续时长对选取的音频文件进行切割得到多个音频片段,存储所述音频片段;Selecting at least one audio file from the audio file stored in the terminal; cutting the selected audio file according to the duration of the ringing to obtain a plurality of audio segments, and storing the audio segment;
    在触发响铃后,从存储中调用对应的所述音频片段进行播放。After the ringing is triggered, the corresponding audio segment is called from the storage for playing.
  2. 如权利要求1所述的方法,其中,所述根据所述响铃持续时长对选取的音频文件进行切割得到多个音频片段的步骤包括:The method of claim 1, wherein the step of cutting the selected audio file according to the duration of the ring to obtain a plurality of audio segments comprises:
    根据所有选取的音频文件生成一个总音频文件;Generate a total audio file based on all selected audio files;
    根据所述响铃持续时长对所述总音频文件进行切割得到多个时长与所述响铃持续时长相等的音频片段。The total audio file is cut according to the duration of the ringing to obtain an audio segment having a duration equal to the duration of the ringing.
  3. 如权利要求2所述的方法,其中,所述根据所有选取的音频文件生成一个总音频文件的步骤包括:The method of claim 2 wherein said step of generating a total audio file from all of the selected audio files comprises:
    对所有选取的音频文件进行排列得到一个总音频文件,所述总音频文件的时长为所有选取的音频文件时长之和。All selected audio files are arranged to obtain a total audio file, and the duration of the total audio file is the sum of the durations of all selected audio files.
  4. 如权利要求2所述的方法,其中,所述根据所述响铃持续时长对所述总音频文件进行切割得到多个时长与所述响铃持续时长相等的音频片段的步骤包括:The method of claim 2, wherein the step of cutting the total audio file according to the duration of the ringing to obtain an audio segment having a plurality of durations equal to the duration of the ringing duration comprises:
    当所述总音频文件的时长为所述响铃持续时长的整数倍时,以所述响铃持续时长为一个片段的时长对所述总音频文件进行片段切割得到多个音频片段。When the duration of the total audio file is an integer multiple of the duration of the ring duration, the total audio file is segment cut by the duration of the ring duration as a segment to obtain a plurality of audio segments.
  5. 如权利要求4所述的方法,其中,所述根据所述响铃持续时长对所述总音频文件进行切割得到多个时长与所述响铃持续时长相等的音频片段的步骤还包括: The method of claim 4, wherein the step of cutting the total audio file according to the duration of the ring to obtain an audio segment having a duration equal to the duration of the ring duration further comprises:
    当所述总音频文件的时长不为所述响铃持续时长的整数倍时,以所述响铃持续时长为一个片段的时长对所述总音频文件进行片段切割得到多个音频片段;When the duration of the total audio file is not an integer multiple of the duration of the ring duration, segmenting the total audio file by using the duration of the ring duration as a segment to obtain a plurality of audio segments;
    对于时长小于所述响铃持续时长的音频片段,将预设的音频文件填充至该音频片段中使得该音频片段的时长等于所述响铃持续时长。For an audio segment whose duration is less than the duration of the ringing, a preset audio file is filled into the audio segment such that the duration of the audio segment is equal to the duration of the ringing.
  6. 如权利要求1-5任一项所述的方法,其中,在所述根据所述响铃持续时长对选取的音频文件进行切割得到多个音频片段之前,所述方法还包括:The method of any of claims 1-5, wherein before the cutting the selected audio file to obtain a plurality of audio segments according to the duration of the ringing, the method further comprises:
    对选取的音频文件进行识别获取选取的音频文件的完整词句的音频时间点;Identifying the selected audio file to obtain an audio time point of the complete sentence of the selected audio file;
    在所述根据所述响铃持续时长对选取的音频文件进行切割得到多个音频片段之后,触发响铃之前,所述方法还包括:After the ringing of the selected audio file according to the duration of the ringing to obtain a plurality of audio segments, before the ringing is triggered, the method further includes:
    根据所述完整词句的音频时间点和所述音频片段的时间点判断所述音频片段的词句是否完整,所述音频片段的时间点包括音频片段的起始和/或结束时间点;Determining whether the words of the audio segment are complete according to an audio time point of the complete phrase and a time point of the audio segment, the time point of the audio segment including a start and/or an ending time point of the audio segment;
    若否,则将所述音频片段缺失的词句对应的音频补充至所述音频片段使得所述音频片段的词句完整。If not, the audio corresponding to the missing phrase of the audio segment is added to the audio segment such that the phrase of the audio segment is complete.
  7. 如权利要求1至5任一项所述的方法,其中,所述从存储中调用对应的所述音频片段进行播放的步骤包括:The method according to any one of claims 1 to 5, wherein the step of calling the corresponding audio segment from the storage for playing comprises:
    根据响铃次数从存储中调用对应的所述音频片段进行播放。The corresponding audio segment is called from the storage for playback according to the number of rings.
  8. 一种铃声播放装置,包括:获取模块、选取模块、音频处理模块、存储模块和播放模块,其中:A ringtone playing device includes: an obtaining module, a selecting module, an audio processing module, a storage module, and a playing module, wherein:
    所述获取模块,配置为获取用户设置的响铃持续时长;The obtaining module is configured to obtain a duration of a ring set by a user;
    所述选取模块,配置为从终端存储的音频文件中选取至少一个音频文件; The selecting module is configured to select at least one audio file from the audio file stored by the terminal;
    所述音频处理模块,配置为根据所述响铃持续时长对选取的音频文件进行切割得到多个音频片段;The audio processing module is configured to cut a selected audio file according to the duration of the ring to obtain a plurality of audio segments;
    所述存储模块,配置为存储所述音频片段;The storage module is configured to store the audio segment;
    所述播放模块,配置为在触发响铃后,从所述存储模块中调用对应的所述音频片段进行播放。The playing module is configured to, after the ringing is triggered, invoke the corresponding audio segment from the storage module for playing.
  9. 如权利要求8所述的装置,其中,所述音频处理模块,配置为根据所有选取的音频文件生成一个总音频文件;根据所述响铃持续时长对所述总音频文件进行切割得到多个时长与所述响铃持续时长相等的音频片段。The apparatus of claim 8, wherein the audio processing module is configured to generate a total audio file according to all selected audio files; and to cut the total audio file according to the duration of the ring to obtain a plurality of durations An audio segment that is equal in duration to the ring.
  10. 如权利要求9所述的装置,其中,所述音频处理模块,配置为对所有选取的音频文件进行排列得到一个总音频文件,所述总音频文件的时长为所有选取的音频文件时长之和。The apparatus of claim 9, wherein the audio processing module is configured to arrange all of the selected audio files to obtain a total audio file, the duration of the total audio file being the sum of the durations of all selected audio files.
  11. 如权利要求9所述的装置,其中,所述音频处理模块,配置为:The apparatus of claim 9, wherein the audio processing module is configured to:
    当所述总音频文件的时长为所述响铃持续时长的整数倍时,以所述响铃持续时长为一个片段的时长对所述总音频文件进行片段切割得到多个音频片段;When the duration of the total audio file is an integer multiple of the duration of the ringing, segmenting the total audio file by using the duration of the ringing duration as a segment to obtain a plurality of audio segments;
    当所述总音频文件的时长不为所述响铃持续时长的整数倍时,以所述响铃持续时长为一个片段的时长对所述总音频文件进行片段切割得到多个音频片段;When the duration of the total audio file is not an integer multiple of the duration of the ring duration, segmenting the total audio file by using the duration of the ring duration as a segment to obtain a plurality of audio segments;
    对于时长小于所述响铃持续时长的音频片段,将预设的音频文件填充至该音频片段中使得该音频片段的时长等于所述响铃持续时长。For an audio segment whose duration is less than the duration of the ringing, a preset audio file is filled into the audio segment such that the duration of the audio segment is equal to the duration of the ringing.
  12. 如权利要求8至11任一项所述的装置,其中,还包括:词句识别模块、判断模块和词句补充模块;The apparatus according to any one of claims 8 to 11, further comprising: a sentence recognition module, a judgment module, and a sentence supplement module;
    所述词句识别模块,配置为在所述选取模块选取音频文件之后,所述存储模块存储音频片段之前,对选取的音频文件进行识别获取音频文 件的完整词句的音频时间点;The phrase recognition module is configured to: after the selection module selects an audio file, the storage module identifies the selected audio file to obtain an audio file before storing the audio segment The audio time point of the complete sentence of the piece;
    所述判断模块,配置为在所述存储模块存储音频片段之前,所述音频处理模块进行切割得到多个音频片段之后,根据所述完整词句的音频时间点和所述音频片段的时间点判断所述音频片段的词句是否完整,所述音频片段的时间点包括音频片段的起始和/或结束时间点;The determining module is configured to: after the audio processing module performs cutting to obtain a plurality of audio segments, the audio processing module determines, according to the audio time point of the complete phrase and the time point of the audio segment, before the storage module stores the audio segment Whether the words of the audio segment are complete, and the time point of the audio segment includes the start and/or end time points of the audio segment;
    所述词句补充模块,配置为当所述判断模块为否的情况下,所述音频片段缺失的词句对应的音频补充至所述音频片段使得所述音频片段的词句完整。The phrase supplementing module is configured to, when the determining module is negative, the audio corresponding to the missing phrase of the audio segment is added to the audio segment such that the phrase of the audio segment is complete.
  13. 如权利要求8至11任一项所述的装置,其中,所述播放模块,配置为根据响铃次数从存储中调用对应的所述音频片段进行播放。The device according to any one of claims 8 to 11, wherein the playing module is configured to call the corresponding audio segment from the storage for playing according to the number of rings.
  14. 一种终端,包括:处理器和存储器,其中:所述处理器,配置为:A terminal includes: a processor and a memory, wherein: the processor is configured to:
    获取响铃持续时长;Get the duration of the ring;
    从终端存储的音频文件中选取至少一个音频文件;根据所述响铃持续时长对选取的音频文件进行切割得到多个音频片段,将所述音频片段存储至所述存储器;Selecting at least one audio file from the audio files stored in the terminal; cutting the selected audio file according to the duration of the ringing to obtain a plurality of audio segments, and storing the audio segments into the memory;
    在触发响铃后,从所述存储器中调用对应的所述音频片段进行播放。After the ringing is triggered, the corresponding audio segment is called from the memory for playing.
  15. 一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,该计算机可执行指令用于执行权利要求1至7任一项铃声播放方法。 A computer storage medium storing computer executable instructions for performing the ringtone playing method of any one of claims 1 to 7.
PCT/CN2015/083554 2015-04-03 2015-07-08 Ringtone playing method and apparatus, terminal and storage medium WO2016155139A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510157837.1 2015-04-03
CN201510157837.1A CN106161714B (en) 2015-04-03 2015-04-03 Ringtone playing method and device, and terminal

Publications (1)

Publication Number Publication Date
WO2016155139A1 true WO2016155139A1 (en) 2016-10-06

Family

ID=57003924

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/083554 WO2016155139A1 (en) 2015-04-03 2015-07-08 Ringtone playing method and apparatus, terminal and storage medium

Country Status (2)

Country Link
CN (1) CN106161714B (en)
WO (1) WO2016155139A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107635083A (en) * 2017-09-28 2018-01-26 努比亚技术有限公司 The tinkle of bells method to set up, mobile terminal and readable storage medium storing program for executing
CN112349303B (en) * 2019-07-22 2021-09-24 北京声智科技有限公司 Audio playing method, device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000354087A (en) * 1999-06-11 2000-12-19 Casio Comput Co Ltd Telephone set and control method for incoming report
EP1487187A2 (en) * 2003-06-11 2004-12-15 Nec Corporation Cellular phone and incoming call reception informing method
CN101064895A (en) * 2006-06-05 2007-10-31 北京恒基伟业投资发展有限公司 Method for controlling play of mobile phone bell
CN101882438A (en) * 2009-05-06 2010-11-10 晨星软件研发(深圳)有限公司 Music data processing method and electronic device using same
CN102316202A (en) * 2011-09-29 2012-01-11 深圳市五巨科技有限公司 Phone ring optimization method and apparatus thereof

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000354087A (en) * 1999-06-11 2000-12-19 Casio Comput Co Ltd Telephone set and control method for incoming report
EP1487187A2 (en) * 2003-06-11 2004-12-15 Nec Corporation Cellular phone and incoming call reception informing method
CN101064895A (en) * 2006-06-05 2007-10-31 北京恒基伟业投资发展有限公司 Method for controlling play of mobile phone bell
CN101882438A (en) * 2009-05-06 2010-11-10 晨星软件研发(深圳)有限公司 Music data processing method and electronic device using same
CN102316202A (en) * 2011-09-29 2012-01-11 深圳市五巨科技有限公司 Phone ring optimization method and apparatus thereof

Also Published As

Publication number Publication date
CN106161714B (en) 2020-07-31
CN106161714A (en) 2016-11-23

Similar Documents

Publication Publication Date Title
CN105868397B (en) Song determination method and device
US8831953B2 (en) Systems and methods for filtering objectionable content
US20120101606A1 (en) Information processing apparatus, content data reconfiguring method and program
US7541534B2 (en) Methods and apparatus for rendering audio data
CN104282322B (en) A kind of mobile terminal and its method and apparatus for identifying song climax parts
US20070261537A1 (en) Creating and sharing variations of a music file
WO2008052009A2 (en) Methods and apparatus for representing audio data
CN109299318A (en) Method, apparatus, storage medium and the terminal device that music is recommended
WO2016155139A1 (en) Ringtone playing method and apparatus, terminal and storage medium
GB2506404A (en) Computer implemented iterative method of cross-fading between two audio tracks
WO2009010009A1 (en) Prompting message forming method and device for mobile terminal
JP2014010275A (en) Information processing device, information processing method, and program
CN112037739B (en) Data processing method and device and electronic equipment
US8375059B2 (en) Electronic device and method therefor
US10346472B2 (en) Method and a portable electronic device for automatically rating a music track
CN104581338B (en) A kind of method and device for controlling player to close automatically
CN109510907B (en) Ring tone setting method and device
US10963509B2 (en) Update method and update apparatus
CN104991946B (en) Information processing method, server and user equipment
KR102265347B1 (en) System for sound source playback changing sound sourse reproduction ptobability by user selection and method thereof
JP4934990B2 (en) Audio signal recording / playback device
CN106951068A (en) A kind of audio method for pushing and device
US8705708B2 (en) Indicators for voicemails
WO2016033869A1 (en) Ring-back tone implementation method and apparatus, and computer readable storage medium
CN105991840A (en) Alarm tone prompting method and intelligent terminal

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: 15887106

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: 15887106

Country of ref document: EP

Kind code of ref document: A1