CN103280232A - Method and device for audio recording and terminal equipment - Google Patents

Method and device for audio recording and terminal equipment Download PDF

Info

Publication number
CN103280232A
CN103280232A CN2013101196344A CN201310119634A CN103280232A CN 103280232 A CN103280232 A CN 103280232A CN 2013101196344 A CN2013101196344 A CN 2013101196344A CN 201310119634 A CN201310119634 A CN 201310119634A CN 103280232 A CN103280232 A CN 103280232A
Authority
CN
China
Prior art keywords
audio
audio recording
recording
parameter
application
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2013101196344A
Other languages
Chinese (zh)
Other versions
CN103280232B (en
Inventor
韩伟
康上明学
刘新宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Technology Co Ltd
Original Assignee
Beijing Xiaomi Technology Co Ltd
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 Beijing Xiaomi Technology Co Ltd filed Critical Beijing Xiaomi Technology Co Ltd
Priority to CN201310119634.4A priority Critical patent/CN103280232B/en
Publication of CN103280232A publication Critical patent/CN103280232A/en
Application granted granted Critical
Publication of CN103280232B publication Critical patent/CN103280232B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

The invention discloses a method and a device for audio recording and terminal equipment, and belongs to the field of terminal equipment. The method comprises the following steps of 1, receiving a recording starting instruction for starting audio recording, 2, setting parameters of first audio recording application and second audio recording application, 3, carrying out audio recording by the second audio recording application to obtain audio streaming, and 4, carrying out MP3 mode coding of the audio streaming by the first audio recording application to obtain a first audio file. The method and the device can process audio frequency into an audio file composed of data frames so that in memory, the audio file is not influenced by a recording state, and even if the audio file is influenced by abnormal environmental factors, continuous audio recording still be carried out without an audio loss caused by involuntary interrupt. Therefore, the method and the device improve audio recording quality and stability.

Description

Audio recording method, device and terminal device
Technical field
The present invention relates to the terminal device field, particularly a kind of audio recording method, device and terminal device.
Background technology
Along with popularizing of development of Communication Technique and mobile phone, mobile phone becomes requisite electronic equipment in the life gradually with its portable characteristic.And along with the enhancing of cell-phone function, in order to note some important sound-contents easily, mobile phone also provides panoramic mobile phone recording software for the user.The mobile phone recording software with its conveniently operate, the continuous lifting of simple stored record mode and built-in sound pick-up outfit, attracted large quantities of users.And mobile phone wants to become the audio recorder of generally using in the life, and the quality of its audio recording and stability will become the important indicator of weighing the recording software quality.
If the communication event that most of mobile phone recording softwares meet accident in Recording Process, as incoming call or come user such as note not wish to be recorded as the communication event of recording file, usually need manually close or suspend recording and wait the operation cause the recording interruption, thereby communication event is handled.In a single day close the mobile phone recording software this moment, then need after communication event finish, manually recover the mobile phone recording software and record, generate independently audio file again, caused the imperfect of recording, influenced quality and the stability of audio recording.And in case suspend the operation of mobile phone recording software, after communication event finishes, need manually to recover recording, because manual problems such as retardance also can cause the imperfect of recording, thereby influence quality and the stability of audio recording, and but can not move other mobile phone recording softwares at mobile phone recording software interval, influence the writing task of other mobile phone recording softwares, not only influenced the quality of audio recording, also influenced the stability of audio recording.
Therefore, how improving the quality of audio recording and stability is the significant problem of being badly in need of solution.
Summary of the invention
For the quality and the stability that improve audio recording, the embodiment of the invention provides a kind of audio recording method, device and terminal device.Described technical scheme is as follows:
On the one hand, a kind of audio recording method, described method comprises:
Receive the recording sign on, described recording sign on is used for starting audio recording;
The parameter that first audio recording is used and second audio recording is used is set;
Use the application of second audio recording and carry out audio recording, obtain audio data stream;
Use described first audio recording application audio data stream that gets access to is carried out the MP3 format coding, obtain audio file.
Use described first audio recording application audio data stream that gets access to carried out the MP3 format coding, obtain audio file, comprising:
When described second audio recording application of application gets access to audio data stream, the audio data stream that gets access to is carried out the MP3 format coding, the data that coding is generated write audio file.
The parameter that first audio recording is used and second audio recording is used is set to be comprised:
The parameter that first audio recording is used is set, and the parameter that described first audio recording is used comprises output sampling rate, output bit rate and the sound channel way of output at least;
Be that second audio recording is used the parameter that the parameter matching of using with described first audio recording is set, the parameter that described second audio recording is used comprises inlet flow, sampling width and output sampling rate at least.
Use described first audio recording application audio data stream that gets access to is carried out the MP3 format coding, obtain after the audio file, described method also comprises:
When audio recording stops, discharging described second audio recording and use;
Use described first audio recording and use the audio file that preservation gets access to.
Use described first audio recording application and preserve after the audio file that gets access to, described method also comprises:
When described audio recording stops by the End of Tape instruction triggers, replenish the end-of-file of the audio file that gets access to, the audio file after output replenishes;
When described audio recording stops by the recording pause instruction triggers, when receiving recording continuation instruction, restart described second audio recording and use and arrange the parameter that second audio recording is used, carry out audio recordings;
When described audio recording stops when the conversation Event triggered takes place, when detecting described conversation event and finish, restart described second audio recording and use and arrange the parameter that second audio recording is used, carry out audio recordings.
When audio recording stops, discharging before described second audio recording application, described method also comprises following arbitrary implementation:
When described conversation event takes place when, suspend audio recordings, or,
When the connection of described conversation event and described conversation event takes place, suspend audio recordings.
Described first audio recording is applied as the lame instrument.
Described second audio recording is applied as AudioRecorder.
On the other hand, a kind of audio recording device, described device comprises:
The command reception module is used for receiving the recording sign on, and described recording sign on is used for starting audio recording;
Module is set, is used for arranging the parameter that first audio recording is used and second audio recording is used;
The second audio recording application module is used for using the application of second audio recording and carries out audio recording, obtains audio data stream;
The first audio recording application module is used for using described first audio recording application audio data stream that gets access to is carried out the MP3 format coding, obtains audio file.
The described first audio recording application module is used for when described second audio recording application of application gets access to audio data stream the audio data stream that gets access to being carried out the MP3 format coding, and the data that coding is generated write audio file.
The described module that arranges is used for arranging the parameter that first audio recording is used, and the parameter that described first audio recording is used comprises output sampling rate, output bit rate and the sound channel way of output at least; Be that second audio recording is used the parameter that the parameter matching of using with described first audio recording is set, the parameter that described second audio recording is used comprises inlet flow, sampling width and output sampling rate at least.
Described device also comprises:
Release module is used for when audio recording stops, and discharges described second audio recording and uses;
Preserve module, be used for using described first audio recording and use the audio file that preservation gets access to.
Described device also comprises:
First processing module is used for replenishing the end-of-file of the audio file that gets access to when described audio recording stops by the End of Tape instruction triggers audio file after output replenishes;
Second processing module is used for when described audio recording stops by the recording pause instruction triggers, when receiving recording continuation instruction, restarts described second audio recording and uses and arrange the parameter that second audio recording is used, and carries out audio recordings;
The 3rd processing module is used for stopping when the conversation Event triggered takes place when described audio recording, when detecting described conversation event and finish, restarts described second audio recording and uses and arrange the parameter that second audio recording is used, the execution audio recordings.
Described device also comprises:
Suspend module, be used for when described conversation event takes place, the time-out audio recordings, or,
Described time-out module is used for suspending audio recordings when the connection of described conversation event and described conversation event takes place.
Described first audio recording is applied as the lame instrument.
Described second audio recording is applied as AudioRecorder.
Another aspect, a kind of terminal device, terminal device includes storer, and one or more than one program, one of them or an above procedure stores and are configured to carry out described one or an above program by one or above processor and comprise be used to the instruction of carrying out following operation in storer:
Receive the recording sign on, described recording sign on is used for starting audio recording;
The parameter that first audio recording is used and second audio recording is used is set;
Use the application of second audio recording and carry out audio recording, obtain audio data stream;
Use described first audio recording application audio data stream that gets access to is carried out the MP3 format coding, obtain audio file.
A kind of audio recording method, device and terminal device that the embodiment of the invention provides, by receiving the recording sign on, described recording sign on is used for starting audio recording; The parameter that first audio recording is used and second audio recording is used is set; Use the application of second audio recording and carry out audio recording, obtain audio data stream; Use described first audio recording application audio data stream that gets access to is carried out the pulse code modulation (PCM) pcm encoder, obtain audio file.The technical scheme that adopts the embodiment of the invention to provide, when audio recording is carried out in second audio recording application of equipment this locality, application terminal, use first audio recording application data stream that application gets access to second audio recording and carry out format conversion, make it possible to audio frequency is formed the audio file of being made up of a frame one frame data, thereby when preserving, be not subjected to the influence of its recording state, even be subjected to the influence of extraneous undesired factor, that still can realize continuing continually carries out record to audio frequency, and can not cause losing of audio frequency owing to situations such as accidental interruption, improved quality and the stability of audio recording.
Description of drawings
In order to be illustrated more clearly in the technical scheme in the embodiment of the invention, the accompanying drawing of required use is done to introduce simply in will describing embodiment below, apparently, accompanying drawing in describing below only is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the process flow diagram of a kind of audio recording method of providing of the embodiment of the invention;
Fig. 2 is the process flow diagram of a kind of audio recording method of providing of the embodiment of the invention;
Fig. 3 is the process flow diagram of a kind of audio recording device of providing of the embodiment of the invention;
Fig. 4 is a kind of terminal device structural representation that the embodiment of the invention provides.
Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, embodiment of the present invention is described further in detail below in conjunction with accompanying drawing.
Fig. 1 is the process flow diagram of a kind of audio recording method of providing of the embodiment of the invention.Referring to Fig. 1, described method comprises:
101, receive the recording sign on, described recording sign on is used for starting audio recording.
Wherein, the recording sign on can start the second audio recording applications trigger by the user, when the user clicks the icon that second audio recording is used on the terminal device, triggers this recording sign on.
102, the parameter that first audio recording is used and second audio recording is used is set.
Catch the recording sign on when terminal device, that is to say to capture the startup that this is used second audio recording, then initialization first audio recording is used, and this initialization procedure comprises the setting of the parameter that first audio recording is used.
Need to prove the setting that the parameter that this first audio recording is used and second audio recording is used can be complementary, the setting that can also not mate.
103, use the application of second audio recording and carry out audio recording, obtain audio data stream.
Wherein, this audio data stream can be regarded the pulse code modulation (pcm) form as.
104, use described first audio recording application audio data stream that gets access to is carried out the MP3 format coding, obtain audio file.
Second audio recording of the embodiment of the invention is applied in when getting access to audio data stream, not using the coded system of this second audio recording application self encodes, but carry out the MP3 format coding, second audio recording is used the audio file that the PCM data collect are encoded to MP3 format preserve, constantly repeat this process and the audio-frequency information in the external world can be converted to MP3 audio file continuously.
A kind of audio recording method that the embodiment of the invention provides, by receiving the recording sign on, described recording sign on is used for starting audio recording; The parameter that first audio recording is used and second audio recording is used is set; Use the application of second audio recording and carry out audio recording, obtain audio data stream; Use described first audio recording application audio data stream that gets access to is carried out the MP3 format coding, obtain audio file.The technical scheme that adopts the embodiment of the invention to provide, when audio recording is carried out in second audio recording application of equipment this locality, application terminal, use first audio recording application data stream that application gets access to second audio recording and carry out format conversion, make it possible to audio frequency is formed the audio file of being made up of a frame one frame data, thereby when preserving, be not subjected to the influence of its recording state, even be subjected to the influence of extraneous undesired factor, that still can realize continuing continually carries out record to audio frequency, and can not cause losing of audio frequency owing to situations such as accidental interruption, improved quality and the stability of audio recording.
Preferable, use described first audio recording application audio data stream that gets access to is carried out the MP3 format coding, obtain audio file, comprising:
When described second audio recording application of application gets access to audio data stream, the audio data stream that gets access to is carried out the MP3 format coding, the data that coding is generated write audio file.
Preferable, the parameter that first audio recording is used and second audio recording is used is set comprises:
The parameter that first audio recording is used is set, and the parameter that described first audio recording is used comprises output sampling rate, output bit rate and the sound channel way of output at least;
Be that second audio recording is used the parameter that the parameter matching of using with described first audio recording is set, the parameter that described second audio recording is used comprises inlet flow, sampling width and output sampling rate at least.
Preferable, use described first audio recording application audio data stream that gets access to is carried out the MP3 format coding, to obtain after the audio file, described method also comprises:
When audio recording stops, discharging described second audio recording and use;
Use described first audio recording and use the audio file that preservation gets access to.
Preferable, to use described first audio recording application and preserve after the audio file that gets access to, described method also comprises:
When described audio recording stops by the End of Tape instruction triggers, replenish the end-of-file of the audio file that gets access to, the audio file after output replenishes;
When described audio recording stops by the recording pause instruction triggers, when receiving recording continuation instruction, restart described second audio recording and use and arrange the parameter that second audio recording is used, carry out audio recordings;
When described audio recording stops when the conversation Event triggered takes place, when detecting described conversation event and finish, restart described second audio recording and use and arrange the parameter that second audio recording is used, carry out audio recordings.
Preferable, when audio recording stops, discharging before described second audio recording application, described method also comprises following arbitrary implementation:
When described conversation event takes place when, suspend audio recordings, or,
When the connection of described conversation event and described conversation event takes place, suspend audio recordings.
Preferable, described first audio recording is applied as the lame instrument.
Preferable, described second audio recording is applied as AudioRecorder.
Fig. 2 is the process flow diagram of a kind of audio recording method of providing of the embodiment of the invention.The executive agent of this method is terminal device, and referring to Fig. 2, described method comprises:
201, terminal device receives the recording sign on, and described recording sign on is used for starting audio recording.
This step 201 and step 101 in like manner do not repeat them here.
202, terminal device arranges the parameter that first audio recording is used, and the parameter that described first audio recording is used comprises output sampling rate, output bit rate and the sound channel way of output at least.
Preferable, first audio recording is applied as third party MP3 tools, and these third party MP3 tools can be lame instrument etc.
Preferably, the output sampling rate that this first audio recording is used is set to 44100HZ, and output bit rate is set to 64kbps, and the sound channel way of output is set to two-channel output.
203, terminal device is that second audio recording is used the parameter that the parameter matching of using with described first audio recording is set, and the parameter that described second audio recording is used comprises inlet flow, sampling width and output sampling rate at least.
Preferable, this second audio recording is applied as the audio recording that the terminal device system carries and uses, as AudioRecorder etc.
Preferably, inlet flow is set to microphone, and the sampling width is set to 16bit, and sampling rate is set to 44100HZ.
Need to prove, in this step 203 and 204, be that to use the parameter be set to the parameter matching used with described first audio recording with second audio recording be that example describes, the compression factor of the follow-up audio file that gets access to is less thus, degree of distortion is less, and in embodiments of the present invention, the setting that can also not mate its parameter can not impact follow-up audio file acquisition process yet.
Certainly, when application arranges for second audio recording, other parameters such as its outgoing route need be set also, in embodiments of the present invention this not limited.
204, terminal device is used second audio recording and is used and to carry out audio recording, obtains audio data stream.
Need to prove that this step 204 namely is to gather audio-frequency information and generate the process of audio data stream by microphone.
205, when described second audio recording application of application gets access to audio data stream, the audio data stream that gets access to is carried out the MP3 format coding, the data that coding is generated write audio file.
The cataloged procedure of this MP3 format namely is constantly to obtain audio data stream, and the process of constantly encoding constantly repeats this process and the audio-frequency information in the external world can be converted to the MP3 audio file that comprises successive frame.Because the audio compression rate height of MP3 storage format, and distortion is little, therefore uses the coded format of MP3 can make things convenient for storage and the use of user to audio frequency to a great extent.And because the singularity of MP3 coded format; its coding is that a frame one frame carries out; therefore in the audio recording process; when even recording takes place to suspend; the frame of Bao Cuning is not lost before; the frame of preserving before can not losing because of the time-out of recording or interrupting device power down etc. is compared with recording of forms such as amr or 3gpp, has advantages of higher stability.
Above-mentioned steps 201-205 namely is the audio recording process under not interruption situation, and because the generation of conversation event or other unscheduled events may cause stopping of audio recording, then this method is further comprising the steps of:
206, receive the audio recording halt instruction;
Need to prove that in embodiments of the present invention, this audio recording halt instruction can be divided into following three kinds: (1) audio recording halt instruction is for finishing the instruction of this audio recordings, and namely the user clicks stop button, finishes this audio recordings.(2) the audio recording halt instruction is for suspending the instruction of this audio recordings, and namely the user clicks pause button or by the conversation Event triggered, and the user also needs to continue this audio recordings follow-up.Particularly, this time-out also comprises following arbitrary mode: when described conversation event takes place, trigger the first audio recording halt instruction, make when terminal device receives the first audio recording halt instruction, suspend audio recordings, that is to say as incoming call or suspend audio recordings when going conversation event such as electricity to take place; Or, when the connection of described conversation event and described conversation event takes place when, trigger the second audio recording halt instruction, make when terminal device receives the second audio recording halt instruction, suspend audio recordings, that is to say as incoming call or remove electricity, and suspend audio recordings under incoming call or the situation of going electricity to connect.
207, when audio recording stops, terminal device discharges described second audio recording and uses;
Need to prove that this audio recording stops and can for these two kinds of different situations, all needing to discharge described second audio recording and use for finishing audio recording or suspending two kinds of situations of audio recording.
Because terminal device is when carrying out audio recording, all need to share a register stream Recorder Stream, when the application of second audio recording is in running status, can take this Recorder Stream, even if under halted state, do not use if do not discharge second audio recording, Recorder Stream will be taken by this application always, causes other application can't continue to use sound-recording function.So discharging second audio recording when recording pause uses and will can not hold over total Recorder Stream again, just can not have influence on other this moment and use continuation use sound-recording function, under the state that audio recording suspends, guarantee other recording software operate as normal.Converse when the recording pause such as sound-track engraving apparatus, can carry out calling record again in the communication process, this calling record can normally carry out.
When audio recording stopped to the end audio recording, recording state became halted state.And when audio recording stopped to the time-out audio recording, recording state became halted state.
208, terminal device is used described first audio recording and is used the audio file that preservation gets access to.
Need to prove, this audio recording stops to comprise that audio recording finishes and suspend two kinds of situations, for these two kinds of situations, terminal device all discharges the application of second audio recording and uses the application of first audio recording and preserve operation, and follow-up operation is different, sees step 209-211 for details.
209, when described audio recording stops by the End of Tape instruction triggers, terminal device replenishes the end-of-file of the audio file that gets access to, the audio file after output replenishes.
Constantly preserving in the process of first audio file, if the user carries out shut-down operation and has triggered the End of Tape instruction, then withdraw from the recording circulation, discharge second audio recording application that is used for gathering audio data stream, recording state becomes halted state, at this moment, preservation step application first audio recording application by step 208 is preserved accordingly, the audio file that preservation gets access to, and owing to do not finish coded data and may be not enough to encode and generate the frame of MP3, then need to add clear data and think the audio file supplementary document tail that gets access to, to generate a whole frame.
210, when described audio recording stops by the recording pause instruction triggers, when terminal device receives recording continuation instruction, restart described second audio recording and use and arrange the parameter that second audio recording is used, carry out audio recordings.
211, stop when the conversation Event triggered takes place when described audio recording, when terminal device detects described conversation event and finishes, restart described second audio recording and use and arrange the parameter that second audio recording is used, carry out audio recordings.
In above-mentioned steps 210 and step 211, all having introduced audio recording stops to suspending the situation of audio recording, and according to the triggering mode difference of this time-out, carried out the introduction of respective handling, in the cyclic process of audio recording, when carrying out pausing operation, the user triggered the recording pause instruction, make audio recording stop, the then release of execution in step 207-208 and preservation process, execution in step 210 again, at this moment, because the user carries out the operation that continues recording, and the application of second audio recording has been released, and the parameter that then needs again second audio recording to be used arranges, and carries out follow-up recording process to use this second audio recording application.And when terminal device has incoming call or go communication event such as electricity to take place, also can trigger the recording pause instruction, make audio recording stop, the release of execution in step 207-208 and preservation process, state to communication event detects again, when detecting the communication event end, execution in step 211, at this moment, because the user carries out the operation that continues recording, and the application of second audio recording has been released, and the parameter that then needs again second audio recording to be used arranges, carry out follow-up recording process to use this second audio recording application, thereby when audio recording is interrupted by external influence, can in time return to original audio recording state.
Alternatively, if when the current talking event is the conversation event of access failure, also can not stop audio recordings, in order to realize the continual audio recording that continues.
The technical scheme that adopts the embodiment of the invention to provide, when audio recording is carried out in second audio recording application of equipment this locality, application terminal, use first audio recording application data stream that application gets access to second audio recording and carry out format conversion, make it possible to audio frequency is formed the audio file of being made up of a frame one frame data, thereby when preserving, be not subjected to the influence of its recording state, even be subjected to the influence of extraneous undesired factor, that still can realize continuing continually carries out record to audio frequency, and can not cause losing of audio frequency owing to situations such as accidental interruption, improved quality and the stability of audio recording.Further, by when audio recording stops, discharging second audio recording and use, can avoid the taking of recorder stream, making other audio recordings use can record.Further, by the difference according to triggering mode, the processing to the audio recording that is in halted state has realized still in time returning to original recording state after being interrupted by external influence.
Fig. 3 is the structural representation of a kind of audio recording device of providing of the embodiment of the invention.Referring to Fig. 3, described device comprises:
Command reception module 301 is used for receiving the recording sign on, and described recording sign on is used for starting audio recording;
Module 302 is set, is used for arranging the parameter that first audio recording is used and second audio recording is used;
The second audio recording application module 303 is used for using the application of second audio recording and carries out audio recording, obtains audio data stream;
The first audio recording application module 304 is used for using described first audio recording application audio data stream that gets access to is carried out the MP3 format coding, obtains audio file.
Preferable, the described first audio recording application module 304 is used for when described second audio recording application of application gets access to audio data stream the audio data stream that gets access to being carried out the MP3 format coding, and the data that coding is generated write audio file.
Preferable, the described module 302 that arranges is used for arranging the parameter that first audio recording is used, and the parameter that described first audio recording is used comprises output sampling rate, output bit rate and the sound channel way of output at least; Be that second audio recording is used the parameter that the parameter matching of using with described first audio recording is set, the parameter that described second audio recording is used comprises inlet flow, sampling width and output sampling rate at least.
Preferable, described device also comprises:
Release module is used for when audio recording stops, and discharges described second audio recording and uses;
Preserve module, be used for using described first audio recording and use the audio file that preservation gets access to.
Preferable, described device also comprises:
First processing module is used for replenishing the end-of-file of the audio file that gets access to when described audio recording stops by the End of Tape instruction triggers audio file after output replenishes;
Second processing module is used for when described audio recording stops by the recording pause instruction triggers, when receiving recording continuation instruction, restarts described second audio recording and uses and arrange the parameter that second audio recording is used, and carries out audio recordings;
The 3rd processing module is used for stopping when the conversation Event triggered takes place when described audio recording, when detecting described conversation event and finish, restarts described second audio recording and uses and arrange the parameter that second audio recording is used, the execution audio recordings.
Preferable, described device also comprises:
Suspend module, be used for when described conversation event takes place, the time-out audio recordings, or,
Described time-out module is used for suspending audio recordings when the connection of described conversation event and described conversation event takes place.
Preferable, described first audio recording is applied as the lame instrument.
Preferable, described second audio recording is applied as AudioRecorder.
The technical scheme that adopts the embodiment of the invention to provide, when audio recording is carried out in second audio recording application of equipment this locality, application terminal, use first audio recording application data stream that application gets access to second audio recording and carry out format conversion, make it possible to audio frequency is formed the audio file of being made up of a frame one frame data, thereby when preserving, be not subjected to the influence of its recording state, even be subjected to the influence of extraneous undesired factor, that still can realize continuing continually carries out record to audio frequency, and can not cause losing of audio frequency owing to situations such as accidental interruption, improved quality and the stability of audio recording.
Need to prove: the audio recording device that above-described embodiment provides is when audio recording, only the division with above-mentioned each functional module is illustrated, in the practical application, can as required the above-mentioned functions distribution be finished by different functional modules, the inner structure of the equipment of being about to is divided into different functional modules, to finish all or part of function described above.In addition, the audio recording device that above-described embodiment provides and audio recording method embodiment belong to same design, and its specific implementation process sees method embodiment for details, repeats no more here.
The all or part of step that one of ordinary skill in the art will appreciate that realization above-described embodiment can be finished by hardware, also can instruct relevant hardware to finish by program, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium of mentioning can be ROM (read-only memory), disk or CD etc.
Fig. 4 is a kind of terminal device structural representation that the embodiment of the invention provides.Referring to Fig. 4, this terminal device can be used for implementing the audio recording method that above-described embodiment provides.Specifically:
Terminal device 400 can comprise communication unit 110, includes the storer 120 of one or more computer-readable recording mediums, input block 130, display unit 140, sensor 150, voicefrequency circuit 160, wireless communication unit 170, include parts such as the processor 180 of handling core more than one or one and power supply 190.It will be understood by those skilled in the art that the terminal device structure shown in Fig. 4 does not constitute the restriction to terminal device, can comprise than the more or less parts of diagram, perhaps make up some parts, perhaps different arrangements of components.Wherein:
Communication unit 110 can be used for receiving and sending messages or communication process in, the reception of signal and transmission, this communication unit 110 can be RF(Radio Frequency, radio frequency) network communication equipment such as circuit, router, modulator-demodular unit.Especially, when communication unit 110 is the RF circuit, after the downlink information reception with the base station, transfer to one or above processor 180 processing; In addition, will be referred to up data and send to the base station.Usually, RF circuit as communication unit includes but not limited to antenna, at least one amplifier, tuner, one or more oscillator, subscriber identity module (SIM) card, transceiver, coupling mechanism, LNA(Low Noise Amplifier, low noise amplifier), diplexer etc.In addition, communication unit 110 can also be by radio communication and network and other devices communicatings.Described radio communication can be used arbitrary communication standard or agreement, include but not limited to GSM (Global System of Mobile communication, global system for mobile communications), GPRS (General Packet Radio Service, general packet radio service), CDMA (Code Division Multiple Access, CDMA), WCDMA (Wideband Code Division Multiple Access, Wideband Code Division Multiple Access (WCDMA)), LTE (Long Term Evolution, Long Term Evolution), Email, SMS (Short Messaging Service, Short Message Service) etc.Storer 120 can be used for storing software program and module, and processor 180 is stored in software program and the module of storer 120 by operation, and various functions are used and data are handled thereby carry out.Storer 120 can mainly comprise storage program area and storage data field, wherein, but the required application program (such as sound-playing function, image playing function etc.) of storage program area storage operating system, at least one function etc.; The data (such as voice data, phone directory etc.) created according to the use of terminal device 400 etc. can be stored in the storage data field.In addition, storer 120 can comprise high-speed random access memory, can also comprise nonvolatile memory, for example at least one disk memory, flush memory device or other volatile solid-state parts.Correspondingly, storer 120 can also comprise Memory Controller, so that the visit of processor 180 and 130 pairs of storeies 120 of input block to be provided.
Input block 130 can be used for receiving numeral or the character information of input, and generation is imported with the user arranges and function control is relevant keyboard, mouse, control lever, optics or trace ball signal.Particularly, input block 130 can comprise tactile sensitive surfaces 131 and other input equipments 132.Touch sensitive surfaces 131, be also referred to as touch display screen or Trackpad, can collect the user or near touch operation (using any suitable object such as finger, stylus or annex touching on the sensitive surfaces 131 or touching near the sensitive surfaces 131 operation such as the user) thereon, and drive corresponding coupling arrangement according to predefined formula.Optionally, touch sensitive surfaces 131 and can comprise touch detecting apparatus and two parts of touch controller.Wherein, touch detecting apparatus detects user's touch orientation, and detects the signal that touch operation is brought, and sends signal to touch controller; Touch controller receives touch information from touch detecting apparatus, and converts it to contact coordinate, gives processor 180 again, and the order that energy receiving processor 180 is sent is also carried out.In addition, can adopt polytypes such as resistance-type, condenser type, infrared ray and surface acoustic wave to realize touching sensitive surfaces 131.Except touching sensitive surfaces 131, input block 130 can also comprise other input equipments 132.Particularly, other input equipments 132 can include but not limited to one or more in physical keyboard, function key (such as volume control button, switch key etc.), trace ball, mouse, the control lever etc.
Display unit 140 can be used for showing the information of being imported by the user or offer user's information and the various graphical user interface of terminal device 400 that these graphical user interface can be made of figure, text, icon, video and its combination in any.Display unit 140 can comprise display panel 141, optionally, can adopt LCD (Liquid Crystal Display, LCD), OLED forms such as (Organic Light-Emitting Diode, Organic Light Emitting Diodes) to dispose display panel 141.Further, touch sensitive surfaces 131 and can cover display panel 141, when touch that sensitive surfaces 131 detects thereon or near touch operation after, send processor 180 to determining the type of touch event, provide corresponding vision output according to the type of touch event at display panel 141 with preprocessor 180.Though in Fig. 4, touch sensitive surfaces 131 and display panel 141 and be as two independently parts realize input and input function, in certain embodiments, can will touch the integrated and realization input and output function of sensitive surfaces 131 and display panel 141.
Terminal device 400 also can comprise at least a sensor 150, such as optical sensor, motion sensor and other sensors.Particularly, optical sensor can comprise ambient light sensor and proximity transducer, and wherein, ambient light sensor can be regulated the brightness of display panel 141 according to the light and shade of ambient light, proximity transducer can cut out display panel 141 and/or backlight when terminal device 400 moves in one's ear.A kind of as motion sensor, the acceleration of gravity sensor can detect the size of the acceleration that (is generally three) on all directions, size and the direction of gravity be can detect when static, the application (such as shielding switching, dependent game, the calibration of magnetometer attitude anyhow), Vibration identification correlation function (such as passometer, knock) etc. of mobile phone attitude can be used for identifying; As for terminal device 400 other sensors such as configurable gyroscope, barometer, hygrometer, thermometer, infrared ray sensor also, do not repeat them here.
Voicefrequency circuit 160, loudspeaker 161, microphone 162 can provide the audio interface between user and the terminal device 400.Voicefrequency circuit 160 can be transferred to loudspeaker 161 with the electric signal after the voice data conversion that receives, and is converted to voice signal output by loudspeaker 161; On the other hand, microphone 162 is converted to electric signal with the voice signal of collecting, by being converted to voice data after voicefrequency circuit 160 receptions, after again voice data output processor 180 being handled, to send to such as another terminal device, perhaps export voice data to storer 120 in order to further handle through RF circuit 110.Voicefrequency circuit 160 also may comprise earphone jack, so that communicating by letter of peripheral hardware earphone and terminal device 400 to be provided.
In order to realize radio communication, can dispose wireless communication unit 170 on this terminal device, this wireless communication unit 170 can be the WiFi module.WiFi belongs to the short range wireless transmission technology, terminal device 400 by wireless communication unit 170 can help that the user sends and receive e-mail, browsing page and visit streaming video etc., it provides wireless broadband internet visit for the user.Though Fig. 4 shows wireless communication unit 170, be understandable that it does not belong to must constituting of terminal device 400, fully can be as required in the scope of the essence that does not change invention and omit.
Processor 180 is control centers of terminal device 400, utilize various interface to be connected the various piece of whole mobile phone with circuit, by moving or carry out software program and/or the module that is stored in the storer 120, and call the data that are stored in the storer 120, carry out various functions and the deal with data of terminal device 400, thereby mobile phone is carried out integral monitoring.Optionally, processor 180 can comprise one or more processing cores; Preferably, processor 180 can integrated application processor and modem processor, and wherein, application processor is mainly handled operating system, user interface and application program etc., and modem processor is mainly handled radio communication.Be understandable that above-mentioned modem processor also can not be integrated in the processor 180.
Terminal device 400 comprises that also the power supply 190(that powers to each parts is such as battery), preferably, power supply can link to each other with processor 180 logics by power-supply management system, thereby realizes functions such as management charging, discharge and power managed by power-supply management system.Power supply 190 can also comprise one or more direct current or random component such as AC power, recharging system, power failure detection circuit, power supply changeover device or inverter, power supply status indicator.
Although not shown, terminal device 400 can also comprise camera, bluetooth module etc., does not repeat them here.Specifically in the present embodiment, the display unit of terminal device is touch-screen display, terminal device also includes storer, and one or more than one program, one of them or an above procedure stores and are configured to carry out described one or an above program by one or above processor and comprise be used to the instruction of carrying out following operation in storer:
Receive the recording sign on, described recording sign on is used for starting audio recording;
The parameter that first audio recording is used and second audio recording is used is set;
Use the application of second audio recording and carry out audio recording, obtain audio data stream;
Use described first audio recording application audio data stream that gets access to is carried out the MP3 format coding, obtain audio file.
Supposing above-mentioned is first kind of possible embodiment, then in second kind of possible embodiment that first kind of possible embodiment provides as the basis, in the storer of this terminal device, also comprises for the instruction of carrying out following operation:
When described second audio recording application of application gets access to audio data stream, the audio data stream that gets access to is carried out the MP3 format coding, the data that coding is generated write audio file.
In the third possible embodiment that first kind of possible embodiment provides as the basis, in the storer of this terminal device, also comprise for the instruction of carrying out following operation:
The parameter that first audio recording is used is set, and the parameter that described first audio recording is used comprises output sampling rate, output bit rate and the sound channel way of output at least;
Be that second audio recording is used the parameter that the parameter matching of using with described first audio recording is set, the parameter that described second audio recording is used comprises inlet flow, sampling width and output sampling rate at least.
In the 4th kind of possible embodiment that the third possible embodiment provides as the basis, in the storer of this terminal device, also comprise for the instruction of carrying out following operation:
When audio recording stops, discharging described second audio recording and use;
Use described first audio recording and use the audio file that preservation gets access to.
Use described first audio recording application and preserve after the audio file that gets access to, described method also comprises:
When described audio recording stops by the End of Tape instruction triggers, replenish the end-of-file of the audio file that gets access to, the audio file after output replenishes;
When described audio recording stops by the recording pause instruction triggers, when receiving recording continuation instruction, restart described second audio recording and use and arrange the parameter that second audio recording is used, carry out audio recordings;
When described audio recording stops when the conversation Event triggered takes place, when detecting described conversation event and finish, restart described second audio recording and use and arrange the parameter that second audio recording is used, carry out audio recordings.
In the 5th kind of possible embodiment that the 4th kind of possible embodiment provides as the basis, in the storer of this terminal device, also comprise for the instruction of carrying out following operation:
When described conversation event takes place when, suspend audio recordings, or,
When the connection of described conversation event and described conversation event takes place, suspend audio recordings.
In the 6th kind of possible embodiment that first kind of possible embodiment provides as the basis, in the storer of this terminal device, also comprise for the instruction of carrying out following operation:
Described first audio recording is applied as the lame instrument.
In the 7th kind of possible embodiment that first kind of possible embodiment provides as the basis, in the storer of this terminal device, also comprise for the instruction of carrying out following operation:
Described second audio recording is applied as AudioRecorder.
The above only is preferred embodiment of the present invention, and is in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of doing, is equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (17)

1. an audio recording method is characterized in that, described method comprises:
Receive the recording sign on, described recording sign on is used for starting audio recording;
The parameter that first audio recording is used and second audio recording is used is set;
Use the application of second audio recording and carry out audio recording, obtain audio data stream;
Use described first audio recording application audio data stream that gets access to is carried out the MP3 format coding, obtain audio file.
2. method according to claim 1 is characterized in that, uses described first audio recording application audio data stream that gets access to is carried out the MP3 format coding, obtains audio file, comprising:
When described second audio recording application of application gets access to audio data stream, the audio data stream that gets access to is carried out the MP3 format coding, the data that coding is generated write audio file.
3. method according to claim 1 is characterized in that, the parameter that first audio recording is used and second audio recording is used is set comprises:
The parameter that first audio recording is used is set, and the parameter that described first audio recording is used comprises output sampling rate, output bit rate and the sound channel way of output at least;
Be that second audio recording is used the parameter that the parameter matching of using with described first audio recording is set, the parameter that described second audio recording is used comprises inlet flow, sampling width and output sampling rate at least.
4. method according to claim 1 is characterized in that, uses described first audio recording application audio data stream that gets access to is carried out the MP3 format coding, obtains after the audio file, and described method also comprises:
When audio recording stops, discharging described second audio recording and use;
Use described first audio recording and use the audio file that preservation gets access to.
5. method according to claim 4 is characterized in that, uses described first audio recording application and preserves after the audio file that gets access to, and described method also comprises:
When described audio recording stops by the End of Tape instruction triggers, replenish the end-of-file of the audio file that gets access to, the audio file after output replenishes;
When described audio recording stops by the recording pause instruction triggers, when receiving recording continuation instruction, restart described second audio recording and use and arrange the parameter that second audio recording is used, carry out audio recordings;
When described audio recording stops when the conversation Event triggered takes place, when detecting described conversation event and finish, restart described second audio recording and use and arrange the parameter that second audio recording is used, carry out audio recordings.
6. method according to claim 5 is characterized in that, when audio recording stops, discharging before described second audio recording application, and described method also comprises following arbitrary implementation:
When described conversation event takes place when, suspend audio recordings, or,
When the connection of described conversation event and described conversation event takes place, suspend audio recordings.
7. method according to claim 1 is characterized in that, described first audio recording is applied as the lame instrument.
8. method according to claim 1 is characterized in that, described second audio recording is applied as AudioRecorder.
9. an audio recording device is characterized in that, described device comprises:
The command reception module is used for receiving the recording sign on, and described recording sign on is used for starting audio recording;
Module is set, is used for arranging the parameter that first audio recording is used and second audio recording is used;
The second audio recording application module is used for using the application of second audio recording and carries out audio recording, obtains audio data stream;
The first audio recording application module is used for using described first audio recording application audio data stream that gets access to is carried out the MP3 format coding, obtains audio file.
10. device according to claim 9, it is characterized in that, the described first audio recording application module is used for when described second audio recording application of application gets access to audio data stream the audio data stream that gets access to being carried out the MP3 format coding, and the data that coding is generated write audio file.
11. device according to claim 9 is characterized in that, the described module that arranges is used for arranging the parameter that first audio recording is used, and the parameter that described first audio recording is used comprises output sampling rate, output bit rate and the sound channel way of output at least; Be that second audio recording is used the parameter that the parameter matching of using with described first audio recording is set, the parameter that described second audio recording is used comprises inlet flow, sampling width and output sampling rate at least.
12. device according to claim 9 is characterized in that, described device also comprises:
Release module is used for when audio recording stops, and discharges described second audio recording and uses;
Preserve module, be used for using described first audio recording and use the audio file that preservation gets access to.
13. device according to claim 12 is characterized in that, described device also comprises:
First processing module is used for replenishing the end-of-file of the audio file that gets access to when described audio recording stops by the End of Tape instruction triggers audio file after output replenishes;
Second processing module is used for when described audio recording stops by the recording pause instruction triggers, when receiving recording continuation instruction, restarts described second audio recording and uses and arrange the parameter that second audio recording is used, and carries out audio recordings;
The 3rd processing module is used for stopping when the conversation Event triggered takes place when described audio recording, when detecting described conversation event and finish, restarts described second audio recording and uses and arrange the parameter that second audio recording is used, the execution audio recordings.
14. device according to claim 13 is characterized in that, described device also comprises:
Suspend module, be used for when described conversation event takes place, the time-out audio recordings, or,
Described time-out module is used for suspending audio recordings when the connection of described conversation event and described conversation event takes place.
15. device according to claim 9 is characterized in that, described first audio recording is applied as the lame instrument.
16. device according to claim 9 is characterized in that, described second audio recording is applied as AudioRecorder.
17. terminal device, it is characterized in that, terminal device includes storer, and one or more than one program, one of them or an above procedure stores and are configured to carry out described one or an above program by one or above processor and comprise be used to the instruction of carrying out following operation in storer:
Receive the recording sign on, described recording sign on is used for starting audio recording;
The parameter that first audio recording is used and second audio recording is used is set;
Use the application of second audio recording and carry out audio recording, obtain audio data stream;
Use described first audio recording application audio data stream that gets access to is carried out the MP3 format coding, obtain audio file.
CN201310119634.4A 2013-04-08 2013-04-08 audio recording method, device and terminal device Active CN103280232B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310119634.4A CN103280232B (en) 2013-04-08 2013-04-08 audio recording method, device and terminal device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310119634.4A CN103280232B (en) 2013-04-08 2013-04-08 audio recording method, device and terminal device

Publications (2)

Publication Number Publication Date
CN103280232A true CN103280232A (en) 2013-09-04
CN103280232B CN103280232B (en) 2016-06-08

Family

ID=49062725

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310119634.4A Active CN103280232B (en) 2013-04-08 2013-04-08 audio recording method, device and terminal device

Country Status (1)

Country Link
CN (1) CN103280232B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103491252A (en) * 2013-09-24 2014-01-01 北京奇虎科技有限公司 Method and device for achieving voice recording on mobile phone based on iOS
CN104394264A (en) * 2014-10-16 2015-03-04 来安县新元机电设备设计有限公司 Method and system of preventing recording interruption
CN106897146A (en) * 2017-02-09 2017-06-27 青岛海信移动通信技术股份有限公司 The data processing method and the terminal with microphone of a kind of microphone of terminal
CN107957899A (en) * 2017-12-05 2018-04-24 广东欧珀移动通信有限公司 Record screen method, apparatus, computer-readable recording medium and a kind of mobile terminal
CN110809173A (en) * 2020-01-08 2020-02-18 成都索贝数码科技股份有限公司 Virtual live broadcast method and system based on AR augmented reality of smart phone
CN112071338A (en) * 2019-06-10 2020-12-11 海信视像科技股份有限公司 Recording control method and device and display equipment
CN113971969A (en) * 2021-08-12 2022-01-25 荣耀终端有限公司 Recording method, device, terminal, medium and product
CN115225917A (en) * 2021-04-15 2022-10-21 北京字节跳动网络技术有限公司 Recording plug-flow method, device, equipment and medium
CN116682465A (en) * 2022-10-31 2023-09-01 荣耀终端有限公司 Method for recording content and electronic equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61233472A (en) * 1985-04-08 1986-10-17 Sony Corp Recording system for digital audio data
CN1811958A (en) * 2005-01-24 2006-08-02 乐金电子(惠州)有限公司 Audio data recording and replaying equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61233472A (en) * 1985-04-08 1986-10-17 Sony Corp Recording system for digital audio data
CN1811958A (en) * 2005-01-24 2006-08-02 乐金电子(惠州)有限公司 Audio data recording and replaying equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
唐杰: "移动终端的录音功能的研究与实现", 《中国优秀硕士学位论文全文数据库信息科技辑》, no. 2, 15 February 2007 (2007-02-15), pages 136 - 281 *

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103491252A (en) * 2013-09-24 2014-01-01 北京奇虎科技有限公司 Method and device for achieving voice recording on mobile phone based on iOS
CN103491252B (en) * 2013-09-24 2016-07-06 北京奇虎科技有限公司 Based on the method and apparatus realizing calling record on the mobile phone of iOS
CN104394264A (en) * 2014-10-16 2015-03-04 来安县新元机电设备设计有限公司 Method and system of preventing recording interruption
CN106897146A (en) * 2017-02-09 2017-06-27 青岛海信移动通信技术股份有限公司 The data processing method and the terminal with microphone of a kind of microphone of terminal
CN107957899A (en) * 2017-12-05 2018-04-24 广东欧珀移动通信有限公司 Record screen method, apparatus, computer-readable recording medium and a kind of mobile terminal
CN107957899B (en) * 2017-12-05 2021-06-22 Oppo广东移动通信有限公司 Screen recording method and device, computer readable storage medium and mobile terminal
CN112071338A (en) * 2019-06-10 2020-12-11 海信视像科技股份有限公司 Recording control method and device and display equipment
CN110809173A (en) * 2020-01-08 2020-02-18 成都索贝数码科技股份有限公司 Virtual live broadcast method and system based on AR augmented reality of smart phone
CN110809173B (en) * 2020-01-08 2020-05-05 成都索贝数码科技股份有限公司 Virtual live broadcast method and system based on AR augmented reality of smart phone
CN115225917A (en) * 2021-04-15 2022-10-21 北京字节跳动网络技术有限公司 Recording plug-flow method, device, equipment and medium
CN113971969A (en) * 2021-08-12 2022-01-25 荣耀终端有限公司 Recording method, device, terminal, medium and product
CN116682465A (en) * 2022-10-31 2023-09-01 荣耀终端有限公司 Method for recording content and electronic equipment

Also Published As

Publication number Publication date
CN103280232B (en) 2016-06-08

Similar Documents

Publication Publication Date Title
CN103280232B (en) audio recording method, device and terminal device
CN105005909A (en) Method and device for predicting lost users
CN103500002A (en) Method, device and terminal equipment for managing application program
CN103309673A (en) Session processing method and device based on gesture, and terminal equipment
CN104427083A (en) Volume adjusting method and device
CN103389863A (en) Display control method and device
CN104978176A (en) Application program interface calling method and device
CN103559731B (en) Method and terminal for displaying lyrics under screen locking state
CN104093189A (en) Multimedia playing device network initialization method, system, device and terminal
CN103269374A (en) Method, device and equipment for recording synchronization
CN104427074A (en) Method, device and system for displaying incoming information
CN104852885A (en) Method, device and system for verifying verification code
CN103399633A (en) Wireless remote control method and mobile terminal
CN103365419A (en) Method and device for triggering alarm clock control command
CN104717341A (en) Message prompting method and terminal
CN103458124A (en) Shutdown processing method, device and terminal equipment for terminal
CN104065693A (en) Method, device and system for accessing network data in webpage applications
CN103368828B (en) A kind of message temporary storage and system
CN104423822A (en) Automated test script recording method and device
CN104123276A (en) Method, device and system for intercepting popup windows in browser
CN103312597A (en) Voice message generating method and voice message generating device
CN103561400A (en) Method for initiating communication, device thereof and mobile terminal
CN103399705A (en) Method, device and equipment for remotely controlling terminal equipment
CN103399911A (en) Access processing method, device and terminal device on basis of browser client
CN104917905A (en) Strange incoming call processing method, terminal and server

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent of invention or patent application
CB02 Change of applicant information

Address after: 100102 Beijing Wangjing West Road, a volume of stone world building, A, block, floor 12

Applicant after: Xiaomi Technology Co., Ltd.

Address before: 100102 Beijing Wangjing West Road, a volume of stone world building, A, block, floor 12

Applicant before: Beijing Xiaomi Technology Co., Ltd.

C53 Correction of patent of invention or patent application
CB02 Change of applicant information

Address after: 100085 Beijing city Haidian District Qinghe Street No. 68 Huarun colorful city shopping center two floor 13

Applicant after: Xiaomi Technology Co., Ltd.

Address before: 100102 Beijing Wangjing West Road, a volume of stone world building, A, block, floor 12

Applicant before: Xiaomi Technology Co., Ltd.

C14 Grant of patent or utility model
GR01 Patent grant