CN115248657A - Audio processing method, device and computer readable storage medium - Google Patents
Audio processing method, device and computer readable storage medium Download PDFInfo
- Publication number
- CN115248657A CN115248657A CN202110462372.6A CN202110462372A CN115248657A CN 115248657 A CN115248657 A CN 115248657A CN 202110462372 A CN202110462372 A CN 202110462372A CN 115248657 A CN115248657 A CN 115248657A
- Authority
- CN
- China
- Prior art keywords
- recording
- audio processing
- processing method
- storage module
- computer readable
- 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.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G11—INFORMATION STORAGE
- G11C—STATIC STORES
- G11C7/00—Arrangements for writing information into, or reading information out from, a digital store
- G11C7/16—Storage of analogue signals in digital stores using an arrangement comprising analogue/digital [A/D] converters, digital memories and digital/analogue [D/A] converters
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0638—Organizing or formatting or addressing of data
- G06F3/064—Management of blocks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0655—Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
- G06F3/0656—Data buffering arrangements
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Signal Processing For Digital Recording And Reproducing (AREA)
Abstract
The application provides an audio processing method, an audio processing device and a computer readable storage medium, wherein the method comprises the following steps: configuring recording parameters; setting the monitoring callback of the recording; starting recording, and storing recording data into a storage module; and when detecting that the recording stops, playing the recording data stored by the storage module. According to the audio processing method, the recording is stored by the storage module and is played immediately after the recording is finished, and the beneficial effects that the recording content is played without pause and in seamless connection are achieved.
Description
Technical Field
The present application relates to the field of audio processing technologies, and in particular, to an audio processing method and apparatus, and a computer-readable storage medium.
Background
The existing recording playing method usually has obvious pause feeling between the end of recording and the playing of the recording, and the uncertain pause feeling can influence the experience of users because of being uncontrollable.
For example, in musical instrument performance, a player can only play one track at a time, and in order to realize the performance effect of single ensemble, the performance process needs to be recorded and played again. The pause feeling from the end of recording to the playing of recording can obviously affect the matching difficulty and the playing quality of single multi-track playing.
Disclosure of Invention
In view of the foregoing, the present application provides an audio processing method, an audio processing apparatus, and a computer-readable storage medium.
An audio processing method, comprising:
configuring recording parameters;
setting a monitoring callback of the recording;
starting recording, and storing the recording data into a storage module;
and when detecting that the recording is stopped, playing the recording data stored by the storage module.
In at least one embodiment, the recording parameters include a sampling rate, a number of channels, and a size of the storage module.
In at least one embodiment, the recording parameter further includes a preset recording duration.
In at least one embodiment, the recording stops, comprising: and the recording time length reaches the preset recording time length.
In at least one embodiment, the storage module comprises an Audio Track module, the method further comprising:
and initializing the Audio _ Track module according to the recording parameters.
In at least one embodiment, the format of the audio recording data includes a PCM format.
In at least one embodiment, before the step of configuring the sound recording parameters, the method further includes:
applying for recording authority and recording data read-write authority.
An embodiment of the present application provides an audio processing apparatus, which includes a sampler, a speaker, a processor, and a memory, where the memory stores a plurality of computer readable instructions, and the processor is configured to implement the steps of the audio processing method as described above when executing the computer readable instructions stored in the memory.
The present application provides a computer storage medium for storing computer readable instructions, which when executed by a processor implement the steps of the audio processing method as described above.
Compared with the prior art, the audio processing method realizes seamless playing of the recorded content after the recording is finished by storing the recording through the storage module and playing the recording immediately after the recording is finished, and has the advantages of no pause and seamless connection.
Drawings
The above and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 is a flowchart illustrating an audio processing method according to an embodiment of the present application;
fig. 2 is a schematic diagram of an audio processing apparatus according to an embodiment of the present application.
Description of the main elements
Computer readable instructions 1005
The following detailed description will further illustrate the present application in conjunction with the above-described figures.
Detailed Description
So that the manner in which the above recited objects, features and advantages of the present invention can be understood in detail, a more particular description of the invention, briefly summarized above, may be had by reference to the embodiments thereof which are illustrated in the appended drawings. In addition, the embodiments and features of the embodiments of the present application may be combined with each other without conflict.
In the following description, numerous specific details are set forth to provide a thorough understanding of the present invention, and the described embodiments are merely a subset of the embodiments of the present invention, rather than a complete embodiment.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
Referring to fig. 1, the present application provides an audio processing method, including:
s11: configuring recording parameters;
s12: setting the monitoring callback of the recording;
s13: starting recording, and storing recording data into a storage module;
s14: and when detecting that the recording is stopped, playing the recording data stored in the storage module.
The monitored event is recording call-back, the recording data is called in the call-back, and when the recording is monitored to stop, the recording data stored in the storage module is called immediately and output, so that the recording data can be played quickly and seamlessly.
In one embodiment, the recording parameters include a sampling rate, a number of channels, and a size of the storage module.
Wherein the sampling rate can be 44.1kHz or 48kHz, and the number of channels can be single channel or double channels. The audio data collected by recording is firstly placed in the storage module. The storage module is too small, which may cause the initialization of partial recording data to fail, and the storage module is too large, which may affect the reading speed, so the size of the storage module needs to be determined according to the sampling rate and the number of channels.
In an embodiment, the recording parameter further includes a preset recording duration. The preset recording duration is set to control the recording time, and empty recording sections existing due to automatic detection of recording stop are reduced.
In one embodiment, the recording is stopped, comprising: the recording duration reaches the preset recording duration. The method for stopping recording the sound can also be controlled by using preset time length, so that the recording time length is accurately controlled, and the condition that an empty recording section exists due to the fact that the recording stop is detected is avoided. In addition, the user can actively input an instruction to stop recording, and the use experience of the user can be improved conveniently by various control modes.
In one embodiment, the storage module includes an Audio _ Track module, which may be initialized according to the recording parameters.
The Android system can adopt two schemes of MediaPlayer and Audio _ Track to play Audio, generally, mediaPlayer can play more format sound files and is widely applied, but because MediaPlayer can also create Audio _ Track in the frame layer, the response speed is slightly slow, so that the Audio _ Track is often adopted in occasions with high requirements on the real-time response speed of Audio.
In one embodiment, the format of the audio record data includes a PCM format. Audio Track can only play PCM format data streams.
In an embodiment, before the step of configuring the recording parameters, the method further includes:
applying for recording authority and recording data read-write authority.
The recording permission and the read-write permission are obtained, so that the recording data can be conveniently sampled, written and read subsequently.
Referring to fig. 2, an audio processing apparatus 100 according to an embodiment of the present invention is provided, where the audio processing apparatus 100 includes a sampler 1001, a speaker 1002, a processor 1003, and a memory 1004, the memory 1004 stores a plurality of computer readable instructions 1005, and the processor 1003 is configured to implement the steps of the audio processing method as described above when executing the computer readable instructions 1005 stored in the memory 1004. The audio processing device 100 may also include a communication bus 1006. The sampler 1001 may include a microphone, a sound pickup, a recording sound card, or other recordable device.
It is to be understood that the illustrated structure of the present embodiment does not constitute a specific limitation to the audio processing apparatus 100. In other embodiments, the audio processing device 100 may include more or fewer components than illustrated, or combine certain components, or split certain components, or a different arrangement of components.
The processor 1003 may include one or more processing units, and different processing units may be independent devices or may be integrated in one or more of the processors 1003.
The processor 1003 may also be provided with a memory 1004 for storing instructions and data. In some embodiments, the memory 1004 in the processor 1003 is a cache 1004. The memory 1004 may hold instructions or data that have just been used or recycled by the processor 1003. If the processor 1003 needs to use the instruction or data again, it can be called directly from the memory 1004. Avoiding repeated accesses reduces the latency of the processor 1003, thereby increasing the efficiency of the system.
In some embodiments, the processor 1003 may include one or more interfaces. The interface may include an integrated circuit (I2C) interface, an integrated circuit built-in audio (I2S) interface, a Pulse Code Modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a mobile industry processor 1003 (mobile industry processor interface, MIPI), a general-purpose-output (GPIO) interface, a SIM interface, and/or a USB interface, etc.
In some embodiments, the memory 1004 may include high-speed random access memory 1004, and may also include non-volatile memory 1004 such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one piece of disk storage 1004, a Flash memory device, or other piece of volatile solid-state storage 1004.
The embodiment of the present application provides a computer storage medium for storing computer readable instructions, which when executed by the processor 1003, implement the steps of the audio processing method as described above.
All or part of the flow of the method of the embodiments may be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, read-Only Memory (ROM), random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
In the embodiments provided by the present invention, it should be understood that the disclosed computer apparatus and method may be implemented in other manners. For example, the above-described embodiments of the computer device are merely illustrative, and for example, the division of the units is only one logical function division, and other division manners may be available in actual implementation.
In addition, functional units in the embodiments of the present invention may be integrated into the same processing unit, or each unit may exist alone physically, or two or more units are integrated into the same unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive. Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or computer means recited in computer means claims may also be implemented by one and the same unit or computer means in software or hardware. The terms first, second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.
Claims (9)
1. An audio processing method, comprising:
configuring recording parameters;
setting the monitoring callback of the recording;
starting recording, and storing the recording data into a storage module;
and when detecting that the recording stops, playing the recording data stored by the storage module.
2. The audio processing method of claim 1, wherein the recording parameters include a sampling rate, a number of channels, and a size of the storage module.
3. The audio processing method of claim 2, wherein the recording parameters further include a preset recording duration.
4. The audio processing method of claim 3, wherein the recording stops, comprising: and the recording time length reaches the preset recording time length.
5. The Audio processing method of claim 1, wherein the storage module comprises an Audio Track module, the method further comprising:
and initializing the Audio _ Track module according to the recording parameters.
6. The audio processing method as claimed in claim 5, wherein the format of the recording data includes a PCM format.
7. The audio processing method of claim 1, wherein the step of configuring the recording parameters is preceded by the step of:
applying for recording authority and recording data read-write authority.
8. An audio processing apparatus comprising a sampler, a speaker, a processor and a memory, the memory storing computer readable instructions, wherein the processor is configured to implement the steps of the audio processing method according to any one of claims 1 to 7 when executing the computer readable instructions stored in the memory.
9. A computer storage medium storing computer readable instructions for implementing the steps of the audio processing method according to any one of claims 1 to 7 when executed by a processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110462372.6A CN115248657A (en) | 2021-04-27 | 2021-04-27 | Audio processing method, device and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110462372.6A CN115248657A (en) | 2021-04-27 | 2021-04-27 | Audio processing method, device and computer readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115248657A true CN115248657A (en) | 2022-10-28 |
Family
ID=83696077
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110462372.6A Pending CN115248657A (en) | 2021-04-27 | 2021-04-27 | Audio processing method, device and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115248657A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117636504A (en) * | 2023-11-28 | 2024-03-01 | 镁佳(北京)科技有限公司 | Automatic detection system for voice broadcast of automobile instrument |
-
2021
- 2021-04-27 CN CN202110462372.6A patent/CN115248657A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117636504A (en) * | 2023-11-28 | 2024-03-01 | 镁佳(北京)科技有限公司 | Automatic detection system for voice broadcast of automobile instrument |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10657964B2 (en) | Method for controlling smart device, computer device and storage medium | |
US20200328903A1 (en) | Method and apparatus for waking up via speech | |
CN111381954A (en) | Audio data recording method, system and terminal equipment | |
CN101599285A (en) | A kind of audio recording method and system | |
KR100931843B1 (en) | Multimedia processor chip and audio signal processing method | |
CN115248657A (en) | Audio processing method, device and computer readable storage medium | |
US5815583A (en) | Audio serial digital interconnect | |
CN112397102A (en) | Audio processing method and device and terminal | |
CN110704015A (en) | Speed regulation method for audio playing, storage medium and electronic equipment | |
CN112053699B (en) | Method and device for processing sound changing of game card | |
KR20010069858A (en) | System and method for playing multimedia file | |
US20050016364A1 (en) | Information playback apparatus, information playback method, and computer readable medium therefor | |
US8374712B2 (en) | Gapless audio playback | |
WO2022135105A1 (en) | Video dubbing method and apparatus for functional machine, terminal device and storage medium | |
RU2005140656A (en) | METHOD AND DEVICE FOR PLAYING AUDIO-VISUAL DATA IN INTERACTIVE MODE, AND A MEDIA FOR IT | |
CN115249490A (en) | Multi-track audio processing method and device and computer storage medium | |
US20040117547A1 (en) | Information processing apparatus and information processing method | |
CN111161712A (en) | Voice data processing method and device, storage medium and computing equipment | |
KR20150078239A (en) | Music source information provide method by media of vehicle | |
CN115346501A (en) | Audio saving method and device and computer storage medium | |
WO2005104125A1 (en) | Record reproducing device, simultaneous record reproduction control method and simultaneous record reproduction control program | |
KR20200138643A (en) | Methods and apparatuses for controlling voice of electronic devices, computer device and storage media | |
US8121713B2 (en) | Electronic apparatus, method for generating digital signal, digital signal recording medium, and signal processing apparatus | |
CN110246495A (en) | Information processing method and electronic equipment | |
KR100558991B1 (en) | Method for reverse-playing audio data in personal digital Assistant |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |