CN113031904B - Control method and electronic equipment - Google Patents

Control method and electronic equipment Download PDF

Info

Publication number
CN113031904B
CN113031904B CN202110319787.8A CN202110319787A CN113031904B CN 113031904 B CN113031904 B CN 113031904B CN 202110319787 A CN202110319787 A CN 202110319787A CN 113031904 B CN113031904 B CN 113031904B
Authority
CN
China
Prior art keywords
sound
document
value
output device
sound output
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
Application number
CN202110319787.8A
Other languages
Chinese (zh)
Other versions
CN113031904A (en
Inventor
刘扬
邹辉
刘金
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN202110319787.8A priority Critical patent/CN113031904B/en
Publication of CN113031904A publication Critical patent/CN113031904A/en
Application granted granted Critical
Publication of CN113031904B publication Critical patent/CN113031904B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/16Sound input; Sound output
    • G06F3/165Management of the audio stream, e.g. setting of volume, audio stream path
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L25/00Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00
    • G10L25/03Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 characterised by the type of extracted parameters
    • G10L25/18Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 characterised by the type of extracted parameters the extracted parameters being spectral information of each sub-band
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L25/00Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00
    • G10L25/03Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 characterised by the type of extracted parameters
    • G10L25/21Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 characterised by the type of extracted parameters the extracted parameters being power information

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computational Linguistics (AREA)
  • Acoustics & Sound (AREA)
  • Theoretical Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Spectroscopy & Molecular Physics (AREA)
  • Circuit For Audible Band Transducer (AREA)

Abstract

The application discloses a control method and electronic equipment, wherein the method comprises the following steps: under the condition that the sound output device outputs sound signals according to the first sound document, obtaining a second sound document corresponding to the sound signals output by the sound output device; performing spectrum analysis on the first sound document and the second sound document to obtain an analysis result; and in the case that the analysis result represents that the first sound document and the second sound document do not meet the sound similarity condition, adjusting the sound output parameters of the sound output device so that the first sound document and the second sound document meet the sound similarity condition.

Description

Control method and electronic equipment
Technical Field
The present application relates to the field of audio playback technologies, and in particular, to a control method and an electronic device.
Background
With the development of technology, audio playing products are increasing. The audio playing effect of each product is fixed, so that the playing effect is single in some cases.
Disclosure of Invention
In view of this, the present application provides a control method and an electronic device, as follows:
A control method, comprising:
under the condition that the sound output device outputs sound signals according to the first sound document, obtaining a second sound document corresponding to the sound signals output by the sound output device;
performing spectrum analysis on the first sound document and the second sound document to obtain an analysis result;
and in the case that the analysis result represents that the first sound document and the second sound document do not meet the sound similarity condition, adjusting the sound output parameters of the sound output device so that the first sound document and the second sound document meet the sound similarity condition.
In the above method, preferably, before the sound output device outputs the sound signal according to the first sound document, the method further includes:
acquiring equipment posture information of electronic equipment where the sound output equipment is located;
and setting initial sound output parameters of the sound output device according to the device posture information, wherein the initial sound output parameters correspond to the device posture information, so that the sound output device outputs sound signals according to the initial sound output parameters and the first sound document.
In the above method, preferably, performing spectral analysis on the first sound document and the second sound document to obtain an analysis result includes:
obtaining a first sound amplitude value corresponding to each sound frequency point in the first sound file;
obtaining a second sound amplitude value corresponding to each sound frequency point in the second sound file;
and obtaining an analysis result according to the first sound amplitude value and the second sound amplitude value, wherein the analysis result represents the reduction degree between the first sound document and the second sound document.
In the above method, preferably, obtaining an analysis result according to the first sound amplitude value and the second sound amplitude value includes:
obtaining a first amplitude difference value on the same sound frequency point according to the first sound amplitude value and the second sound amplitude value;
obtaining a difference variance according to a first amplitude difference value on the sound frequency point, wherein the difference variance represents the reduction degree between the first sound document and the second sound document;
wherein the degree of restoration of the second sound document with respect to the first sound document satisfies a sound similarity condition in a case where the difference variance is less than or equal to a first variance threshold, and the degree of restoration of the second sound document with respect to the first sound document does not satisfy the sound similarity condition in a case where the difference variance is greater than the first variance threshold.
In the above method, preferably, adjusting the sound output parameter of the sound output device includes:
obtaining third sound amplitude values corresponding to the first sound document on a plurality of frequency bands, wherein the frequency bands are obtained by dividing frequency spectrums corresponding to the first sound document, and the frequency bands comprise a plurality of sound frequency points;
obtaining fourth sound amplitude values corresponding to a plurality of frequency bands in the second sound document;
obtaining a second amplitude difference between the corresponding third and fourth sound amplitude values over the frequency band;
obtaining a corresponding parameter adjustment value on the frequency band according to the second amplitude difference value and a frequency band amplitude reference value; the frequency band amplitude reference value is obtained by averaging the corresponding second amplitude differences on all the frequency bands;
and adjusting the sound output parameters corresponding to the frequency band of the sound output equipment according to the parameter adjustment value.
In the above method, preferably, before adjusting the sound output parameters corresponding to the sound output device on the frequency band according to the parameter adjustment value, the method further includes:
Obtaining a sound playing type corresponding to a current user of the sound output device, and determining at least one target frequency band in the plurality of frequency bands according to the sound playing type;
wherein adjusting the sound output parameters corresponding to the frequency band by the sound output device according to the parameter adjustment value includes:
and adjusting the corresponding sound output parameters of the sound output equipment on the target frequency band according to the parameter adjustment values corresponding to the target frequency band.
In the above method, preferably, the target frequency band is obtained according to a historical sound document corresponding to the current user on the sound output device, and the target frequency band is obtained by analyzing a sound energy distribution state on a frequency band included in the historical sound document.
In the above method, preferably, the electronic device where the sound output device is located further has a communication module, where the communication module is used for transmitting the sound document to other devices connected to the electronic device;
wherein the method further comprises:
acquiring a third sound document transmitted to other equipment through the communication module in the process that the other equipment transmits the sound document to any application configured by the electronic equipment;
Obtaining a signal loss value between the third sound document and the second sound document, the signal loss value characterizing a similarity between the third sound document and the second sound document;
and adjusting the sound output parameter of the sound output device under the condition that the signal loss value is smaller than or equal to a loss threshold value.
In the above method, preferably, the electronic device where the sound output device is located further has a sound collecting device; the obtaining the second sound document corresponding to the sound signal output by the sound output device includes:
collecting the sound signals output by the sound output device by utilizing a sound collecting device to obtain corresponding second sound documents;
in the process that any application on the electronic equipment transmits sound documents to other equipment, a fourth sound document obtained by collecting sound signals through the sound collecting equipment is obtained;
obtaining sound signal parameters corresponding to the fourth sound document, wherein the sound signal parameters represent signal energy of the fourth sound document;
and under the condition that the sound signal parameter meets the gain control condition, adjusting the acquisition gain value of the sound acquisition equipment so that the sound acquisition equipment acquires the sound signal with the adjusted gain value.
An electronic device, comprising:
a sound output device;
a processor for: under the condition that the sound output device outputs sound signals according to the first sound file, a second sound file corresponding to the sound signals output by the sound output device is obtained; performing spectrum analysis on the first sound document and the second sound document to obtain an analysis result; and in the case that the analysis result represents that the first sound document and the second sound document do not meet the sound similarity condition, adjusting the sound output parameters of the sound output device so that the first sound document and the second sound document meet the sound similarity condition.
According to the control method and the electronic device, the analysis result representing whether the two sound documents meet the sound similarity condition is obtained by analyzing the original sound document of the sound signal output by the sound output device and the sound document obtained by signal acquisition after the output, and based on the analysis result, the two sound documents meet the sound similarity condition by adjusting the sound output parameters of the sound signal output by the sound output device under the condition that the two sound documents do not meet the sound similarity condition, so that the sound output device can provide the sound playing effect close to the original sound document for a user through the adjustment of the sound output parameters no matter what type or source of the sound document, and the defect that any sound signal in the electronic device can only achieve a single playing sound effect is avoided.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a control method according to a first embodiment of the present application;
FIGS. 2-3 are diagrams illustrating applications of embodiments of the present application, respectively;
FIG. 4 is another flow chart of a control method according to the first embodiment of the present application;
FIG. 5 is a partial flow chart of a control method according to a first embodiment of the present application;
FIGS. 6-7 are diagrams illustrating another application example of the embodiment of the present application, respectively;
FIG. 8 is a flow chart of another part of a control method according to the first embodiment of the present application;
FIG. 9 is a diagram illustrating another application example of the embodiment of the present application;
FIG. 10 is a flow chart of another part of a control method according to the first embodiment of the present application;
FIG. 11 is a diagram illustrating another application example of the embodiment of the present application;
FIGS. 12-13 are flow charts respectively showing another part of a control method according to the first embodiment of the present application;
Fig. 14 is a schematic structural diagram of a control device according to a second embodiment of the present application;
fig. 15 is a schematic structural diagram of an electronic device according to a third embodiment of the present application;
fig. 16 to 21 are respectively exemplary diagrams of the present application applied to a PC.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Referring to fig. 1, a flowchart of a control method according to a first embodiment of the present application is provided, and the method may be applied to an electronic device including at least a sound output device or at least a sound output component connected thereto, such as a mobile phone, a pad, a notebook, a computer, or a server. The technical scheme in the embodiment is mainly used for solving the defect of single playing sound effect on the sound signal in the electronic equipment.
Specifically, the method in this embodiment may include the following steps:
Step 101: the sound output device outputs a sound signal in accordance with the first sound document.
The sound output device may be a speaker device such as a horn. The first sound file is audio data of a sound signal to be output, such as mp3. After the electronic device transmits the first sound document to the sound output device, the sound output device decodes and plays the first sound document to output a sound signal corresponding to the first sound document, as shown in fig. 2.
Specifically, the sound output device decodes the sound document and outputs the sound signal under the control of the corresponding sound output parameters when outputting the sound signal, and different sound playing effects can be realized under different sound output parameters.
Step 102: in the case that the sound output device outputs the sound signal according to the first sound document, a second sound document corresponding to the sound signal output by the sound output device is obtained.
The second sound file is data obtained by performing audio processing on a sound signal output by the sound output device.
In a specific implementation, the electronic device in this embodiment further includes a sound collecting device, such as a microphone, for collecting sound signals of the periphery of the electronic device and generating a corresponding sound document. Based on this, in the present embodiment, in the case where the sound output section performs sound signal output in accordance with the first sound document, the sound signal output by the sound output section is collected by the sound collection device, and the collected sound signal is generated into a corresponding second sound document by processing such as audio encoding, as shown in fig. 3.
Step 103: and performing spectrum analysis on the first sound document and the second sound document to obtain analysis results.
The analysis result is a result obtained by comparing the frequency spectrum data of the first sound document and the frequency spectrum data of the second sound document, and the analysis result represents whether the first sound document and the second sound document meet the sound similarity condition.
In a specific implementation, the sound similarity condition is a condition that the similarity of the sound documents on the spectrum data reaches a similarity threshold, or can be understood as follows: the sound file reaches the condition of corresponding restoration threshold value in the frequency spectrum data. In the present embodiment, the sound similarity condition is satisfied specifically as: the similarity of the first sound document and the second sound document reaches a similarity threshold, or alternatively, the restoration of the second sound document with respect to the first sound document reaches a restoration threshold.
Based on the above, under the condition that the analysis result represents that the first sound document and the second sound document meet the sound similarity condition, when the sound output device outputs the sound signals under the control of the current sound output parameters, the reduction degree of the sound signals is higher, so that the sound signals heard by the user are closer to the sound playing effect of the first sound document, namely, the fidelity is higher; under the condition that the analysis result represents that the first sound document and the second sound document do not meet the sound similarity condition, the sound output device can determine that the reduction degree of the sound signal is lower when the sound output device outputs the sound signal under the control of the current sound output parameters, so that the difference between the sound signal received by the user and the original sound playing effect of the first sound document is larger, namely the fidelity is lower.
Step 104: it is determined whether or not the analysis result indicates that the first sound document and the second sound document satisfy the sound similarity condition, and in the case where the analysis result indicates that the first sound document and the second sound document do not satisfy the sound similarity condition, step 105 is performed.
Under the condition that the analysis result indicates that the first sound document and the second sound document do not meet the sound similarity condition, the sound output device can determine that the reduction degree of the sound signal is lower when the sound output device outputs the sound signal under the control of the current sound output parameter, so that the difference between the sound signal received by the user and the original sound playing effect of the first sound document is larger.
Step 105: the sound output parameters of the sound output device are adjusted so that the first sound document and the second sound document satisfy the sound similarity condition.
Based on this, in this embodiment, by adjusting the sound output parameters of the sound output device, the sound playing effect of the sound signal output by the sound output device is changed, and the obtained second sound document is also changed, after one or more times of adjustment of the sound output parameters, the first sound document and the second sound document corresponding to the sound signal output by the sound output device can finally meet the sound similar condition, so that the difference between the sound signal heard by the user and the original sound playing effect of the first sound document is smaller.
In a specific implementation, the sound output parameters may include parameters in an Equalizer EQ (Equalizer), such as amplification parameters of signals at low frequency, intermediate frequency, and high frequency, so that by adjusting the EQ parameters, the sound playing effect of the sound output device on the sound signal is changed.
As can be seen from the foregoing, in the control method provided in the first embodiment of the present application, the analysis result indicating whether the two sound documents satisfy the sound similarity condition is obtained by analyzing the original sound document of the sound signal output by the sound output device and the sound document obtained by signal acquisition after output, and based on this, the two sound documents satisfy the sound similarity condition by adjusting the sound output parameter of the sound signal output by the sound output device when the two sound documents do not satisfy the sound similarity condition, so that the sound output device can provide the sound playing effect close to the original sound document for the user through the adjustment of the sound output parameter regardless of the type or the source of the sound document, thereby avoiding the defect that only a single playing sound effect can be achieved for any sound signal in the electronic device.
In one implementation, before the sound output device outputs the sound signal according to the first sound document, the method in this embodiment may further include the following steps, as shown in fig. 4:
step 106: and obtaining the equipment posture information of the electronic equipment where the sound output equipment is located.
The device posture information of the electronic device may include state information of the electronic device in 3 degrees of freedom or 6 degrees of freedom, so as to represent a current device posture of the electronic device.
Specifically, in this embodiment, sensing information of the electronic device in the dimensions of the corresponding sensor may be obtained by the sensor disposed on the electronic device, so as to obtain state information of the electronic device in multiple degrees of freedom, thereby obtaining device posture information of the electronic device.
The sensor can be realized through a G-sensor and/or a gyroscope and other sensing chips.
Step 107: according to the device posture information, initial sound output parameters of the sound output device are set.
The initial sound output parameters correspond to the equipment posture information, so that the sound output equipment outputs sound signals according to the first sound file and the initial sound output parameters.
Based on the above, the current equipment posture of the electronic equipment is different, and the initial sound output parameters set for the sound output equipment are also different correspondingly, so that the sound output equipment can output sound signals according to the sound output parameters corresponding to the current equipment posture under different equipment postures, and a user can experience corresponding sound playing effects under the condition that the electronic equipment is in different equipment postures, and further user listening experience is improved.
For example, when the C surface of the keyboard of the notebook rotates to different angles relative to the B surface of the display screen, different initial EQ parameters are set for the speaker of the notebook, so that when the notebook is in different use modes, the speaker of the notebook can provide different sound playing effects for users.
In one implementation, when the first sound document and the second sound document are subjected to spectrum analysis in step 103 to obtain the analysis result, this may be specifically implemented by the following procedure, as shown in fig. 5:
step 501: a corresponding first sound amplitude value in the first sound document at each sound frequency point is obtained.
In this embodiment, the first sound document may be first subjected to spectrum analysis to analyze sound frequency points included in the first sound document, and based on the sound frequency points, sound amplitude values corresponding to the sound frequency points, that is, the first sound amplitude values, are identified.
For example, the first sound document includes 100 sound frequency points, as shown in fig. 6, each sound frequency point corresponds to one sound amplitude value, and the corresponding sound amplitude values at different sound frequency points may be the same or different.
Step 502: a second sound amplitude value corresponding at each sound frequency point in the second sound document is obtained.
In this embodiment, the second sound frequency point included in the second sound frequency document may be analyzed by performing a spectrum analysis on the second sound frequency document, and based on this, the sound amplitude value corresponding to each sound frequency point, that is, the second sound amplitude value, may be identified.
It should be noted that, since the second sound document and the first sound document correspond to the same sound signal, that is, the sound signal of the first sound document decoded and output by the sound output device is collected, the second sound document is generated, and thus, the sound frequency point in the second sound document and the sound frequency point in the first sound document are corresponding, but may be the same or different in sound amplitude value.
For example, 100 sound frequency points are included in the second sound document, as shown in fig. 7, each sound frequency point corresponds to one sound amplitude value, and the corresponding sound amplitude values at different sound frequency points may be the same or different. And with respect to the first sound document, there may be sound frequency points with the same sound amplitude value between the second sound document and the first sound document, and there may also be sound frequency points with different sound amplitude values.
Step 503: and obtaining an analysis result according to the first sound amplitude value and the second sound amplitude value.
Wherein the analysis result characterizes a degree of restitution between the first sound document and the second sound document.
Specifically, in this embodiment, a first sound amplitude value and a second sound amplitude value corresponding to the same sound frequency point in a first sound document and a second sound document are compared, and the obtained comparison result can represent the difference between the first sound amplitude value and the second sound amplitude value corresponding to the same sound frequency point, so that the reduction degree representing the first sound document and the second sound document, namely the reduction degree of the second sound document relative to the first sound document, can be obtained according to the comparison result.
It should be noted that, the sound amplitude value in this embodiment may be a sound loudness value or a sound pressure level value. The loudness value of sound can be understood as the volume of sound, namely the intensity value of sound perceived by human ears, and the measurement unit is Song; the sound pressure level value may be represented by SPL (sound pressure level), which is measured in decibels, i.e. dB. The sound loudness value and the sound pressure level value can be mutually converted through corresponding conversion formulas. For example, 1 Song represents the intensity of a planar waveform having a sound pressure level of 40dB, a frequency of 800Hz, and coming from directly in front of the listener.
In a specific implementation, in step 503, when the analysis result is obtained according to the first sound amplitude value and the second sound amplitude value, the method may be specifically implemented as follows:
and obtaining a difference variance according to the first amplitude difference value on the sound frequency point.
Specifically, in this embodiment, the difference value may be calculated by first performing a difference calculation on the first sound amplitude value and the second sound amplitude value corresponding to the same sound frequency point, so as to obtain a first amplitude difference value, for example, subtracting the second sound amplitude value from the first sound amplitude value corresponding to the same sound frequency point, so as to obtain a first amplitude difference value on each sound frequency point, and then calculating the standard deviation on the plurality of sound frequency points based on the first amplitude difference values on the sound frequency points, so as to obtain the difference variance in this embodiment.
Wherein the difference variance characterizes a degree of restitution between the first sound document and the second sound document. The second sound document has a degree of restoration with respect to the first sound document satisfying the sound similarity condition in a case where the difference variance is less than or equal to the first variance threshold, and the second sound document has a degree of restoration with respect to the first sound document not satisfying the sound similarity condition in a case where the difference variance is greater than the first variance threshold.
Based on this, in the case where the difference variance is larger than the first variance threshold, the sound output parameters such as EQ and the like of the sound output apparatus are adjusted so that the difference variance is reduced to the first variance threshold or below, thereby making the degree of restoration between the first sound document and the second sound document reach the restoration threshold, at which time the difference between the sound signal heard by the user and the original sound playing effect of the original sound document is small.
In one implementation, when adjusting the sound output parameters of the sound output device in step 105, this may be specifically implemented by the following procedure, as shown in fig. 8:
step 801: third sound amplitude values of the first sound document corresponding to the plurality of frequency bands are obtained.
The frequency bands in the first sound document are obtained by dividing the frequency spectrum corresponding to the first sound document, each frequency band respectively comprises a plurality of sound frequency points, and based on the frequency bands, the corresponding third sound amplitude value in each frequency band comprises a sound amplitude value, such as a sound loudness value or a sound pressure level value, of each sound frequency point contained in the frequency band.
In a specific implementation, in this embodiment, the frequency bands of the sound frequency points in the first sound document are divided according to 1/3 octaves, so as to obtain a plurality of frequency bands in the first sound document.
Step 802: a fourth sound amplitude value corresponding over a plurality of frequency bands in the second sound document is obtained.
The frequency bands in the second sound document are obtained by dividing the frequency spectrum corresponding to the second sound document, each frequency band respectively comprises a plurality of sound frequency points, and based on the frequency bands, the corresponding fourth sound amplitude value in each frequency band comprises a sound amplitude value, such as a sound loudness value or a sound pressure level value, of each sound frequency point contained in the frequency band.
In a specific implementation, in this embodiment, the frequency band of the sound frequency point in the second sound document is divided according to 1/3 octave, so as to obtain multiple frequency bands in the second sound document. Thus, the frequency bands in the second sound document correspond one-to-one with the frequency bands in the first sound document, as shown in fig. 9.
Step 803: a second amplitude difference between the corresponding third and fourth sound amplitude values over the frequency band is obtained.
In this embodiment, the difference value is calculated between the third sound amplitude value and the fourth sound amplitude value corresponding to the same frequency band and corresponding to the same sound frequency point, so as to obtain a second amplitude difference value, thereby obtaining an amplitude difference value at each sound frequency point included in each frequency band.
Step 804: and obtaining a corresponding parameter adjustment value on the frequency band according to the second amplitude difference value and the frequency band amplitude reference value.
Wherein the frequency band amplitude reference value is obtained by averaging the corresponding second amplitude differences over all frequency bands. For example, in the present embodiment, the amplitude difference value at each sound frequency point on 10 frequency bands obtained by frequency band division is averaged, and the obtained difference average value is used as the frequency band amplitude reference value. It can be seen that the frequency band amplitude reference value is determined by the difference between the sound amplitude values of the first sound document and the second sound document at the corresponding sound frequency points, and when the sound amplitude values of the first sound document and/or the second sound document at any sound frequency point are different, the corresponding frequency band amplitude reference value is also changed.
In another implementation manner, the frequency band amplitude reference value may also be obtained by respectively averaging the third sound amplitude value and the fourth sound amplitude value at each sound frequency point on all frequency bands and then obtaining a difference value of the two average values, and taking the difference value as the frequency band amplitude reference value. The implementation is different from the previous implementation, but the implemented principle is the same, and the different technical schemes are all within the protection scope of the application.
In this embodiment, the frequency band amplitude reference value may be obtained by directly processing the third sound amplitude value and the fourth sound amplitude value corresponding to all the sound frequency points in all the frequency bands, as described in the foregoing, or in this embodiment, the difference value corresponding to the third sound amplitude value and the fourth sound amplitude value corresponding to the sound frequency points in each frequency band may be obtained by processing the third sound amplitude value and the fourth sound amplitude value corresponding to the sound frequency points in each frequency band, that is, respectively averaging the difference value obtained after averaging the third sound amplitude value and the fourth sound amplitude value corresponding to the sound frequency points in each frequency band, or respectively averaging the difference value obtained after averaging the third sound amplitude value and the fourth sound amplitude value corresponding to the sound frequency points in each frequency band, thereby obtaining the average value of the difference value corresponding to each frequency band (may also be referred to as the average value difference value), and then averaging the obtained average value of the corresponding difference value in each frequency band, thereby obtaining the frequency band amplitude reference value.
Specifically, in step 804, the second amplitude differences corresponding to the sound frequency points in the same frequency band are averaged, and then the obtained average differences are calculated with the frequency band amplitude reference value, so as to obtain the corresponding parameter adjustment values in the frequency band.
For example, for each of 10 frequency bands, an average value of differences in sound amplitude values of respective sound frequency points on each frequency band is obtained, and the average value of the obtained differences on each frequency band is subjected to difference calculation with a frequency band amplitude reference value, thereby obtaining a corresponding parameter adjustment value on each frequency band, which may be a positive number, a negative number, or 0.
Step 805: and adjusting the corresponding sound output parameters of the sound output equipment on the frequency band according to the parameter adjustment values.
In particular, in this embodiment, the parameter adjustment value is superimposed on the corresponding sound output parameter of the sound output device on the corresponding frequency band, so that when the sound output parameter is adjusted by the sound output device in this embodiment, the current sound output parameter is used as a reference to adjust the sound output parameter in a mode of adjusting the sound output device to be higher, lower or keep unchanged based on the fact that the parameter adjustment value is positive, negative or 0.
It should be noted that, in the embodiment, the obtained parameter adjustment values correspond to the corresponding frequency bands, so in the embodiment, when the sound output parameters of the sound output device are adjusted, the parameter adjustment values of each frequency band are respectively adjusted by taking each frequency band divided by the sound document as a unit, and the adjustment manners of the sound output parameters of the corresponding sound output device on different frequency bands may be different. For example, in this embodiment, the adjustment value for EQ is different for the sound output device on two frequency bands, the EQ parameter value is adjusted up by an a value on the a frequency band, and the EQ parameter value is adjusted down by a B value on the B frequency band.
Based on the above implementation, before adjusting the corresponding sound output parameters of the sound output device on the frequency band according to the parameter adjustment values in step 805, the method in this embodiment may further include the following steps, as shown in fig. 10:
step 806: and obtaining the sound playing type corresponding to the current user of the sound output device, and determining at least one target frequency band in the plurality of frequency bands according to the sound playing type.
Wherein the sound playing type can be obtained according to a history sound file played by the current user by using the sound signal of the sound output device. Specifically, in this embodiment, first, historical sound documents of the sound output device are filtered according to a user identifier of the current user, such as a user name of the current user, that logs in the electronic device or the sound output device, so as to obtain a historical sound document corresponding to the current user, and then, the analysis of the sound playing type of the historical sound document corresponding to the current user is performed.
Specifically, in this embodiment, the frequency band involved in the history sound document played by the current user may be obtained by performing spectrum analysis on the history sound document corresponding to the current user on the sound output device, and the sound playing type of the history sound document may be determined by using the frequency band involved in the spectrum analysis. In particular, in this embodiment, the target frequency band may be obtained by analyzing the sound energy distribution state on the frequency band included in the history sound document. For example, a high audio band in which the sound energy distribution is relatively high is determined as a target frequency band, or a low audio band in which the sound energy distribution is relatively high is determined as a target frequency band, or a high audio band and a medium audio band in which the sound energy distribution is relatively high are determined as target frequency bands, or the like.
For example, under the condition that the capacity distribution occupied by the high-pitched frequency band in the historical sound document is more, if the current user normally listens to the high-pitched music, determining that the sound playing type corresponding to the current user is the high-pitched playing type; under the condition that the capacity distribution occupied by the middle voice frequency band in the historical voice file is more, determining that the voice playing type corresponding to the current user is the middle voice playing type; and under the condition that the capacity distribution occupied by the bass frequency band in the historical sound file is more, determining that the sound playing type corresponding to the current user is the bass playing type, and the like. Thus, one or more target frequency bands, such as a high-pitch frequency band or a low-pitch frequency band, in the frequency bands contained in the first sound document are screened out according to the sound playing type corresponding to the current user.
Based on this, in step 805, when adjusting the corresponding sound output parameters of the sound output device on the frequency band according to the parameter adjustment value, the specific steps may be:
and adjusting the corresponding sound output parameters of the sound output equipment on the target frequency band according to the parameter adjustment values corresponding to the target frequency band.
That is, in this embodiment, the adjustment of the corresponding sound output parameters on all the frequency bands included in the first sound document on the sound output device may be selected, as described above; alternatively, in this embodiment, only the sound output parameters corresponding to the target frequency band focused by the current user in the frequency bands included in the first sound document on the sound output device may be adjusted, instead of adjusting the sound output parameters corresponding to all the frequency bands included in the first sound document on the sound output device.
For example, in this embodiment, EQ parameter values on 10 frequency bands included in the first sound document in the sound output apparatus are all adjusted according to parameter adjustment values corresponding to each frequency band; or, in this embodiment, after determining that the high-audio frequency band is the target frequency band, only the EQ parameter values on the high-audio frequency band included in the first sound document in the sound output device are adjusted according to the parameter adjustment values corresponding to the high-audio frequency band, and no adjustment is performed on EQ parameter values on other frequency bands. Therefore, in the embodiment, not only can better sound playing effects be realized for different sound documents, but also more suitable sound playing effects of users can be provided for the users.
In one implementation, the electronic device where the sound output device is located further has a communication module, where the communication module is used to transmit the sound document to other devices connected to the electronic device. Taking the electronic device as an example of a mobile phone, the mobile phone transmits a sound document generated by collecting a sound signal to other mobile phones capable of performing voice communication with the mobile phone through an antenna or a WiFi module, as shown in FIG. 11.
Based on this, the method in this embodiment may further include the following steps, as shown in fig. 12:
Step 108: and in the process of transmitting the sound document to any application configured by the electronic device by the other device, obtaining a third sound document transmitted to the other device through the communication module.
The third sound file is a sound file corresponding to a sound signal transmitted by the electronic device to the other device, and after the third sound file is transmitted to the other device, the third sound file is played by a sound output device on the other device and is provided for a user of the other device to listen.
Step 109: a signal loss value between the third sound document and the second sound document is obtained.
Wherein the signal loss value characterizes a similarity between the third sound document and the second sound document.
It should be noted that, the first sound document is an original sound document according to which the electronic device outputs the sound signal through the sound output device, after the output of the sound output device, the corresponding sound signal is collected by the sound collection device in the electronic device, and the second sound document is a sound document generated after the electronic device collects the sound signal through the sound collection device. The sound signal collected by the sound collecting device may include not only the sound signal output by the sound output device for decrypting the first sound document, but also other sound signals in the surrounding environment where the sound collecting device is located, such as a speaking sound of a user of the electronic device, a music sound around the electronic device, and the like. These sound signals are captured by a sound capture device on the electronic device and a second sound document is generated, which is the original sound document transmitted by the electronic device to the other devices. And after processing by the electronic device, such as encoding and decoding by the communication module, the sound document actually transmitted by the electronic device by other devices may change and be recorded as a third sound document.
Based on this, in this embodiment, the third sound document and the second sound document are subjected to spectrum analysis, so as to obtain a signal loss value of the third sound document relative to the second sound document on the spectrum data, where the signal loss value characterizes the similarity degree of the third sound document relative to the second sound document.
Wherein, in the case that the signal loss value is greater than the loss threshold, the similarity degree between the third sound document and the second sound document is lower, that is, the third sound document does not contain sound energy in the second sound document, for example, the sound loudness value at most sound frequency points contained in the second sound document may not be contained, that is, the sound output device does not cause echo to communication between the electronic device and other devices under the current sound output parameters; and in the case that the signal loss value is less than or equal to the loss threshold, the similarity degree between the third sound document and the second sound document is higher, that is, the third sound document is likely to contain sound energy in the second sound document, for example, the sound loudness value at most sound frequency points contained in the second sound document may be contained, that is, the sound collecting device collects sound signals transmitted to the electronic device by other devices and transmits the generated sound document back to the other devices again by the communication module, and one side of the other devices receives the sound document sent to the electronic device once, that is, the sound output device can cause echo to communication between the electronic device and the other devices under the current sound output parameters.
Wherein the loss threshold here can be set according to requirements.
Step 110: it is determined whether the signal loss value is less than or equal to the loss threshold value, and in the case that the signal loss value is less than or equal to the loss threshold value, step 111 is performed.
Step 111: and adjusting the sound output parameters of the sound output equipment so that the signal loss value between the third sound document and the second sound document is larger than the loss threshold value, and realizing echo cancellation in the voice communication process of the electronic equipment and other equipment.
Specifically, in this embodiment, the output volume of the sound output apparatus may be reduced so that the signal loss value between the third sound document and the second sound document is greater than the loss threshold value. For example, in the present embodiment, the output volume of the sound output apparatus is reduced by a specified target value, which is correlated with the loss threshold.
Further, in this embodiment, before the output volume of the sound output device is reduced by the third target value, a difference between the output volume of the sound output device and the specified target value may be obtained, and then, if the difference is greater than or equal to the volume minimum limit value, the steps are executed: the output volume of the sound output device is reduced by a third target value. That is, the output volume reduction process is performed only in the case where the output volume of the sound output device is not reduced to the volume minimum limit value, avoiding echo.
In one implementation, the electronic device on which the sound output device is located also has a sound collection device; wherein, when the second sound document corresponding to the sound signal output by the sound output device is obtained in step 102, the following manner may be implemented:
collecting a sound signal output by a sound output device by utilizing a sound collecting device to obtain a corresponding second sound document;
based on this, in the process of transmitting the sound document to the other device by any application on the electronic device, the method in this embodiment may further include the following steps, as shown in fig. 13:
step 112: a fourth sound document obtained by sound signal collection by the sound collection device is obtained.
In one implementation, a sound collecting device is usually disposed on the electronic device, for example, only one microphone is disposed, where the fourth sound document may be actually understood as a second sound document, which is a sound document obtained by collecting, by the sound collecting device, sound signals in a surrounding environment.
In another implementation, a plurality of sound collection devices may be provided in the electronic device, where one sound collection device is configured to collect sound signals output by the sound output device according to the first sound document and generate a second sound document, and another sound collection device is configured to obtain a fourth sound document.
Step 113: and obtaining sound signal parameters corresponding to the fourth sound document.
Wherein the sound signal parameter characterizes the signal energy of the fourth sound document, such as the signal level value of sound, etc. In this embodiment, the signal level of the fourth sound document may be analyzed to obtain the sound signal parameter of the fourth sound document.
Step 114: whether the sound signal parameter satisfies the gain control condition is determined, and if the sound signal parameter satisfies the gain control condition, step 115 is executed.
Specifically, in this embodiment, the signal level in the sound signal parameter may be determined, so as to obtain a determination result of whether the sound signal parameter meets the gain control condition.
Step 115: and adjusting the acquisition gain value of the sound acquisition equipment so that the sound acquisition equipment acquires the sound signal with the adjusted gain value.
Under the condition that the sound signal parameter meets the gain control condition, it is indicated that the sound document obtained by the sound collecting device collecting the sound signal under the collecting gain value of the sound collecting device may have the conditions of small sound, echo or noise when the sound document is transmitted to other devices, so that the collecting gain value of the sound collecting device can be adjusted to be higher or lower, so that the sound collecting device collects the sound signal with the adjusted gain value, and the problems of small sound, echo or noise are avoided.
It should be noted that, in this embodiment, the gain adjustment of the sound collection device is suitable for use in a use scenario in which the electronic device transmits the sound document to other devices through any application, so that a more perfect conversation experience can be provided for the user.
Specifically, the gain control conditions may include: the signal level in the sound signal parameter is greater than the reference level, or the signal level in the sound signal parameter is less than the reference level, or the difference between the signal level in the sound signal parameter and the reference level is less than or equal to the redundancy value. The reference level may be-22 dBFS (dB Full Scale), and may be specifically set according to requirements. That is, in this embodiment, the signal level in the fourth sound document is compared with-22 dBFS, and the gain value of the sound collection device such as the microphone is adjusted, for example, increased or decreased, according to the comparison result, so that the signal level is always around-22 dBFS, thereby ensuring that the near-end transmission volume is optimal.
For example, in the case where the signal level in the sound signal parameter is greater than the reference level, the gain value of the sound collection device is reduced by a first target value, the first target value being related to the difference between the signal level in the sound signal parameter and the reference level; and in case the signal level in the sound signal parameter is smaller than the reference level, increasing the gain value of the sound collection device by a second target value, the second target value being related to the difference between the signal level in the sound signal parameter and the reference level.
Further, in this embodiment, before the gain value of the sound collecting device is reduced by the first target value, a first difference obtained by subtracting the first target value from the gain value of the sound collecting device may be obtained, and if the first difference is greater than or equal to the gain minimum limit value, the steps are executed: the gain value of the sound collection device is reduced by a first target value. That is, the gain value reduction process is performed only in the case where the gain value of the sound collection device is not reduced to the gain minimum value.
Referring to fig. 14, a schematic structural diagram of a control device according to a second embodiment of the present application may be configured in an electronic device, such as a mobile phone, a pad, a notebook, a computer, or a server, which at least includes a sound output device or is connected to a sound output component. The technical scheme in the embodiment is mainly used for solving the defect of single playing sound effect on the sound signal in the electronic equipment.
Specifically, the apparatus in this embodiment may include the following units:
a document obtaining unit 1401 for obtaining a second sound document corresponding to the sound signal output by the sound output device in the case where the sound output device outputs the sound signal according to the first sound document;
A spectrum analysis unit 1402 for performing spectrum analysis on the first sound document and the second sound document to obtain an analysis result; in the case where the analysis result indicates that the first sound document and the second sound document do not satisfy the sound similarity condition, the parameter adjustment unit 1403 is triggered.
The parameter adjustment unit 1403 is configured to adjust the sound output parameters of the sound output apparatus so that the first sound document and the second sound document satisfy the sound similarity condition.
As can be seen from the foregoing, in the control device provided in the second embodiment of the present application, the analysis result indicating whether the two sound documents satisfy the sound similarity condition is obtained by analyzing the original sound document of the sound signal output by the sound output device and the sound document obtained by signal acquisition after output, and based on this, the two sound documents satisfy the sound similarity condition by adjusting the sound output parameter of the sound signal output by the sound output device when the two sound documents do not satisfy the sound similarity condition, so that the sound output device can provide the sound playing effect close to the original sound document for the user through the adjustment of the sound output parameter regardless of the type or the source of the sound document, thereby avoiding the defect that only a single playing sound effect can be achieved for any sound signal in the electronic device.
In one implementation, before the sound output device performs sound signal output according to the first sound document, the parameter adjustment unit 1403 is further configured to: acquiring equipment posture information of electronic equipment where the sound output equipment is located; according to the equipment posture information, setting initial sound output parameters of the sound output equipment, wherein the initial sound output parameters correspond to the equipment posture information, so that the sound output equipment outputs sound signals according to the first sound file according to the initial sound output parameters.
In one implementation, the spectrum analysis unit 1402 is specifically configured to: obtaining a first sound amplitude value corresponding to each sound frequency point in a first sound file; obtaining a second sound amplitude value corresponding to each sound frequency point in the second sound file; and obtaining an analysis result according to the first sound amplitude value and the second sound amplitude value, wherein the analysis result represents the reduction degree between the first sound document and the second sound document.
Optionally, the spectrum analysis unit 1402 is specifically configured to, when obtaining the analysis result according to the first sound amplitude value and the second sound amplitude value: obtaining a first amplitude difference value on the same sound frequency point according to the first sound amplitude value and the second sound amplitude value; obtaining a difference variance according to the first amplitude difference value on the sound frequency point, wherein the difference variance represents the reduction degree between the first sound document and the second sound document; wherein the degree of restoration of the second sound document with respect to the first sound document satisfies the sound similarity condition in the case where the difference variance is less than or equal to the first variance threshold, and the degree of restoration of the second sound document with respect to the first sound document does not satisfy the sound similarity condition in the case where the difference variance is greater than the first variance threshold.
In one implementation, the parameter adjustment unit 1403 is specifically configured to: obtaining third sound amplitude values corresponding to the first sound document on a plurality of frequency bands, wherein the frequency bands are obtained by carrying out frequency band division on frequency spectrums corresponding to the first sound document, and the frequency bands comprise a plurality of sound frequency points; obtaining fourth sound amplitude values corresponding to a plurality of frequency bands in the second sound document; obtaining a second amplitude difference between a corresponding third sound amplitude value and a fourth sound amplitude value on the frequency band; obtaining a corresponding parameter adjustment value on the frequency band according to the second amplitude difference value and the frequency band amplitude reference value; the frequency band amplitude reference value is obtained by averaging the corresponding second amplitude differences over all frequency bands; and adjusting the corresponding sound output parameters of the sound output equipment on the frequency band according to the parameter adjustment values.
Further, the parameter adjusting unit 1403 is further configured to, before adjusting the corresponding sound output parameter of the sound output device in the frequency band according to the parameter adjustment value: obtaining a sound playing type corresponding to a current user of the sound output device, and determining at least one target frequency band in a plurality of frequency bands according to the sound playing type;
based on this, the parameter adjustment unit 1403 is specifically configured to, when adjusting the sound output parameters corresponding to the sound output apparatus in the frequency band according to the parameter adjustment value: and adjusting the corresponding sound output parameters of the sound output equipment on the target frequency band according to the parameter adjustment values corresponding to the target frequency band.
Specifically, the target frequency band is obtained according to a historical sound document corresponding to the current user on the sound output device, and the target frequency band is obtained by analyzing the sound energy distribution state on the frequency band contained in the historical sound document.
In one implementation, the electronic device where the sound output device is located is further provided with a communication module, and the communication module is used for transmitting the sound document to other devices connected with the electronic device;
wherein the parameter adjustment unit 1403 is further configured to: in the process that the other equipment transmits the sound document to any application configured by the electronic equipment, a third sound document transmitted to the other equipment through the communication module is obtained; obtaining a signal loss value between the third sound document and the second sound document, the signal loss value characterizing a similarity between the third sound document and the second sound document; and adjusting the sound output parameter of the sound output device in the case that the signal loss value is less than or equal to the loss threshold value.
In one implementation, the electronic device on which the sound output device is located also has a sound collection device; the document obtaining unit 1401 specifically functions to: collecting a sound signal output by a sound output device by utilizing a sound collecting device to obtain a corresponding second sound document;
Wherein the parameter adjustment unit 1403 is further configured to: in the process that any application on the electronic equipment transmits sound documents to other equipment, a fourth sound document obtained by collecting sound signals through the sound collecting equipment is obtained; obtaining sound signal parameters corresponding to the fourth sound document, wherein the sound signal parameters represent signal energy of the fourth sound document; and under the condition that the sound signal parameter meets the gain control condition, adjusting the acquisition gain value of the sound acquisition equipment so that the sound acquisition equipment acquires the sound signal with the adjusted gain value.
It should be noted that, the specific implementation of each unit in this embodiment may refer to the corresponding content in the foregoing, which is not described in detail herein.
Referring to fig. 15, a schematic structural diagram of an electronic device according to a third embodiment of the present application may be an electronic device including at least a sound output device or at least a sound output component connected thereto, such as a mobile phone, a pad, a notebook, a computer, or a server. The technical scheme in the embodiment is mainly used for solving the defect of single playing sound effect on the sound signal in the electronic equipment.
Specifically, the electronic device in this embodiment may include the following structure:
A sound output device 1501;
a processor 1502 for: in the case where the sound output device 1501 performs sound signal output in accordance with the first sound document, a second sound document corresponding to the sound signal output by the sound output device 1501 is obtained; performing spectrum analysis on the first sound document and the second sound document to obtain an analysis result; in a case where the analysis result characterizes that the first sound document and the second sound document do not satisfy the sound similarity condition, the sound output parameters of the sound output device 1501 are adjusted so that the first sound document and the second sound document satisfy the sound similarity condition.
As can be seen from the foregoing, in the electronic device provided in the third embodiment of the present application, the analysis result indicating whether the two sound documents satisfy the sound similarity condition is obtained by analyzing the original sound document of the sound signal output by the sound output device and the sound document obtained by signal acquisition after output, and based on this, the two sound documents satisfy the sound similarity condition by adjusting the sound output parameter of the sound signal output by the sound output device when the two sound documents do not satisfy the sound similarity condition, so that the sound output device can provide the sound playing effect close to the original sound document for the user through the adjustment of the sound output parameter regardless of the type or the source of the sound document, thereby avoiding the defect that only a single playing sound effect can be achieved for any sound signal in the electronic device.
Taking a computer audio call in a remote office scene as an example, the technical scheme of the application is illustrated:
first, the inventors of the present application found that, during an audio call using a computer: the trend is that, in the remote office, audio and video communication, a plurality of audio call software is basically installed in each personal computer, but each audio software has its own default setting, for example, the personal computer PC (Personal Computer) matches all audio software with a set of parameters, and as a result, the existing software will perform well, and some will perform poorly. Manually de-tuning the microphone gain also results in echo problems that are not optimal for the customer.
Based on the defects, the inventor of the application provides a scheme for automatically optimizing the call quality of various audio software, in the scheme, based on the interaction between the audio software and a PC, the PC actively detects the transmission level of the audio software and automatically adjusts the required optimal state in audio driving, so that the optimal experience of all remote participants of the audio software is realized. The core scheme is as follows: the state of the microphone signal in the PC being transmitted to the audio engine of the audio software is monitored and the microphone is set to the appropriate gain so that the digital reference point DRP (Digital Reference Point) reaches-22 dBFS. Meanwhile, the PC actively detects the receiving signal of the loudspeaker, if the similarity with the near-end voice reaches a certain degree, the echo brought by the audio software can be determined, the front-stage gain of the microphone and the volume of the loudspeaker system are dynamically adjusted and adjusted, and the echo cancellation performance is optimized.
The method comprises the following steps:
1) Microphone gain active adjustment flow chart (microphone here is microphone on near-end PC)
When different audio software works, if the default gains of microphones under the operating system are different, the following problems may occur:
(1) If the gain is too low, the far-end participants hear less sound from the near-end;
(2) If the gain is too high, sound heard by the far-end participants is broken;
if the far end hears the broken sound, the echo cancellation algorithm AEC (Acoustic Echo Cancellation) cannot ensure normal work, and the far end participants may hear the echo;
if the gain is too high, the noise assessment algorithm NR (noise rating number) will not guarantee proper operation, possibly resulting in the far-end participants hearing noise;
based on the above effects, after the audio software is started and added to the conference, as shown in fig. 16, the upper layer software requires the audio CODEC to feed back in real time, so that after the audio is input, the microphone Mic collects the audio, i.e. sends a direction output signal, and performs fast fourier transform FFT (fast Fourier transform) analysis on the audio and calculates the level x, and then compares the level x with-22 dBFS, and the upper layer software adjusts the OSGC gain value to ensure that the DRP is always-22 dBFS, thereby ensuring that the near-end sending volume is optimal. Specifically, under the condition that the level x is greater than-22 dBus, determining that a far-end can have sound breaking or noise, subtracting x from 22 to obtain a target value y at the moment, and under the condition that the value obtained by subtracting y from OSGC is smaller than a certain threshold value, not processing, ending the current flow, and if the value obtained by subtracting y from OSGC is greater than or equal to the certain threshold value, subtracting y from OSGC to realize adjustment of gain OSGC, and continuing to monitor in real time; under the condition that the level x is smaller than-22 dBFS, determining that the far end possibly cannot hear the sound of the near end, at the moment, raising the value of y by OSGC, and continuing to monitor in real time; when the level x is equal to-22 dBFS, the OSGC needs to be adjusted, and the current flow is ended.
2) Active echo performance adjustment flow chart
When different audio software works, due to the difference of an audio engine or far-end equipment, the echo cancellation function is quite different, as shown in fig. 17, in the conference joining and far-end single-talk mode, the upper layer software requires the audio codec to feed back the output signal level of the sending direction in real time, after the Mic collects the sound, the receiving direction level fed back by the audio codec makes loss, for example, FFT analysis is performed on the sound and the level loss x is calculated, if the loss is lower than a certain set value, the audio software or near-end equipment can be determined to bring echo, and the technical scheme of the application can optimize the echo cancellation performance by adjusting the volume of a loudspeaker system until the volume is not lower than a certain threshold value, thereby realizing the function of dynamic AEC.
Specifically, when the level loss x is smaller than (55+ (22+24)) dBFS, it may be determined that the far-end hearing echo is performed, and at this time, the target value y obtained by dividing 57 by x may be subtracted from 57, and based on this, when the level loss x is smaller than a certain threshold value after the horn volume is reduced by y, the current flow is terminated without adjustment, and only when the level loss x is greater than or equal to a certain threshold value after the horn volume is reduced by y, the value of the horn volume is reduced by y, and then the real-time monitoring is continued.
In addition, the inventors of the present application have found that: most of the playing sound effects of the current products are fixed, and a set of fixed parameters are used no matter the product form changes or the customer use scene changes. The dolby sound effect presets several parameters for the customer to choose by himself, but most customers do not use this function, which is still equivalent to a set of fixed parameters. In either form, the best experience of the customer is not matched.
In view of this, the inventor of the present application also proposes a set of sensor-based product morphology detection, which matches different initial preset sound effect parameters according to the product morphology variation. And in actual use, the scheme of dynamically adjusting the loudspeaker sound effect by applying the loudness spectrum is suitable for audio playing scenes. Referring to the flowcharts in fig. 18 and 19, the core points include the following two points:
1. and detecting the morphological change of the product based on the sensor, and matching different initial preset audio parameters.
If the product is a shape-variable product, the current shape can be judged by a sensor in the system after the default sound effect is loaded by the starting host, and the sensor can be various sensors such as a G-sensor or a gyroscope, and the shape change can be detected. And simultaneously matching and loading initial preset audio parameters which are most suitable for the form, playing sound by the playing equipment after the sound effect setting is effective, recording the sound by the microphone, and then performing octave spectrum analysis.
2. A scheme of dynamically adjusting the speaker sound effect using a loudness spectrum or a sound pressure level spectrum.
In either form, the music preference of each client is different, the initial preset parameters are general parameters, and are not optimal for the actual preference of the client, so that the loudness spectrum can be applied to the client to dynamically adjust the loudspeaker sound effect.
The following describes a scheme for dynamically adjusting the speaker sound effect using the loudness spectrum:
taking the original loudness spectrum of the played sound as a reference, simultaneously using a microphone to collect the sound played by the playing device,and obtain SPL m i The recorded sound spectrum and the original sound wav file are subjected to octave spectrum analysis to obtain a loudness spectrum SPL T i And comparing and calculating, namely calculating the reduction degree according to the frequency bands to obtain a reduction degree score, and determining whether the sound effect parameters need to be optimized according to the reduction degree score. If the frequency band needs to be adjusted and the corresponding dB value are calculated according to the algorithm, and the frequency band needs to be adjusted and the dB value are downloaded into the codec so that the client can obtain the best experience.
In this scheme, 2 implementations are used, as follows:
1) And (5) calculating a reduction degree score: and (3) carrying out loudness spectrum analysis on the actually recorded sound document, carrying out difference calculation with the original loudness spectrum, and calculating standard deviation of difference values of all frequency bands, wherein the smaller the standard deviation is, the better the reduction degree of the device is, the less the reduction degree score is less than 0.7 score, the sound effect adjustment is not needed, and the sound effect adjustment is more than 0.7 score. As shown in the music list in fig. 20, the reduction degree score of the product P2 is less than 0.7, the sound effect tuning is not required, the reduction degree of P1 and P3 is more than 0.7, and the further tuning is required.
2) And (3) calculating an acoustic dynamic tuning algorithm: the difference between the sound spectrum of the actual playing device and the original spectrum is calculated on all frequency bands, the average value of the difference is taken as baseline, meanwhile, the difference and baseline are calculated to obtain sound pressure values which need to be adjusted for each frequency band, as shown in fig. 21, the first curve above is the original spectrogram of sound, the third curve is the spectrogram of the actual playing sound of the device, the reduction degree score is 4.61 minutes, which indicates that the reduction effect is poor, the second curve in the middle is the spectrogram after the optimization of EQ, the reduction degree score is close to 0.7 and limited to the effective frequency range of the playing device, and the EQ reduction degree score of the low frequency band (< 300 Hz) is slightly poor. Finally, the tuned EQ is saved to the operating system OS (operation system).
In the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, and identical and similar parts between the embodiments are all enough to refer to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (9)

1. A control method, comprising:
under the condition that the sound output device outputs sound signals according to the first sound document, obtaining a second sound document corresponding to the sound signals output by the sound output device;
Performing spectrum analysis on the first sound document and the second sound document to obtain an analysis result;
in the case that the analysis result represents that the first sound document and the second sound document do not meet the sound similarity condition, adjusting sound output parameters of the sound output device so that the first sound document and the second sound document meet the sound similarity condition;
the electronic equipment where the sound output equipment is located is also provided with a communication module, and the communication module is used for transmitting a third sound document to other equipment connected with the electronic equipment;
wherein the method further comprises:
acquiring a third sound document transmitted to other equipment through the communication module in the process that the other equipment transmits the sound document to any application configured by the electronic equipment;
obtaining a signal loss value between the third sound document and the second sound document, the signal loss value characterizing a similarity between the third sound document and the second sound document; wherein the third sound document is formed by encoding and decoding the second sound document through the communication module;
And adjusting the sound output parameter of the sound output device under the condition that the signal loss value is smaller than or equal to a loss threshold value.
2. The method of claim 1, prior to the sound output device outputting the sound signal in accordance with the first sound document, the method further comprising:
acquiring equipment posture information of electronic equipment where the sound output equipment is located;
and setting initial sound output parameters of the sound output device according to the device posture information, wherein the initial sound output parameters correspond to the device posture information, so that the sound output device outputs sound signals according to the initial sound output parameters and the first sound document.
3. The method according to claim 1 or 2, performing a spectral analysis on the first sound document and the second sound document to obtain an analysis result, comprising:
obtaining a first sound amplitude value corresponding to each sound frequency point in the first sound file;
obtaining a second sound amplitude value corresponding to each sound frequency point in the second sound file;
and obtaining an analysis result according to the first sound amplitude value and the second sound amplitude value, wherein the analysis result represents the reduction degree between the first sound document and the second sound document.
4. A method according to claim 3, obtaining an analysis result from the first sound amplitude value and the second sound amplitude value, comprising:
obtaining a first amplitude difference value on the same sound frequency point according to the first sound amplitude value and the second sound amplitude value;
obtaining a difference variance according to a first amplitude difference value on the sound frequency point, wherein the difference variance represents the reduction degree between the first sound document and the second sound document;
wherein the degree of restoration of the second sound document with respect to the first sound document satisfies a sound similarity condition in a case where the difference variance is less than or equal to a first variance threshold, and the degree of restoration of the second sound document with respect to the first sound document does not satisfy the sound similarity condition in a case where the difference variance is greater than the first variance threshold.
5. The method of claim 1, adjusting a sound output parameter of the sound output device, comprising:
obtaining third sound amplitude values corresponding to the first sound document on a plurality of frequency bands, wherein the frequency bands are obtained by dividing frequency spectrums corresponding to the first sound document, and the frequency bands comprise a plurality of sound frequency points;
Obtaining fourth sound amplitude values corresponding to a plurality of frequency bands in the second sound document;
obtaining a second amplitude difference between the corresponding third and fourth sound amplitude values over the frequency band;
obtaining a corresponding parameter adjustment value on the frequency band according to the second amplitude difference value and a frequency band amplitude reference value; the frequency band amplitude reference value is obtained by averaging the corresponding second amplitude differences on all the frequency bands;
and adjusting the sound output parameters corresponding to the frequency band of the sound output equipment according to the parameter adjustment value.
6. The method of claim 5, prior to adjusting the sound output parameters of the sound output device corresponding over the frequency band according to the parameter adjustment values, the method further comprising:
obtaining a sound playing type corresponding to a current user of the sound output device, and determining at least one target frequency band in the plurality of frequency bands according to the sound playing type;
wherein adjusting the sound output parameters corresponding to the frequency band by the sound output device according to the parameter adjustment value includes:
And adjusting the corresponding sound output parameters of the sound output equipment on the target frequency band according to the parameter adjustment values corresponding to the target frequency band.
7. The method of claim 6, the target frequency band being obtained from a historical sound document corresponding to the current user on the sound output device, and the target frequency band being obtained by analyzing a sound energy distribution state on a frequency band contained in the historical sound document.
8. The method of claim 1, the sound output device further having a sound collection device on an electronic device on which the sound output device is located; the obtaining the second sound document corresponding to the sound signal output by the sound output device includes:
collecting the sound signals output by the sound output device by utilizing a sound collecting device to obtain corresponding second sound documents;
in the process that any application on the electronic equipment transmits sound documents to other equipment, a fourth sound document obtained by collecting sound signals through the sound collecting equipment is obtained;
obtaining sound signal parameters corresponding to the fourth sound document, wherein the sound signal parameters represent signal energy of the fourth sound document;
And under the condition that the sound signal parameter meets the gain control condition, adjusting the acquisition gain value of the sound acquisition equipment so that the sound acquisition equipment acquires the sound signal with the adjusted gain value.
9. An electronic device, comprising:
a sound output device;
the communication module is used for transmitting the third sound file to other equipment connected with the electronic equipment;
a processor for: under the condition that the sound output device outputs sound signals according to the first sound file, a second sound file corresponding to the sound signals output by the sound output device is obtained; performing spectrum analysis on the first sound document and the second sound document to obtain an analysis result; in the case that the analysis result represents that the first sound document and the second sound document do not meet the sound similarity condition, adjusting sound output parameters of the sound output device so that the first sound document and the second sound document meet the sound similarity condition;
the processor is further configured to obtain a third sound document transmitted to other devices through the communication module in a process that the other devices transmit the sound document to any application configured by the electronic device; obtaining a signal loss value between the third sound document and the second sound document, the signal loss value characterizing a similarity between the third sound document and the second sound document; adjusting a sound output parameter of the sound output device if the signal loss value is less than or equal to a loss threshold;
The third sound document is formed by encoding and decoding the second sound document through the communication module.
CN202110319787.8A 2021-03-25 2021-03-25 Control method and electronic equipment Active CN113031904B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110319787.8A CN113031904B (en) 2021-03-25 2021-03-25 Control method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110319787.8A CN113031904B (en) 2021-03-25 2021-03-25 Control method and electronic equipment

Publications (2)

Publication Number Publication Date
CN113031904A CN113031904A (en) 2021-06-25
CN113031904B true CN113031904B (en) 2023-10-24

Family

ID=76473754

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110319787.8A Active CN113031904B (en) 2021-03-25 2021-03-25 Control method and electronic equipment

Country Status (1)

Country Link
CN (1) CN113031904B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115658002B (en) * 2022-12-26 2023-03-10 南京芯驰半导体科技有限公司 Audio playing method and device of vehicle system, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101742178A (en) * 2009-12-14 2010-06-16 广东威创视讯科技股份有限公司 Audio-video terminal playing effect optimization method and device, and audio-video playing system
CN103677714A (en) * 2013-12-09 2014-03-26 联想(北京)有限公司 Information processing method and electronic equipment
CN108513206A (en) * 2018-02-08 2018-09-07 广州视源电子科技股份有限公司 A kind of sound system control method, device, terminal device and storage medium
CN108650585A (en) * 2018-06-01 2018-10-12 联想(北京)有限公司 A kind of method of adjustment and electronic equipment
CN112400205A (en) * 2018-07-04 2021-02-23 华为技术有限公司 Voice processing method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9672843B2 (en) * 2014-05-29 2017-06-06 Apple Inc. Apparatus and method for improving an audio signal in the spectral domain
EP3664291A4 (en) * 2017-08-18 2020-08-19 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Audio signal adjustment method and device, storage medium, and terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101742178A (en) * 2009-12-14 2010-06-16 广东威创视讯科技股份有限公司 Audio-video terminal playing effect optimization method and device, and audio-video playing system
CN103677714A (en) * 2013-12-09 2014-03-26 联想(北京)有限公司 Information processing method and electronic equipment
CN108513206A (en) * 2018-02-08 2018-09-07 广州视源电子科技股份有限公司 A kind of sound system control method, device, terminal device and storage medium
CN108650585A (en) * 2018-06-01 2018-10-12 联想(北京)有限公司 A kind of method of adjustment and electronic equipment
CN112400205A (en) * 2018-07-04 2021-02-23 华为技术有限公司 Voice processing method and device

Also Published As

Publication number Publication date
CN113031904A (en) 2021-06-25

Similar Documents

Publication Publication Date Title
US10466957B2 (en) Active acoustic filter with automatic selection of filter parameters based on ambient sound
US10186276B2 (en) Adaptive noise suppression for super wideband music
US8972251B2 (en) Generating a masking signal on an electronic device
Moore et al. Perceived naturalness of spectrally distorted speech and music
CN108365827B (en) Band compression with dynamic threshold
EP2039135B1 (en) Audio processing in communication terminals
CN106463107A (en) Collaboratively processing audio between headset and source
CN110956976B (en) Echo cancellation method, device and equipment and readable storage medium
US11671065B2 (en) Measuring speech intelligibility of an audio environment
US20230079741A1 (en) Automated audio tuning launch procedure and report
CN113949955A (en) Noise reduction processing method and device, electronic equipment, earphone and storage medium
JP2004521574A (en) Narrowband audio signal transmission system with perceptual low frequency enhancement
CN113031904B (en) Control method and electronic equipment
WO2024051820A1 (en) Abnormality-based paging method and related apparatus
US20210326099A1 (en) Systems and methods for providing content-specific, personalized audio replay on consumer devices
JP3284176B2 (en) Audio equipment
US20230146772A1 (en) Automated audio tuning and compensation procedure
US20210384879A1 (en) Acoustic signal processing device, acoustic signal processing method, and non-transitory computer-readable recording medium therefor
CN106303788B (en) Digital earphone
EP4303874A1 (en) Providing a measure of intelligibility of an audio signal
US20210329387A1 (en) Systems and methods for a hearing assistive device
CN115101082A (en) Speech enhancement method, apparatus, device, storage medium and program product
WO2023081534A1 (en) Automated audio tuning launch procedure and report
CN114615581A (en) Method and device for improving audio subjective experience quality
JP2013120961A (en) Acoustic apparatus, sound quality adjustment method, and program

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