Sound signal processing method and electronic device
By detecting the relative position of the speaker and the sound reflective element and the head and the speaker, selecting a suitable sound processing model, and processing the sound signal, the problem of poor stereo sound effects provided by the speakers of the mobile device is solved, and a better listening experience is achieved.
Patent Information
- Application Number
- CN202110120290.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-28
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2041-01-28
AI Technical Summary
The stereo sound effects provided by the speakers of the mobile device are often unable to achieve the ideal effect due to the speaker distance and reflection caused by the screen angle, which makes it impossible for the user to listen to the complete stereo sound effects.
By detecting a first relative position between the speaker and the sound reflective element and a second relative position between the head and the speaker, a specific sound processing model is selected from a plurality of preset sound processing models, the sound signal to be processed is converted, and the output sound signal is played using the speaker.
The selection of a suitable sound processing model according to the relative position of the speaker and the sound reflecting element is realized, improving the user's listening experience and making the sound signal close to the ideal sound quality.
Smart Images

Figure CN114827885B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a signal processing method and an electronic device, and in particular to a sound signal processing method and an electronic device. Background Art
[0002] Generally speaking, the stereo sound effect provided by the speakers of mobile devices often makes it difficult for users to hear the ideal sound effect due to the speakers being too close, reflections caused by the screen angle, etc. In contrast, the stereo sound effect provided by the headphones close to the user's ears can give the user a more complete stereo sound effect experience. Summary of the invention
[0003] In view of this, the present invention provides a sound signal processing method and an electronic device, which can be used to solve the above technical problems.
[0004] The present invention provides a sound signal processing method suitable for an electronic device. The method comprises: detecting a first relative position between a speaker of the electronic device and a sound reflecting element of the electronic device; detecting a second relative position between a head and the speaker; selecting a specific sound processing model from a plurality of preset sound processing models based on the first relative position and the second relative position; obtaining a sound signal to be processed, and converting the sound signal to be processed into an output sound signal using the specific sound processing model; and playing the output sound signal using the speaker.
[0005] The present invention provides an electronic device, which includes a sound reflection element, a speaker and a processor. The processor is coupled to the speaker and the sound reflection element, and is configured to perform the following steps: detecting a first relative position between the speaker of the electronic device and a sound reflection element of the electronic device; detecting a second relative position between a head and the speaker; selecting a specific sound processing model from a plurality of preset sound processing models based on the first relative position and the second relative position; obtaining a sound signal to be processed, and converting the sound signal to be processed into an output sound signal using the specific sound processing model; and playing the output sound signal using the speaker. BRIEF DESCRIPTION OF THE DRAWINGS
[0006] Figure 1 It is a schematic diagram of an electronic device according to an embodiment of the present invention.
[0007] Figure 2 FIG. 4 is a flow chart of a sound signal processing method according to an embodiment of the present invention.
[0008] Figure 3A and Figure 3B is a schematic diagram of a pre-training procedure for a preset sound processing model according to an embodiment of the present invention.
[0009] in:
[0010] 100: electronic device;
[0011] 101: sound reflection element;
[0012] 102: speaker;
[0013] 103: imaging element;
[0014] 104: processor;
[0015] 199: head;
[0016] 310: preset sound processing model;
[0017] 320:HRTF;
[0018] 399: human head model;
[0019] 399a: radio receiver;
[0020] A1: first sound signal;
[0021] A2: second sound signal;
[0022] RA: original sound signal;
[0023] IDA: reference sound signal;
[0024] S210~S250: steps. DETAILED DESCRIPTION
[0025] Please refer to Figure 1 , which is a schematic diagram of an electronic device according to an embodiment of the present invention. In different embodiments, the electronic device 100 is, for example, various devices that can emit sound, such as various smart devices, computer devices, etc., but is not limited thereto.
[0026] exist Figure 1 In the embodiment, the electronic device 100 is, for example, a notebook computer, and may include a sound reflecting element 101 , one or more speakers 102 , an imaging element 103 and a processor 104 .
[0027] In different embodiments, the sound reflecting element 101 is, for example, any element on the electronic device 100 that may receive and reflect the sound emitted by the speaker 102. Figure 1 For example, since the screen of the electronic device 100 may be located at a position to receive and reflect the sound emitted by the speaker 102 , the screen of the electronic device 100 may be defined as the sound reflecting element 101 , but is not limited thereto.
[0028] The imaging element 103 may be any device having a charge coupled device (CCD) lens or a complementary metal oxide semiconductor transistors (CMOS) lens, but is not limited thereto.
[0029] The processor 104 is coupled to the sound reflecting element 101, the speaker 102 and the imaging element 103, and can be a general-purpose processor, a special-purpose processor, a traditional processor, a digital signal processor, multiple microprocessors, one or more microprocessors combined with a digital signal processor core, a controller, a microcontroller, an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), any other type of integrated circuit, a state machine, an advanced RISC machine (ARM)-based processor, and the like.
[0030] In an embodiment of the present invention, the processor 104 can access the modules and program codes recorded in the storage circuit (not shown) of the electronic device 100 to implement the sound signal processing method proposed by the present invention, the details of which are described as follows.
[0031] Please refer to Figure 2 , which is a flow chart of a sound signal processing method according to an embodiment of the present invention. The method of this embodiment can be Figure 1 The electronic device 100 is executed as follows: Figure 1 Description of components shown Figure 2 Details of each step.
[0032] First, in step S210, the processor 104 may detect a first relative position between the speaker 102 of the electronic device 100 and the sound reflecting element 101 of the electronic device 100. Figure 1 In the scenario, since the sound reflecting element 101 is assumed to be the screen of the electronic device 100, and the positions of the screen and the speaker 102 on the electronic device 100 are generally fixed. Therefore, if the flip angle of the screen can be obtained, the first relative position between the speaker 102 and the sound reflecting element 101 can be deduced accordingly. Figure 1In the embodiment, the processor 104 can obtain the flip angle of the screen of the electronic device 100 to represent the first relative position between the speaker 102 and the sound reflecting element 101, but it is not limited thereto. In different embodiments, the processor 104 can obtain the flip angle of the screen based on a gravity sensor or other components, but it is not limited thereto.
[0033] In step S220, the processor 104 may detect a second relative position between the head 199 and the speaker 102. Figure 1 In the figure, the head 199 is, for example, the head of a user of the electronic device 100, and the face of the user may face the electronic device 199, but is not limited thereto.
[0034] In one embodiment, the processor 104 may capture a first specific image including the head 199 and the speaker 102 through other imaging elements externally connected to the electronic device 100 , and may perform image recognition on the first specific image to obtain a second relative position between the head 199 and the speaker 102 .
[0035] In another embodiment, the processor 104 may capture a second specific image including the head 199 through the imaging element 103 disposed on the electronic device 100. Afterwards, the processor 104 may, for example, perform facial recognition on the second specific image to obtain a second relative position between the head 199 and the speaker 102. Specifically, since the positions of the imaging element 103 and the speaker 102 on the electronic device 100 are known, the relative position between the imaging element 103 and the speaker 102 may be considered known. In this case, the processor 104 may know the relative position between the head 199 and the imaging element 103 based on existing image recognition technology, and estimate the second relative position between the head 199 and the speaker 102 based on the relative position between the imaging element 103 and the speaker 102, but is not limited thereto.
[0036] In step S230, the processor 104 may select a specific sound processing model from a plurality of preset sound processing models based on the first relative position and the second relative position. In an embodiment of the present invention, different preset sound processing models may correspond to different combinations of the first and second relative positions, and their corresponding relationship may be illustrated in Table 1 below.
[0037]
[0038] Table 1
[0039] In the scenario of Table 1, it is assumed that the first relative position can have 4 possible situations (represented by head position 1 to head position 4), and the second relative position (represented by the flip angle of the screen) can have 5 possible angles (for example, 60°, 90°, 120°, 150° and 180°). In this case, each combination of the first and second relative positions can correspond to a preset sound processing model. For example, when the first and second relative positions are head positions 1 and 60° respectively, the corresponding preset sound processing model is, for example, In addition, when the first and second relative positions are head positions 2 and 120° respectively, the corresponding preset sound processing model is, for example, The relationship between other combinations of the first and second relative positions and the corresponding preset sound processing models can be deduced according to the above teachings and will not be further elaborated here.
[0040] In an embodiment of the present invention, the preset sound processing model is, for example, a neural network, which can be trained through a pre-training procedure. Figure 3A and Figure 3B For further explanation.
[0041] Please refer to Figure 3A and Figure 3B , which is a schematic diagram of a pre-training procedure for a preset sound processing model according to one embodiment of the present invention. Figure 3A and Figure 3B In the embodiment, assuming that the preset sound processing model 310 (which is one of the above-mentioned multiple preset sound processing models) corresponds to a combination of a first and a second relative position, the designer can adjust the placement of the sound reflecting element 101 (e.g., the screen flip angle) according to the first relative position, so that the relative position of the speaker 102 and the sound reflecting element 101 can correspond to the above-mentioned first relative position. In addition, the designer can also place the human head model 399 provided with the sound receiving device 399a at a certain position, so that the relative position of the human head model 399 and the speaker 102 can correspond to the second relative position.
[0042] For example, assume that the preset sound processing model 310 under consideration is corresponding to head position 1 and 60°. When performing the pre-training procedure of the preset sound processing model 310, the designer needs to place the human head model 399 at a position corresponding to head position 1 and adjust the screen flip angle of the electronic device 100 to 60°. For another example, assuming that the preset sound processing model 310 under consideration is corresponding to head position 2 and 150° When performing the pre-training procedure of the preset sound processing model 310, the designer needs to place the head model 399 at a position corresponding to the head position 2 and adjust the screen flip angle of the electronic device 100 to 150°. The head models 399 and screen flip angles corresponding to the other preset sound processing models can be deduced according to the above teachings and will not be further described here.
[0043] In some embodiments, the designer may also place the head model 399 at a desired position first, and then the processor 104 may determine the relative position between the head model 399 and the speaker 102 based on mechanisms such as facial recognition, but the present invention is not limited thereto.
[0044] For ease of explanation, the following assumptions Figure 3A The position of the head model 399 in FIG. 1 corresponds to the head position 1. In addition, due to Figure 3A The screen flip angle shown is approximately 90°, so Figure 3A The preset sound processing model 310 corresponding to the scenario is, for example, But it is not limited to this.
[0045] In one embodiment, when performing the pre-training procedure of the preset sound processing model 310, the processor 104 may input the original sound signal RA (e.g., a piece of music, sound, etc.) into the preset sound processing model 310, so that the preset sound processing model 310 converts the original sound signal RA into the first sound signal A1. In one embodiment, the preset sound processing model 310 may, for example, adjust the original sound signal RA with a fixed length (e.g., 512 sampling points) with a multi-layer neuron with corresponding weights, thereby changing the frequency response, phase and time difference of the original sound signal RA, thereby forming the first sound signal A1, but it is not limited thereto.
[0046] Afterwards, the processor 104 may control the speaker 102 to play the first sound signal A1. After the first sound signal A1 is propagated, it may be received by the sound receiving device 399a disposed at the ear of the human head model 399. In one embodiment, since the sound receiving device 399a has electronic components such as a microphone, the sound receiving device 399a may convert the propagated first sound signal A1 into a second sound signal A2 after performing relevant compensation operations corresponding to the aforementioned electronic components (e.g., operations for compensating for microphone effects), wherein the second sound signal A2 may be close to the sound signal heard by the human ear, but is not limited thereto. Afterwards, the sound receiving device 399a may provide the second sound signal A2 to the processor 104.
[0047] In one embodiment, the processor 104 may further use a head related transfer function (HRTF) 320 to convert the original sound signal RA into a reference sound signal IDA, wherein the reference sound signal IDA may be understood as an ideal sound signal (eg, a general headphone stereo signal), but is not limited thereto.
[0048] After the processor 104 obtains the second sound signal A2 and the reference sound signal IDA, the preset sound processing model 310 may be trained accordingly. For example, the processor 104 may update the weight of each neuron in the preset sound processing model 310 accordingly based on a loss function, but is not limited thereto. In one embodiment, the processor 104 may, for example, estimate the mean square error between the second sound signal A2 and the reference sound signal IDA and update the weight of each neuron in the preset sound processing model 310 with the goal of minimizing the mean square error, but is not limited thereto.
[0049] After repeatedly executing the above pre-training process on the preset sound processing model 310, the first sound signal A1 generated by the preset sound processing model 310 can correspondingly make the second sound signal A2 gradually approach the reference sound signal IDA. In an embodiment of the present invention, the processor 104 can individually train the preset sound processing models corresponding to different first and second relative positions based on the above teachings, and the details are not further described herein.
[0050] Therefore, in step S230, it is assumed that the user's head 199 and the screen are turned at the following angles: Figure 3A In the case shown in FIG. 1 (ie, the position of the head 199 corresponds approximately to the head position 1, and the flip angle of the screen is approximately 90°), the processor 104 may select the preset sound processing model 310 (ie, ) as the specific sound processing model. In this case, the sound signal generated by the specific sound processing model should allow the user to hear a sound signal that is quite close to the ideal sound signal after being played by the speaker 102.
[0051] Therefore, in step S240, the processor 104 may obtain the sound signal to be processed, and use a specific sound processing model to convert the sound signal to be processed into an output sound signal. Then, in step S250, the processor 104 may use the speaker 102 to play the output sound signal. In an embodiment of the present invention, the above-mentioned sound signal to be processed is, for example, the original sound signal of a video or music played by the user on the electronic device 100, but is not limited to this. Based on this, when the processor 104 converts the sound signal to be processed into an output sound signal and plays it with the speaker 102, the user can listen to the sound quality close to the ideal sound signal, thereby improving the user's listening experience.
[0052] In other embodiments, when the user's head 199 moves and / or the flip angle of the screen changes, the processor 104 can also select other preset sound processing models as the specific sound processing model, so that the user can continue to hear the sound quality close to the ideal sound signal.
[0053] In summary, the method of the embodiment of the present invention can select a specific sound processing model from a plurality of preset sound processing models after determining the first relative position between the speaker and the sound reflecting element (e.g., a screen) and the second relative position between the user's head and the speaker. Afterwards, the present invention can use the selected specific sound processing model to convert the sound signal to be processed into an output sound signal that can be played by the speaker. In this way, the user can listen to a sound quality close to the ideal sound signal, thereby improving the user's listening experience.
[0054] Although the present invention has been disclosed as above by way of embodiments, it is not intended to limit the present invention. Any person skilled in the art may make some changes and modifications without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention shall be determined by the definition of the claims.
Claims
1. A sound signal processing method, suitable for an electronic device, comprising: Detecting a first relative position between a speaker of the electronic device and a sound reflecting element of the electronic device; detecting a second relative position between a head and the speaker; A sound processing model is selected from a plurality of preset sound processing models based on the first relative position and the second relative position; wherein each of the preset sound processing models is trained by a pre-training procedure, wherein the pre-training procedure of the preset sound processing model includes: Obtaining an original sound signal, and using a head-related transfer function to convert the original sound signal into a reference sound signal; converting the original sound signal into a first sound signal using the preset sound processing model, and playing the first sound signal with the speaker, wherein the relative position of the speaker and the sound reflecting element corresponds to the first relative position; Using a sound receiving device to receive a second sound signal corresponding to the first sound signal, wherein the sound receiving device is disposed at an ear of a human head model, and a relative position between the human head model and the speaker corresponds to the second relative position; and Training the sound processing model based on the second sound signal and the reference sound signal; Obtaining a sound signal to be processed, and converting the sound signal to be processed into an output sound signal using the sound processing model; and The output sound signal is played using the speaker.
2. The method according to claim 1, characterized in that The sound reflecting element at least includes a screen of the electronic device, and the first relative position is characterized by a flip angle of the screen.
3. The method according to claim 1, characterized in that The step of detecting the second relative position between the head and the speaker comprises: Capturing a first image including the head and the speaker through an imaging element externally connected to the electronic device; and The second relative position between the head and the speaker is estimated based on the first image.
4. The method according to claim 1, characterized in that The electronic device further includes an imaging element, and the step of detecting the second relative position between the head and the speaker includes: capturing a second image including the head through the imaging element; and The second relative position between the head and the speaker is estimated based on the second image.
5. An electronic device comprising: a sound reflecting element; a loudspeaker; as well as A processor is coupled to the speaker and the sound reflecting element and is configured to perform the following steps: Detecting a first relative position between the speaker of the electronic device and a sound reflecting element of the electronic device; detecting a second relative position between a head and the speaker; A sound processing model is selected from a plurality of preset sound processing models based on the first relative position and the second relative position; wherein each of the preset sound processing models is trained by a pre-training procedure, wherein the pre-training procedure of the preset sound processing model includes: Obtaining an original sound signal, and using a head-related transfer function to convert the original sound signal into a reference sound signal; converting the original sound signal into a first sound signal using the preset sound processing model, and playing the first sound signal with the speaker, wherein the relative position of the speaker and the sound reflecting element corresponds to the first relative position; Using a sound receiving device to receive a second sound signal corresponding to the first sound signal, wherein the sound receiving device is disposed at an ear of a human head model, and a relative position between the human head model and the speaker corresponds to the second relative position; and Training the sound processing model based on the second sound signal and the reference sound signal; Obtaining a sound signal to be processed, and converting the sound signal to be processed into an output sound signal using the sound processing model; and The output sound signal is played using the speaker.
6. The electronic device as claimed in claim 5, characterized in that: The sound reflecting element at least includes a screen of the electronic device, and the first relative position is characterized by a flip angle of the screen.
7. The electronic device as claimed in claim 5, characterized in that: The processor is configured to: Capturing a first image including the head and the speaker through an imaging element externally connected to the electronic device; and The second relative position between the head and the speaker is estimated based on the first image.
8. The electronic device as claimed in claim 5, characterized in that: The electronic device further includes an imaging element, and the processor is configured to: capturing a second image including the head through the imaging element; and The second relative position between the head and the speaker is estimated based on the second image.
Citation Information
Patent Citations
Sound localization for user in motion
CN103218198A
Systems and methods for sound externalization over headphones
US20190313201A1