CN113360208B - Method for solving problem of voice awakening application occupying recording - Google Patents
Method for solving problem of voice awakening application occupying recording Download PDFInfo
- Publication number
- CN113360208B CN113360208B CN202110662222.XA CN202110662222A CN113360208B CN 113360208 B CN113360208 B CN 113360208B CN 202110662222 A CN202110662222 A CN 202110662222A CN 113360208 B CN113360208 B CN 113360208B
- Authority
- CN
- China
- Prior art keywords
- recording
- application
- voice awakening
- packet name
- voice
- 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.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44594—Unloading
-
- 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/16—Sound input; Sound output
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Audiology, Speech & Language Pathology (AREA)
- General Health & Medical Sciences (AREA)
- Human Computer Interaction (AREA)
- Telephonic Communication Services (AREA)
- Telephone Function (AREA)
Abstract
The invention discloses a method for solving the problem that a voice awakening application occupies a recording, which can automatically turn off the voice awakening when the recording application is started and automatically turn on the voice awakening when the recording is finished by adding a recording interception system service to a frame layer of an Android system, thereby effectively solving the complicated operation that a user needs to manually turn off the voice awakening and then record the recording and then manually turn on the voice awakening after the recording is finished, and improving the use experience of the user.
Description
Technical Field
The invention relates to the technical field of intelligent terminals, in particular to a method for solving the problem that voice awakening application occupies a recording.
Background
Due to the fact that software such as a voice awakening assistant exists in the Android terminal, the use experience of a user is greatly improved. However, the voice wake-up service resident background occupies the recording resource, and the recording is always waited for wake-up, so that other applications needing recording cannot record normally when calling the system recording method, and the recording function of the applications is influenced by normal use of the users. The common solutions are that a shortcut button is added in a notification bar of the terminal device, and a user manually closes or opens a voice to wake up, so that normal recording of other recording applications can be solved, but the method is not intelligent enough and consumes manual operation time of the user.
Disclosure of Invention
Aiming at the defects of the prior art, the invention aims to provide a method for solving the problem that a voice wake-up application occupies a recording.
In order to achieve the purpose, the invention adopts the following technical scheme:
a method for solving the problem that voice wake-up application occupies recording comprises the following specific processes:
adding a recording interception system service, namely, audio and media RecordService, in a frame layer of an Android system, wherein a method for starting recording startRecord and ending recording stopRecord is provided in the recording interception system service; the method for starting recording can judge whether the packet name of the current recording application is the same as the packet name of the voice awakening application, if the packet name of the current recording application is the same as the packet name of the voice awakening application, the recording is not processed, the voice is directly returned, and if the packet name of the current recording application is not the same as the packet name of the voice awakening application, the system method is called to kill the voice awakening application, and then the recording is returned to the beginning; the method for ending the recording can realize the function of opening the voice awakening application; the method comprises the steps that a startRecord (packageName) method and a stopRecord () method of a recording interception system service can be called respectively in a start () method and a stop () method of an Audio record or a MediaRecord type provided by an Android system;
when the recording application calls a start () method of an AudioRecord or MediaRecord class to start recording, transmitting the packet name of the current recording application to a startRecord (packageName) method of a recording interception system service, and judging whether the packet name of the current recording application is the same as the packet name of a voice wake-up application by the startRecord (packageName) method: if the packet name of the current recording application is different from the packet name of the voice awakening application, calling a system method forceStopPackage () method to kill the voice awakening application, and then returning to start recording; if the packet name of the current recording application is the same as that of the voice awakening application, directly returning to start recording without processing;
and after the recording application calls a stop () method of the Audio record or the Mediarecord class to stop recording, calling a stopRecord () method of the voice interception system service, opening the voice awakening application and recovering the voice awakening function.
The invention also provides a computer-readable storage medium having stored therein a computer program which, when executed by a processor, implements the above-described method.
The invention also provides an Android terminal, which comprises a processor and a memory, wherein the memory is used for storing the computer program; the processor is configured to implement the above method when executing the computer program.
The invention has the beneficial effects that: according to the method and the device, the recording interception system service is added on the frame layer of the Android system, the voice awakening can be automatically closed when the recording application is started, and the voice awakening can be automatically started when the recording is finished, so that the complicated operation that a user needs to manually close the voice awakening and then record, and manually open the voice awakening after the recording is finished can be effectively solved, and the use experience of the user is improved.
Detailed Description
The present invention will be further described below, and it should be noted that the present embodiment is based on the technical solution, and a detailed implementation manner and a specific operation process are provided, but the protection scope of the present invention is not limited to the present embodiment.
The embodiment provides a method for solving the problem that a voice wake-up application occupies a recording, which specifically comprises the following steps:
adding a recording interception system service, namely, audio and media RecordService, in a frame layer of an Android system, wherein a method for starting recording startRecord and ending recording stopRecord is provided in the recording interception system service; the method for starting recording can judge whether the packet name of the current recording application is the same as the packet name of the voice awakening application, if the packet name of the current recording application is the same as the packet name of the voice awakening application, the recording is not processed, the voice is directly returned, and if the packet name of the current recording application is not the same as the packet name of the voice awakening application, the system method is called to kill the voice awakening application, and then the recording is returned to the beginning; the method for ending the recording can realize the function of opening the voice awakening application; the startRecord (packagName) method and the stopRecord () method of the recording interception system service can be called respectively in the start () method and the stop () method of the Audio record or the MediaRecord class provided by the Android system.
When the recording application calls a start () method of an AudioRecord or MediaRecord class to start recording, transmitting the packet name of the current recording application to a startRecord (packageName) method of a recording interception system service, and judging whether the packet name of the current recording application is the same as the packet name of a voice wake-up application by the startRecord (packageName) method: if the packet name of the current recording application is different from the packet name of the voice awakening application, calling a system method forceStopPackage () method to kill the voice awakening application, and then returning to start recording; if the packet name of the current recording application is the same as that of the voice awakening application, directly returning to start recording without processing;
and after the recording application calls a stop () method of the Audio record or the Mediarecord class to stop recording, calling a stopRecord () method of the voice interception system service, opening the voice awakening application and recovering the voice awakening function.
Various corresponding changes and modifications can be made by those skilled in the art based on the above technical solutions and concepts, and all such changes and modifications should be included in the protection scope of the present invention.
Claims (3)
1. A method for solving the problem that voice awakening application occupies recording is characterized by comprising the following specific processes:
adding a recording interception system service, namely, audio and media RecordService, in a frame layer of an Android system, wherein a method for starting recording startRecord and ending recording stopRecord is provided in the recording interception system service; the method for starting recording can judge whether the packet name of the current recording application is the same as the packet name of the voice awakening application, if the packet name of the current recording application is the same as the packet name of the voice awakening application, the recording is not processed, the voice is directly returned, and if the packet name of the current recording application is not the same as the packet name of the voice awakening application, the system method is called to kill the voice awakening application, and then the recording is returned to the beginning; the method for ending the recording can realize the function of opening the voice awakening application; the method comprises the steps that a startRecord (packageName) method and a stopRecord () method of a recording interception system service can be called respectively in a start () method and a stop () method of an Audio record or a MediaRecord type provided by an Android system;
when the recording application calls a start () method of an AudioRecord or MediaRecord class to start recording, transmitting the packet name of the current recording application to a startRecord (packageaname) method of a recording interception system service, wherein the startRecord (packageaname) method judges whether the packet name of the current recording application is the same as the packet name of a voice wake-up application: if the packet name of the current recording application is different from the packet name of the voice awakening application, calling a system method forceStopPackage () method to kill the voice awakening application, and then returning to start recording; if the packet name of the current recording application is the same as that of the voice awakening application, directly returning to start recording without processing;
and after the recording application calls a stop () method of the AudioRecord or MediaRecord class to stop recording, calling a stop record () method of the voice interception system service, opening the voice awakening application and recovering the voice awakening function.
2. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method of claim 1.
3. An Android terminal, comprising a processor and a memory, the memory being configured to store a computer program; the processor, when executing the computer program, implementing the method of claim 1.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110662222.XA CN113360208B (en) | 2021-06-15 | 2021-06-15 | Method for solving problem of voice awakening application occupying recording |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110662222.XA CN113360208B (en) | 2021-06-15 | 2021-06-15 | Method for solving problem of voice awakening application occupying recording |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113360208A CN113360208A (en) | 2021-09-07 |
CN113360208B true CN113360208B (en) | 2022-11-25 |
Family
ID=77534272
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110662222.XA Active CN113360208B (en) | 2021-06-15 | 2021-06-15 | Method for solving problem of voice awakening application occupying recording |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113360208B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111524528A (en) * | 2020-05-28 | 2020-08-11 | Oppo广东移动通信有限公司 | Voice awakening method and device for preventing recording detection |
CN111583941A (en) * | 2020-05-07 | 2020-08-25 | 珠海格力电器股份有限公司 | Household appliance recording method and device, storage medium and household appliance |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5440935B2 (en) * | 2008-02-22 | 2014-03-12 | 日本電気株式会社 | IT system behavior measurement and analysis system and method thereof |
US11501879B2 (en) * | 2018-10-01 | 2022-11-15 | Preventice Technologies, Inc. | Voice control for remote monitoring |
KR20190106935A (en) * | 2019-08-30 | 2019-09-18 | 엘지전자 주식회사 | Intelligent voice recognizing method, apparatus, and intelligent computing device |
-
2021
- 2021-06-15 CN CN202110662222.XA patent/CN113360208B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111583941A (en) * | 2020-05-07 | 2020-08-25 | 珠海格力电器股份有限公司 | Household appliance recording method and device, storage medium and household appliance |
CN111524528A (en) * | 2020-05-28 | 2020-08-11 | Oppo广东移动通信有限公司 | Voice awakening method and device for preventing recording detection |
Non-Patent Citations (1)
Title |
---|
基于语音控制的智能门铃系统;赵人熳 等;《延安大学学报(自然科学版)》;20191231;第38卷(第4期);第46-49页 * |
Also Published As
Publication number | Publication date |
---|---|
CN113360208A (en) | 2021-09-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2010025644A1 (en) | Method and terminal for preventing interruption | |
CN102546890B (en) | Information detection method and information detection terminal | |
CN103002421B (en) | Anti-processing method, system and mobile communication terminal of bothering in a kind of call | |
CN104394271A (en) | Method for generating digital voice file of special contact person based on keywords | |
WO2014043876A1 (en) | Method for detecting interception behaviour and terminal device | |
WO2014166230A1 (en) | Automatic recording method, apparatus, and mobile terminal | |
CN113360208B (en) | Method for solving problem of voice awakening application occupying recording | |
US8077839B2 (en) | Handheld device for dialing of phone numbers extracted from a voicemail | |
CN101330693A (en) | Method, system and communication terminal for processing incoming call | |
US20170180551A1 (en) | Call processing method and apparatus | |
CN113316107A (en) | Calling method, terminal and computer storage medium | |
CN105959466B (en) | The treating method and apparatus of audio data | |
CN110545571B (en) | Internet of things terminal and function switching method thereof | |
CN107197080A (en) | A kind of incoming call processing method and mobile terminal | |
WO2016015550A1 (en) | Remote control method and apparatus for intelligent device | |
WO2017206620A1 (en) | Method and apparatus for setting state of application program | |
CN105827779A (en) | Method and device for controlling number blacklist | |
EP3144934A1 (en) | Audio play method and device | |
CN102289616A (en) | Method and system for guarding against malicious system resource invasion in mobile intelligent terminal | |
US10440527B2 (en) | Message management method and device | |
WO2013044768A1 (en) | Method for updating and authenticating qualcomm chat mobile terminal, and mobile terminal | |
CN113359992A (en) | Method for solving camera occupation problem of gesture recognition application | |
CN107205092B (en) | Storage device, mobile terminal and voice secret playing method thereof | |
CN107368177B (en) | Power saving method and power saving device for intelligent equipment | |
CN113890934B (en) | Call transfer setting method, device, storage medium, controller and communication equipment |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |