Headphone control method, device, headphone and medium

By detecting the working mode of the headset and appropriately adjusting the buffer size, the problem of Bluetooth headset's delay and anti-interference performance in game mode is solved, improving the user experience.

CN115426561BActive Publication Date: 2025-02-18GEER TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210910574.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-29
Publication Date
2025-02-18
Estimated Expiration
2042-07-29

AI Technical Summary

Technical Problem

In order to optimize the delay in the game mode, Bluetooth headsets reduce cache buffers, resulting in poor anti-interference performance. Users are prone to feeling lag when playing music in games or background, and the user experience is poor.

Method used

By detecting the current working mode of the headset, if it is game mode and continuous audio mode, the buffer value of the configuration buffer is a larger first buffer value; if it is game mode and non-continuous audio mode, the buffer is configured The buffer value is a smaller second buffer value; if it is non-game mode, the buffer value of the buffer is configured to be the third buffer value to ensure that the buffer size is appropriately adjusted in different modes to optimize latency and anti-interference performance.

Benefits of technology

Adjust the buffer size appropriately in game mode to ensure delay and avoid user experience lag; maximize the buffer size in non-game mode to avoid audio lag and improve user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115426561B_ABST
    Figure CN115426561B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method, device, headset and medium for controlling headsets. The method includes: detecting the current working mode of the headset; when it is detected that the current working mode is a game mode and the game mode is a continuous audio mode, configuring the buffer value of the buffer zone of the headset to be a first buffer value; when it is detected that the current working mode is a game mode and the game mode is a discontinuous audio mode, configuring the buffer value to be a second buffer value; wherein the first buffer value is greater than the second buffer value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the technical field of intelligent electronic devices, and more specifically, to a method for controlling an earphone, an apparatus for controlling an earphone, an earphone, and a computer-readable storage medium. Background Art

[0002] In the related art, the audio path of the Bluetooth headset when playing audio is to first cache the received encoded audio data in a certain buffer, and then obtain the audio data from the buffer and decode it before playing. If the buffer is empty when obtaining audio data from the buffer, it will cause data underflow and jamming.

[0003] Most headphones now have a game mode. A key performance indicator of Bluetooth headphones in game mode is latency. When playing games, the headphones will be configured for game mode. In game mode, the cache buffer will be set smaller to reduce latency.

[0004] However, in order to optimize latency, the game mode reduces the buffer, which will cause the headset's anti-interference performance to deteriorate, and a slight interference will cause the sound to freeze. However, if the game the user is playing has background music or the user is playing music in the background, the freeze will be felt by the user in this case, and the user experience is poor. Summary of the invention

[0005] An object of the embodiments of the present disclosure is to provide a new technical solution for controlling headphones.

[0006] According to a first aspect of an embodiment of the present disclosure, a method for controlling an earphone is provided, the method comprising:

[0007] Detect the current working mode of the headset;

[0008] When it is detected that the current working mode is a game mode and the game mode is a continuous audio mode, configuring a buffer value of a buffer of the earphone to be a first buffer value;

[0009] When it is detected that the current working mode is a game mode and the game mode is a discontinuous audio mode, configuring the buffer value to be a second buffer value;

[0010] Wherein, the first buffer value is greater than the second buffer value.

[0011] Optionally, the method further comprises:

[0012] When it is detected that the current working mode is a non-gaming mode, configuring the buffer value to be a third buffer value;

[0013] The third buffer value is greater than the first buffer value.

[0014] Optionally, the method further comprises the step of acquiring the first buffer value, the second buffer value and the third buffer value.

[0015] The obtaining the first buffer value, the second buffer value, and the third buffer value includes:

[0016] Acquire set mapping data; wherein the mapping data is data reflecting the corresponding relationship between the encoding format of the headset, the working mode of the headset and the buffer value of the buffer;

[0017] According to the mapping data, a buffer value corresponding to the current encoding format of the headset and the continuous audio mode is determined as a first buffer value, a buffer value corresponding to the current encoding format of the headset and the discontinuous audio mode is determined as a second buffer value, and a buffer value corresponding to the current encoding format of the headset and the non-gaming mode is determined as a third buffer value.

[0018] Optionally, the method further comprises the step of detecting whether the game mode is a continuous audio mode,

[0019] The detecting whether the game mode is a continuous audio mode comprises:

[0020] Check whether there is a non-silent frame in the received voice frame;

[0021] When the non-silent frames are found, the non-silent frames are counted to obtain a count number;

[0022] When the counted number is greater than the set number, the game mode is determined to be a continuous audio mode.

[0023] Optionally, detecting whether the currently received voice frame is a non-silence frame includes:

[0024] Decoding the current speech frame received;

[0025] Determine whether at least one of the first set number of sample values ​​in the decoded current speech frame is not a first value;

[0026] When at least one of the first set number of sample values ​​in the decoded current speech frame is not the first value, the current speech frame is determined to be a non-silent frame.

[0027] Optionally, the method further comprises:

[0028] If the non-silent frame is not found, it is determined that the game mode is a non-continuous audio mode.

[0029] Optionally, the first buffer value is 150 ms, the second buffer value is 90 ms, and the third buffer value is 200 ms.

[0030] According to a second aspect of an embodiment of the present disclosure, a device for controlling an earphone is provided, the device comprising:

[0031] A detection module, used to detect the current working mode of the headset;

[0032] A first configuration module, configured to configure a buffer value of a buffer of the earphone to be a first buffer value when it is detected that the current working mode is a game mode and the game mode is a continuous audio mode;

[0033] A second configuration module is used to configure the buffer value to be a second buffer value when it is detected that the current working mode is the game mode and the game mode is the non-continuous audio mode;

[0034] The first buffer value is greater than the second buffer value.

[0035] According to a third aspect of an embodiment of the present disclosure, there is provided an earphone, the earphone comprising:

[0036] Memory for storing executable computer instructions;

[0037] A processor, configured to execute the headset control method according to the first aspect under the control of executable computer instructions;

[0038] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which computer instructions are stored. When the computer instructions are executed by a processor, the method for controlling the earphone according to the first aspect is executed.

[0039] One beneficial effect of the disclosed embodiment is that it detects the current working mode of the headset, and when the current working mode of the headset is the game mode, and the game mode is the continuous audio mode, it configures the buffer value of the headset buffer to be the first buffer value, and when the current working mode of the headset is the game mode, and the game mode is the discontinuous audio mode, it configures the buffer value of the buffer to be the second buffer value, and the first buffer value is greater than the second buffer value. That is, in the discontinuous audio mode, that is, in the game mode with occasional sound, it will reduce the buffer value of the buffer to ensure the delay and will not let the user experience the freeze, and in the continuous audio mode, that is, in the game mode with continuous audio, it will appropriately increase the buffer value of the buffer so that the user will not feel the freeze as much as possible.

[0040] Other features and advantages of the present specification will become apparent from the following detailed description of exemplary embodiments of the present specification with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the specification and, together with the description, serve to explain the principles of the specification.

[0042] Figure 1 is a schematic diagram of the hardware configuration of the headset according to an embodiment of the present disclosure;

[0043] Figure 2 is a flowchart of a method for controlling an earphone according to an embodiment of the present disclosure;

[0044] Figure 3 is a flowchart of a method for controlling an earphone according to an example of the present disclosure;

[0045] Figure 4 is a principle block diagram of a control device for headphones according to an embodiment of the present disclosure;

[0046] Figure 5 It is a principle block diagram of a headset according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0047] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that unless otherwise specifically stated, the relative arrangement of components and steps, numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the embodiments of the present disclosure.

[0048] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present disclosure, its application, or uses.

[0049] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered part of the specification.

[0050] In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not limiting. Therefore, other examples of the exemplary embodiments may have different values.

[0051] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0052] <Hardware Configuration>

[0053] Figure 1 is a block diagram of a hardware configuration of the headset 1000 according to an embodiment of the present disclosure.

[0054] like Figure 1As shown, the headset 1000 may be, for example, a Bluetooth headset, etc., which is not limited in the embodiments of the present disclosure.

[0055] In one embodiment, Figure 1 As shown, the headset 1000 may include a processor 1100, a memory 1200, an interface device 1300, a communication device 1400, a display device 1500, an input device 1600, a speaker 1700, a microphone 1800, and the like.

[0056] Among them, the processor 1100 may include but is not limited to a central processing unit CPU, a microprocessor MCU, etc. The memory 1200 includes, for example, a ROM (read-only memory), a RAM (random access memory), a non-volatile memory such as a hard disk, etc. The interface device 1300 includes, for example, various bus interfaces, such as a serial bus interface (including a USB interface), a parallel bus interface, etc. The communication device 1400 is, for example, capable of wired or wireless communication. The display device 1500 is, for example, a liquid crystal display, an LED display, a touch display, etc. The input device 1600 includes, for example, a touch screen, a keyboard, a handle, etc. The headset 1000 can output audio information through a speaker 1700 and can collect audio information through a microphone 1800.

[0057] It should be understood by those skilled in the art that although Figure 1 Multiple devices of the headset 1000 are shown in the figure, but the headset 1000 of the embodiment of this specification may only involve some of the devices, or may also include other devices, which is not limited here.

[0058] In this embodiment, the memory 1200 of the headset 1000 is used to store instructions, and the instructions are used to control the processor 1100 to operate to implement or support the implementation of the headset control method according to any embodiment. The technician can design instructions according to the scheme disclosed in this specification. How the instructions control the processor to operate is well known in the art, so it will not be described in detail here.

[0059] In the above description, the technician can design instructions according to the solution provided by the present disclosure. How instructions control the processor to operate is well known in the art, so it will not be described in detail here.

[0060] <Method Example>

[0061] Figure 2 A method for controlling an earphone according to an embodiment of the present disclosure is shown. The method for controlling an earphone can be performed as follows. Figure 1 The headset 1000 is implemented as shown, and the headset 1000 may be a Bluetooth headset.

[0062] like Figure 2As shown, the earphone control method provided by this embodiment may include the following steps S2100 to S2300.

[0063] Step S2100, detecting the current working mode of the headset.

[0064] In a specific embodiment, when an audio service is started on an electronic device side, such as a mobile phone side, that has established a communication connection with the headset, the headset will first detect the current working mode of the headset.

[0065] For example, when the audio service is started on the mobile phone side and an instruction to enter the game mode is sent to the headset, the headset will detect that the current working mode of the headset is the game mode.

[0066] For another example, when the mobile phone starts the audio service and sends a command to the headset to enter the non-gaming mode, the headset will detect that the current working mode of the headset is the non-gaming mode. When the headset detects that the current working mode is the non-gaming mode, the headset will configure the buffer value of the buffer to be the third buffer value, which is usually a relatively large value, so as to avoid audio freeze.

[0067] Specifically, when the current working mode is detected to be a non-gaming mode, the headset will configure the buffer value of the buffer as a third buffer value according to the current encoding format, wherein the current encoding format includes, for example but not limited to, SBC format, AAC format, APTX format, and LDAC format.

[0068] Exemplarily, when the current encoding format is the AAC format, the third buffer value may be 200 ms. It can be understood that when the third buffer value is 200 ms, the corresponding delay is approximately 260 ms.

[0069] Step S2200: When it is detected that the current working mode is the game mode and the game mode is the continuous audio mode, a buffer value of the buffer of the earphone is configured to be a first buffer value.

[0070] In this embodiment, when it is detected that the headset enters the game mode, it is necessary to further determine whether the game mode is a continuous audio mode or a discontinuous audio mode, and configure different buffer values ​​for the continuous audio mode and the discontinuous audio mode. Specifically, in the continuous audio mode, that is, in the continuous audio game mode, the headset will configure the buffer value of the buffer to be a first buffer value according to the current encoding format. The first buffer value is usually a larger value, so that the user will not feel the lag as much as possible, thereby greatly improving the user experience.

[0071] Exemplarily, when the current encoding format is the AAC format, the first buffer value may be 150 ms. It can be understood that when the first buffer value is 150 ms, the corresponding delay is approximately 210 ms.

[0072] Step S2300, when it is detected that the current working mode is the game mode and the game mode is the non-continuous audio mode, the buffer value is configured as the second buffer value.

[0073] In this embodiment, when it is detected that the headset enters the game mode, it is necessary to further determine whether the game mode is a continuous audio mode or a discontinuous audio mode, and configure different buffer values ​​for the continuous audio mode and the discontinuous audio mode. Specifically, in the discontinuous audio mode, that is, in the game mode with occasional sound, the headset will configure the buffer value of the buffer to be a second buffer value according to the current encoding format. The second buffer value is usually a smaller value, which can ensure the delay and prevent the user from experiencing lag.

[0074] Exemplarily, when the current encoding format is the AAC format, the second buffer value may be 90 ms. It can be understood that when the second buffer value is 90 ms, the corresponding delay is approximately 150 ms.

[0075] Moreover, the third buffer value is greater than the first buffer value, and the first buffer value is greater than the second buffer value. That is to say, in non-game mode, the buffer value of the buffer is the largest, and the delay is also relatively the largest, so that audio jamming can be avoided. For game mode, in continuous audio mode, since the buffer value of the buffer is between the first buffer value and the third buffer value, that is, the buffer value of the buffer is appropriately increased so that the user can feel no jamming as much as possible. For game mode, in non-continuous audio mode, since the buffer value of the buffer is the smallest, the delay is also relatively the smallest, so that while ensuring the delay, the user will not experience jamming.

[0076] According to the disclosed embodiment, it will detect the current working mode of the headset, and when the current working mode of the headset is the game mode, and the game mode is the continuous audio mode, it will configure the buffer value of the headset's buffer to be the first buffer value, and when the current working mode of the headset is the game mode, and the game mode is the discontinuous audio mode, it will configure the buffer value of the buffer to be the second buffer value, and the first buffer value is greater than the second buffer value. That is, in the discontinuous audio mode, that is, in the game mode with occasional sound, it will reduce the buffer value of the buffer to ensure the delay and will not let the user experience the freeze, and in the continuous audio mode, that is, in the game mode with continuous audio, it will appropriately increase the buffer value of the buffer so that the user will not feel the freeze as much as possible.

[0077] In one embodiment, the method for controlling the earphone of the embodiment of the present disclosure further includes the step of obtaining the first buffer value, the second buffer value and the third buffer value in step S3100. The step S3100 of obtaining the first buffer value, the second buffer value and the third buffer value may further include the following steps S3110 to S3120:

[0078] Step S3110, obtaining the set mapping data.

[0079] The mapping data is data reflecting the corresponding relationship between the coding format of the headset, the working mode of the headset and the buffer value of the buffer.

[0080] For example, mapping data 1 may be: the encoding format of the headset is AAC format, the working mode of the headset is non-gaming mode, and the buffer value of the buffer is 200ms. When the buffer value is 200ms, the corresponding delay is about 260ms.

[0081] For another example, mapping data 2 may be: the encoding format of the headset is AAC format, the working mode of the headset is the discontinuous audio mode in the game mode, and the buffer value of the buffer is 90ms. When the buffer value is 90ms, the corresponding delay is about 150ms.

[0082] For another example, mapping data 3 may be: the encoding format of the headset is AAC format, the working mode of the headset is continuous audio mode in game mode, and the buffer value of the buffer is 150ms. When the buffer value is 150ms, the corresponding delay is about 210ms.

[0083] Step S3120, based on the mapping data, determines the buffer value corresponding to the current encoding format and continuous audio mode of the headset as the first buffer value, determines the buffer value corresponding to the current encoding format and discontinuous audio mode of the headset as the second buffer value, and determines the buffer value corresponding to the current encoding format and non-game mode of the headset as the third buffer value.

[0084] In a specific embodiment, after obtaining the mapping data, the buffer value corresponding to the current encoding format and the continuous audio mode can be determined as the first buffer value according to the mapping data. For example, when the current encoding format is AAC format and the current working mode is the continuous audio mode, the first buffer value can be determined as 150ms according to the mapping data 3.

[0085] In a specific embodiment, after obtaining the mapping data, the buffer value corresponding to the current encoding format and the discontinuous audio mode can be determined as the second buffer value according to the mapping data. For example, when the current encoding format is AAC format and the current working mode is the discontinuous audio mode, the second buffer value can be determined to be 90ms according to the mapping data 2.

[0086] In a specific embodiment, after obtaining the mapping data, the buffer value corresponding to the current encoding format and the non-game mode can be determined as the third buffer value according to the mapping data. For example, when the current encoding format is AAC format and the current working mode is non-game mode, the third buffer value can be determined as 260ms according to mapping data 1.

[0087] According to the embodiment of the present disclosure, it is possible to obtain the buffer value of the buffer zone to be configured based on the mapping data, the current encoding format of the headset and the current working mode of the headset, and then configure the buffer value of the buffer zone of the headset to the buffer value of the obtained buffer zone, which can further improve the user experience.

[0088] In one embodiment, the method for controlling the headset of the embodiment of the present disclosure may further include step S4100 of detecting whether the game mode is a continuous audio mode. The step S4100 of detecting whether the game mode is a continuous audio mode may further include the following steps S4110 to S4140:

[0089] Step S4110, searching among the received voice frames to see whether there is a non-silent frame.

[0090] In a specific embodiment, when the audio service is started on the mobile phone side and an instruction to enter the game mode is sent to the headset, the headset will detect that the current working mode of the headset is the game mode. The default game mode is the non-continuous audio mode. Here, the headset can configure the buffer value of the buffer as the second buffer value. For how to configure the second buffer value, please refer to the above embodiment, and this embodiment will not be repeated here.

[0091] In this embodiment, it is possible to detect whether the current voice frame received is a non-silent frame. Here, detecting whether the current voice frame received is a silent frame may further include: decoding the current voice frame received; determining whether at least one of the first set number of sample values ​​in the decoded current voice frame is not a first numerical value; and determining that the current voice frame is a non-silent frame when at least one of the first set number of sample values ​​in the decoded current voice frame is not the first numerical value.

[0092] The first value is usually 0.

[0093] The set number may be 5. Of course, in order to ensure detection accuracy, the set number may also be set to an integer greater than 5. In order to ensure detection efficiency, the set number may also be set to an integer less than 5.

[0094] Exemplarily, during the playback of a speech frame, the first five sample values ​​of the speech frame after decoding the current speech frame can be analyzed. If the first five sample values ​​of the current speech frame after decoding are all 0, the current speech frame is determined to be a silent frame. If at least one of the first five sample values ​​of the current speech frame after decoding is not 0, the current speech frame is determined to be a non-silent frame.

[0095] Step S4120: If a non-silent frame is found, the non-silent frame is counted to obtain a count number, and if the count number is greater than a set number, the game mode is determined to be a continuous audio mode. Otherwise, if no non-silent frame is found, the game mode is determined to be a discontinuous audio mode.

[0096] The set number may be a value set according to actual application scenarios and actual needs. For example, the set number may be 50, or other values, which are not limited in this embodiment.

[0097] Continuing with the above example, it can be understood that when the game has background music or music is played in the background of the game, each voice frame is basically not a silent frame, so the count number cnt of non-silent frames starts from 0. When the count number cnt of non-silent frames is greater than the set number, for example, greater than 50, the game mode is determined to be a continuous audio mode. Here, the buffer value of the buffer can be set to the second buffer value. For how to configure the second buffer value, please refer to the above embodiment, which will not be described in detail in this embodiment. If no non-silent frame is found, it is determined that the game mode is still a non-continuous audio mode, and the buffer value of the buffer continues to be maintained at the second buffer value.

[0098] If the headset enters the continuous audio mode, it is determined to enter the discontinuous audio mode when a silent frame is detected. Here, the buffer value of the buffer zone can be set to the first buffer value. For how to configure the first buffer value, please refer to the above embodiment, which will not be described in detail in this embodiment.

[0099] <Example>

[0100] Next, an example of a method for controlling headphones is shown. In this example, the coding format of the headphones is AAC coding, combined with Figure 3 , the headset control method may further include:

[0101] Step S301: The headset establishes a communication connection with the mobile phone, and the mobile phone starts an audio service.

[0102] Step S302, the headset detects whether the current working mode of the headset is the game mode, if yes, execute step S303, otherwise, execute step S304.

[0103] Step S303, when the current working mode of the headset is non-gaming mode, obtain the buffer value of 200ms of the buffer corresponding to the non-gaming mode and AAC encoding according to the set mapping data, and configure the buffer value of the buffer to 200ms. The corresponding delay is approximately 260ms, and the process ends.

[0104] Step S304, when the current working mode of the headset is the game mode, the default game mode is the discontinuous audio mode. According to the set mapping data, the buffer value of 90ms of the buffer corresponding to the discontinuous audio mode and AAC encoding is obtained, and the buffer value of the buffer is configured to 90ms, and the corresponding delay is approximately 150ms.

[0105] It is understandable that before executing the above step S305, the headset may have been detected to enter the continuous audio mode, and according to the set mapping data, the buffer value of 150ms of the buffer corresponding to the continuous audio mode and AAC encoding is obtained, and the buffer value of the buffer is configured to be 150ms, and the corresponding delay is about 210ms. Of course, the headset may also remain in the non-continuous audio mode.

[0106] Step S305: the count number of non-silent frames cnt=0.

[0107] Step S306, decode the received current voice frame, and determine whether the first five sample values ​​in the decoded current voice frame are all 0. If yes, execute step S307, otherwise, execute step S309.

[0108] Step S307: the first five sample values ​​in the decoded current speech frame are all 0, and the current speech frame is determined to be a silence frame. At the same time, the count number of non-silence frames is reset to zero, that is, the count number of non-silence frames cnt=0.

[0109] Step S308, determine whether the current audio mode is continuous, if yes, execute the above step S306, otherwise, determine that the current audio mode is discontinuous, configure the buffer value of the buffer to 90ms, the corresponding delay is about 150ms, and the process ends.

[0110] Step S309, when at least one of the first five sample values ​​in the decoded current voice frame is not 0, determine that the current voice frame is a non-silent frame, and further determine whether the current mode is continuous audio. If yes, execute the above step S306, otherwise, execute step S310.

[0111] Step S310: the current mode is non-continuous audio mode, and the count number of non-silent frames cnt=cnt+1.

[0112] Step S311, determine whether the non-silent frame count cnt is greater than 50, if yes, execute step S312, otherwise, execute step S306.

[0113] Step S312, configure the buffer value of the buffer to be 150ms, and the corresponding delay is about 210ms.

[0114] Step S313, the count number of non-silent frames is reset to zero, that is, the count number of non-silent frames cnt=0, and the process ends.

[0115] <Device Example>

[0116] Figure 4 FIG. 1 is a schematic diagram of a method for controlling an earphone according to an embodiment. Figure 4 As shown, the control device 400 of the headset includes a detection module 410 , a first configuration module 420 and a second configuration module 430 .

[0117] Detect the current working mode of the headset.

[0118] When it is detected that the current working mode is the game mode and the game mode is the continuous audio mode, the buffer value of the buffer of the earphone is configured to be the first buffer value.

[0119] When it is detected that the current working mode is a game mode and the game mode is a non-continuous audio mode, the buffer value is configured as a second buffer value.

[0120] Wherein, the first buffer value is greater than the second buffer value.

[0121] In one embodiment, the apparatus 400 further includes a third configuration module (not shown in the figure).

[0122] The third configuration module is used to configure the buffer value to a third buffer value when it is detected that the current working mode is a non-gaming mode.

[0123] The third buffer value is greater than the first buffer value.

[0124] In one embodiment, the apparatus 400 further includes an acquisition module (not shown in the figure).

[0125] An acquisition module is used to acquire the first buffer value, the second buffer value and the third buffer value.

[0126] An acquisition module is specifically used to acquire set mapping data; wherein the mapping data is data reflecting the correspondence between the encoding format of the headset, the working mode of the headset and the buffer value of the buffer zone; according to the mapping data, the buffer value corresponding to the current encoding format of the headset and the continuous audio mode is determined as the first buffer value, the buffer value corresponding to the current encoding format of the headset and the non-continuous audio mode is determined as the second buffer value, and the buffer value corresponding to the current encoding format of the headset and the non-gaming mode is determined as the third buffer value.

[0127] In one embodiment, the detection module 410 is further used to detect whether the game mode is a continuous audio mode.

[0128] The detection module 410 is specifically used to search whether there are non-silent frames in the received voice frames; when the non-silent frames are found, the non-silent frames are counted to obtain the count number; when the count number is greater than the set number, the game mode is determined to be a continuous audio mode.

[0129] In one embodiment, the detection module 410 is also used to decode the current voice frame received; determine whether at least one of the first set number of sample values ​​in the decoded current voice frame is not a first value; if at least one of the first set number of sample values ​​in the decoded current voice frame is not the first value, determine that the current voice frame is a non-silent frame.

[0130] In one embodiment, the detection module 410 is further configured to determine that the game mode is a non-continuous audio mode when the non-silent frame is not found.

[0131] In one embodiment, the first buffer value is 150 ms, the second buffer value is 90 ms, and the third buffer value is 200 ms.

[0132] According to the disclosed embodiment, it will detect the current working mode of the headset, and when the current working mode of the headset is the game mode, and the game mode is the continuous audio mode, it will configure the buffer value of the headset's buffer to be the first buffer value, and when the current working mode of the headset is the game mode, and the game mode is the discontinuous audio mode, it will configure the buffer value of the buffer to be the second buffer value, and the first buffer value is greater than the second buffer value. That is, in the discontinuous audio mode, that is, in the game mode with occasional sound, it will reduce the buffer value of the buffer to ensure the delay and will not let the user experience the freeze, and in the continuous audio mode, that is, in the game mode with continuous audio, it will appropriately increase the buffer value of the buffer so that the user will not feel the freeze as much as possible.

[0133] <Equipment Embodiment>

[0134] Figure 5 FIG. 1 is a schematic diagram of the hardware structure of a wearable device according to an embodiment. Figure 5 As shown, the headset 500 includes a processor 510 and a memory 520 .

[0135] The memory 520 may be used to store executable computer instructions.

[0136] The processor 510 can be used to execute the headset control method according to the embodiment of the method of the present disclosure under the control of executable computer instructions.

[0137] The earphone 500 may be Figure 1 The headset 1000 shown may also be a device with other hardware structures, which is not limited here. The headset 500 may be, for example, a Bluetooth headset, which is not limited in the embodiment of the present disclosure.

[0138] In another embodiment, the headset 500 may include the control device 400 of the above headset.

[0139] In one embodiment, each module of the above headset control device 400 can be implemented by the processor 510 running computer instructions stored in the memory 520.

[0140] According to the disclosed embodiment, it will detect the current working mode of the headset, and when the current working mode of the headset is the game mode, and the game mode is the continuous audio mode, it will configure the buffer value of the headset's buffer to be the first buffer value, and when the current working mode of the headset is the game mode, and the game mode is the discontinuous audio mode, it will configure the buffer value of the buffer to be the second buffer value, and the first buffer value is greater than the second buffer value. That is, in the discontinuous audio mode, that is, in the game mode with occasional sound, it will reduce the buffer value of the buffer to ensure the delay and will not let the user experience the freeze, and in the continuous audio mode, that is, in the game mode with continuous audio, it will appropriately increase the buffer value of the buffer so that the user will not feel the freeze as much as possible.

[0141] <Computer Readable Storage Medium>

[0142] The embodiment of the present disclosure further provides a computer-readable storage medium on which computer instructions are stored. When the computer instructions are executed by a processor, the method for controlling the earphone provided by the embodiment of the present disclosure is executed.

[0143] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.

[0144] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.

[0145] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0146] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.

[0147] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0148] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0149] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0150] The flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of an instruction, and a part of a module, a program segment or an instruction contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of the boxes in the block diagram and / or the flowchart can be implemented by a dedicated hardware-based system that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that it is equivalent to implement it by hardware, implement it by software, and implement it by combining software and hardware.

[0151] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The choice of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the marketplace, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the present disclosure is defined by the appended claims.

Claims

1. A method for controlling headphones, characterized in that: The method comprises: Detect the current working mode of the headset; When it is detected that the current working mode is a game mode and the game mode is a continuous audio mode, a buffer value of the buffer of the headset is configured to be a first buffer value; wherein the continuous audio mode is a game mode when the count number of non-silent frames found in the received voice frames is greater than a set number; When it is detected that the current working mode is a game mode and the game mode is a discontinuous audio mode, the buffer value is configured as a second buffer value; wherein the discontinuous audio mode is a game mode when the non-silent frame is not found in the voice frame; The first buffer value is greater than the second buffer value and less than a third buffer value, and the third buffer value is a buffer value configured for the buffer area of ​​the headset when the current working mode is a non-gaming mode.

2. The method according to claim 1, characterized in that The method further comprises the steps of acquiring the first buffer value, the second buffer value and the third buffer value, The obtaining the first buffer value, the second buffer value, and the third buffer value includes: Acquire set mapping data; wherein the mapping data is data reflecting the corresponding relationship between the encoding format of the headset, the working mode of the headset and the buffer value of the buffer; According to the mapping data, a buffer value corresponding to the current encoding format of the headset and the continuous audio mode is determined as a first buffer value, a buffer value corresponding to the current encoding format of the headset and the discontinuous audio mode is determined as a second buffer value, and a buffer value corresponding to the current encoding format of the headset and the non-gaming mode is determined as a third buffer value.

3. The method according to claim 1, characterized in that The method further comprises the step of detecting whether the game mode is a continuous audio mode, The detecting whether the game mode is a continuous audio mode comprises: Check whether there is a non-silent frame in the received voice frame; When the non-silent frames are found, the non-silent frames are counted to obtain a count number; When the counted number is greater than the set number, the game mode is determined to be a continuous audio mode.

4. The method according to claim 3, characterized in that Detect whether the current voice frame received is a non-silent frame, including: Decoding the current speech frame received; Determine whether at least one of the first set number of sample values ​​in the decoded current speech frame is not a first value; When at least one of the first set number of sample values ​​in the decoded current speech frame is not the first value, the current speech frame is determined to be a non-silent frame.

5. The method according to claim 4, characterized in that The method further comprises: If the non-silent frame is not found, it is determined that the game mode is a non-continuous audio mode.

6. The method according to claim 1, characterized in that The first buffer value is 150 ms, the second buffer value is 90 ms, and the third buffer value is 200 ms.

7. A headset control device, characterized in that: The device comprises: A detection module, used to detect the current working mode of the headset; A first configuration module is used to configure the buffer value of the buffer of the headset to be a first buffer value when it is detected that the current working mode is a game mode and the game mode is a continuous audio mode; wherein the continuous audio mode is a game mode when the count number of non-silent frames found in the received voice frames is greater than a set number; A second configuration module is used to configure the buffer value to be a second buffer value when it is detected that the current working mode is a game mode and the game mode is a discontinuous audio mode; wherein the discontinuous audio mode is a game mode when the non-silent frame is not found in the voice frame; The first buffer value is greater than the second buffer value and less than the third buffer value, and the third buffer value is a buffer value configured for the buffer zone of the headset when the current working mode is a non-gaming mode.

8. A headset, characterized in that: The earphone comprises: Memory for storing executable computer instructions; A processor is used to execute the control method of the headset according to any one of claims 1-6 under the control of executable computer instructions.

9. A computer-readable storage medium having computer instructions stored thereon, wherein the computer instructions are executed by a processor to execute the method for controlling the earphone according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Adjustment method for audio data in different modes of Bluetooth headset

    CN108551358A

  • Transmission control method, device and electronic device

    CN109144463A