WO2020102941A1 - 三维音效的实现方法、装置、存储介质及电子设备 - Google Patents

三维音效的实现方法、装置、存储介质及电子设备

Info

Publication number
WO2020102941A1
WO2020102941A1 PCT/CN2018/116216 CN2018116216W WO2020102941A1 WO 2020102941 A1 WO2020102941 A1 WO 2020102941A1 CN 2018116216 W CN2018116216 W CN 2018116216W WO 2020102941 A1 WO2020102941 A1 WO 2020102941A1
Authority
WO
WIPO (PCT)
Prior art keywords
signal
input signal
hrtf data
sub
synthesized
Prior art date
Application number
PCT/CN2018/116216
Other languages
English (en)
French (fr)
Inventor
陈岩
Original Assignee
深圳市欢太科技有限公司
Oppo广东移动通信有限公司
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 深圳市欢太科技有限公司, Oppo广东移动通信有限公司 filed Critical 深圳市欢太科技有限公司
Priority to CN201880097706.0A priority Critical patent/CN112789869B/zh
Priority to PCT/CN2018/116216 priority patent/WO2020102941A1/zh
Publication of WO2020102941A1 publication Critical patent/WO2020102941A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04SSTEREOPHONIC SYSTEMS 
    • H04S5/00Pseudo-stereo systems, e.g. in which additional channel signals are derived from monophonic signals by means of phase shifting, time delay or reverberation 

Definitions

  • This application belongs to the technical field of electronic equipment, and particularly relates to a method, device, storage medium, and electronic equipment for realizing three-dimensional sound effects.
  • a 3D sound effect can be realized by adopting a head related transformation function (Head Related Transfer Function, HRTF).
  • HRTF Head Related Transfer Function
  • This way of achieving 3D sound effects requires the storage of HRTF data at each possible location of the sound source. There may be about 1,000 sound source locations, so there may be about 1,000 HRTF data stored. It can be seen that, in the related art, this way of implementing 3D sound effects requires storing a large amount of HRTF data, which occupies more storage space.
  • Embodiments of the present application provide a method, device, storage medium, and electronic device for realizing three-dimensional sound effects, which can save storage space.
  • an embodiment of the present application provides a three-dimensional sound effect implementation method, which is applied to an electronic device and includes:
  • the plurality of sub-input signals determine a composite signal of the input signal at each of the four preset positions
  • the output signal and the second output signal are signals output to the earphone.
  • an embodiment of the present application provides a three-dimensional sound effect implementation device, which is applied to an electronic device and includes:
  • the first obtaining module is used to obtain the input signal corresponding to the sound source and obtain the position information of the sound source;
  • a decomposition module configured to decompose the input signal according to the position information to obtain multiple sub-input signals
  • a first determining module configured to determine a composite signal of the input signal at each of the four preset positions according to the multiple sub-input signals
  • a second obtaining module configured to obtain the HRTF data set corresponding to each of the four preset positions
  • a second determining module configured to determine the first output signal and the second output signal according to the composite signal of the input signal at each of the four preset positions and the HRTF data set corresponding to each position , Wherein the first output signal and the second output signal are signals output to the earphone.
  • an embodiment of the present application provides a storage medium on which a computer program is stored, wherein, when the computer program is executed on a computer, the computer is caused to execute the method for implementing the three-dimensional sound effect provided in this embodiment.
  • an embodiment of the present application provides an electronic device, including a memory and a processor, where a computer program is stored in the memory, and the processor is used to execute the computer program by calling the computer program stored in the memory:
  • the plurality of sub-input signals determine a composite signal of the input signal at each of the four preset positions
  • the output signal and the second output signal are signals output to the earphone.
  • the first HRTF data set corresponding to each position and the composite signal of the input signal at each position can be determined to determine the first The output signal and the second output signal. It can be understood that if the first output signal and the second output signal are output to the earphone, the user can hear the audio of the 3D sound effect in the earphone. It can be seen that, in the embodiment of the present application, only a corresponding HRTF data set needs to be stored in each of the four preset positions to achieve 3D sound effects and save storage space.
  • FIG. 1 is a first schematic flowchart of a method for implementing a three-dimensional sound effect provided by an embodiment of the present application.
  • FIG. 2 is a second schematic flowchart of a method for implementing a three-dimensional sound effect provided by an embodiment of the present application.
  • FIG. 3 is a schematic diagram of a first scenario of a method for implementing a three-dimensional sound effect provided by an embodiment of the present application.
  • FIG. 4 is a schematic diagram of a second scenario of a method for implementing a three-dimensional sound effect provided by an embodiment of the present application.
  • FIG. 5 is a schematic diagram of a third scenario of a method for implementing a three-dimensional sound effect provided by an embodiment of the present application.
  • FIG. 6 is a schematic diagram of a fourth scenario of a method for implementing a three-dimensional sound effect provided by an embodiment of the present application.
  • FIG. 7 is a schematic diagram of a fifth scenario of a method for implementing a three-dimensional sound effect provided by an embodiment of the present application.
  • FIG. 8 is a schematic diagram of a sixth scenario of a method for implementing a three-dimensional sound effect provided by an embodiment of the present application.
  • FIG. 9 is a third schematic flowchart of a method for implementing a three-dimensional sound effect provided by an embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of an apparatus for implementing a three-dimensional sound effect provided by an embodiment of the present application.
  • FIG. 11 is a first schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • FIG. 12 is a schematic diagram of a second structure of an electronic device provided by an embodiment of the present application.
  • FIG. 1 is a first schematic flowchart of a method for implementing a three-dimensional sound effect provided by an embodiment of the present application.
  • the flow of the method for realizing the three-dimensional sound effect may include:
  • an input signal corresponding to a sound source is obtained, and position information of the sound source is obtained.
  • an application program may be built in the electronic device, and the application program may be an application program that can realize a three-dimensional sound effect.
  • the user can click on the application to enter the interface of the application.
  • the user can click the select sound source button to select the sound source.
  • the user can select a piece of audio as the sound source, and then click a certain position on the interface, the electronic device can determine the position information of the sound source according to the position.
  • the electronic device obtains the input signal corresponding to the sound source and obtains the position information of the sound source.
  • the input signal is decomposed to obtain a plurality of sub-input signals.
  • the electronic device may decompose the acquired input signal according to the acquired position information of the sound source, and decompose the input signal into multiple sub-input signals.
  • the electronic device may decompose the acquired input signal according to the acquired position information of the sound source, and decompose the input signal into a first sub-input signal and a second sub-input signal.
  • the electronic device may decompose the acquired input signal according to the acquired position information of the sound source, and decompose the input signal into a first sub-input signal, a second sub-input signal, and a third sub-input signal.
  • the electronic device may decompose the acquired input signal according to the acquired position information of the sound source, and decompose the input signal into a first sub-input signal, a second sub-input signal, and a third sub-input signal And the fourth sub-input signal.
  • the synthesized signal of the input signal at each of the four positions set in advance is determined.
  • the electronic device presets four positions in the application program that can realize three-dimensional sound effects.
  • the electronic device can determine the input signal in the four preset The synthesized signal of each of the positions.
  • the electronic device when the electronic device presets four positions in an application program that can realize three-dimensional sound effects, the electronic device can store a corresponding HRTF data set in each of the four positions. After the electronic device determines the composite signal of the input signal at each of the four positions according to the multiple sub-input signals, the electronic device can acquire the HRTF data set corresponding to each position.
  • the first output signal and the second output signal are determined according to the composite signal of the input signal at each of the four positions set in advance and the HRTF data set corresponding to each position.
  • the electronic device when the electronic device determines the composite signal of the input signal at each of the four preset positions based on multiple sub-input signals, and after acquiring the HRTF data set corresponding to each position, the electronic device can The synthesized signal of each of the four preset positions and the HRTF data set corresponding to each position determine the first output signal and the second output signal.
  • the first output signal and the second output signal are signals output to the earphone.
  • the user can hear the audio being played at a position around the head.
  • the first HRTF data set corresponding to each position and the composite signal of the input signal at each position can be determined to determine the first The output signal and the second output signal. It can be understood that if the first output signal and the second output signal are output to the earphone, the user can hear the audio of the 3D sound effect in the earphone. It can be seen that, in the embodiment of the present application, only a corresponding HRTF data set needs to be stored in each of the four preset positions to achieve 3D sound effects and save storage space.
  • FIG. 2 is a second schematic flowchart of a method for implementing a three-dimensional sound effect provided by an embodiment of the present application.
  • the realization method of the three-dimensional sound effect may include:
  • the electronic device receives a click operation on a preset interface from the user.
  • an application program may be built in the electronic device, and the application program may be an application program that can realize a three-dimensional sound effect.
  • the user can click on the application to enter the interface of the application, which is the preset interface.
  • the interface of the application is shown in Figure 3.
  • the interface includes a head model BR, and a circle R surrounding the head model, and four positions disposed on the circumference of the circle R, namely a first position LF, a second position LB, a third position RB and a third position Four-position RF.
  • the four positions of the first position LF, the second position LB, the third position RB, and the fourth position RF divide the circumference of the circle R to achieve a better three-dimensional sound effect.
  • a preset rectangular coordinate system may be set, and for convenience of calculation, the preset rectangular coordinate system may be as shown in FIG. 4. That is, the preset rectangular coordinate system uses the midpoint of the head model BR as the origin, and the four positions of the first position LF, the second position LB, the third position RB, and the fourth position RF respectively divide the preset rectangular coordinate system. The first quadrant, the second quadrant, the third quadrant and the fourth quadrant.
  • the user can click on the circumference of the circle at will. After the user clicks on the circumference, the electronic device receives the click operation on the preset interface.
  • the electronic device determines the input signal corresponding to the sound source and the coordinate point of the sound source in the preset rectangular coordinate system according to the click operation.
  • the electronic device may determine the input signal s corresponding to the sound source according to the click operation.
  • the input signal s may be an audio signal.
  • the electronic device After the electronic device acquires the click operation, it can determine the coordinate point N (i, j) of the sound source in the preset rectangular coordinate system according to the click operation.
  • the electronic device determines the target included angle connecting the coordinate point and the origin of the preset rectangular coordinate system and the target half axis of the X axis of the preset rectangular coordinate system.
  • the target angle is the angle corresponding to the rotation of the positive half axis of the X axis to the positive half axis of the Y axis to the target connection line.
  • the electronic device may determine the target included angle ⁇ n between the target connecting line connecting the coordinate point and the origin of the preset rectangular coordinate system and the positive half axis of the X axis of the preset rectangular coordinate system.
  • the electronic device obtains the input signal corresponding to the sound source, and obtains the angle value of the target included angle.
  • the electronic device obtains the input signal s corresponding to the sound source and obtains the angle value of the target included angle ⁇ n, assuming that the angle value of ⁇ n is ⁇ .
  • the electronic device determines the first sub-input signal according to the input signal and the cosine function of the angle value.
  • the electronic device determines the second sub-input signal according to the sine function of the input signal and the angle value.
  • the electronic device determines the first synthesized signal of the input signal at the first position according to the first sub-input signal, the second sub-input signal, and the first preset value.
  • the electronic device can set the first preset according to the sine function and cosine function of the angle ⁇ a of the angle between the first position LF and the origin O, and the angle ⁇ a determined by the positive half axis of the X axis value.
  • the included angle ⁇ a is the included angle corresponding to the line connecting the first position LF and the origin O to the positive half axis of the X axis and the positive half axis of the Y axis.
  • the first position LF, the second position RF, the third position RB and the fourth position LB respectively bisect the first quadrant, the second quadrant, the third quadrant and the fourth quadrant of the preset rectangular coordinate system. Then, the angle between the line connecting the first position LF and the origin O, and the positive half-axis of the X-axis is 45 °. Therefore, the first preset value can be set to 0.707.
  • the electronic device determines the second composite signal of the input signal at the second position according to the first sub-input signal, the second sub-input signal, and the second preset value.
  • the electronic device can set the second preset according to the sine function and cosine function of the angle ⁇ b of the angle between the second position LB and the origin O, and the angle ⁇ b determined by the positive half axis of the X axis value.
  • the included angle ⁇ b is the included angle corresponding to the connection line connecting the second position LB and the origin O to the positive half axis of the X axis and the positive half axis of the Y axis.
  • the second preset value may include a first sub-preset value and a second sub-preset value, where the electronic device may set the first sub-preset value to -0.707 and the second sub-preset value to 0.707.
  • the electronic device determines the third synthesized signal of the input signal at the third position according to the first sub-input signal, the second sub-input signal, and the third preset value.
  • the electronic device can set the third preset according to the sine function and cosine function of the angle ⁇ c of the angle determined by the positive half axis of the X axis and the connection line connecting the third position RB and the origin O value.
  • the included angle ⁇ c is the included angle corresponding to the line connecting the positive half axis of the X axis to the positive half axis of the Y axis to the third position RB and the origin O.
  • the electronic device may set the third preset value to -0.707.
  • the electronic device determines the fourth synthesized signal of the input signal at the fourth position according to the first sub-input signal, the second sub-input signal, and the fourth preset value.
  • the electronic device can set the fourth preset according to the sine function and cosine function of the angle connecting the fourth position RF and the origin O, and the angle ⁇ d determined by the positive half axis of the X axis value.
  • the included angle ⁇ d is the included angle corresponding to the line connecting the fourth position RF and the origin O to the positive half axis of the X axis and the positive half axis of the Y axis.
  • the fourth preset value may include a third sub-preset value and a fourth sub-preset value, where the electronic device may set the third sub-preset value to 0.707 and the fourth sub-preset value to -0.707.
  • the electronic device acquires a first HRTF data group corresponding to the first location, a second HRTF data group corresponding to the second location, a third HRTF data group corresponding to the third location, and a fourth HRTF data group corresponding to the fourth location .
  • the first HRTF data group includes first HRTF data and second HRTF data
  • the second HRTF data group includes third HRTF data and fourth HRTF data
  • the third HRTF data group includes fifth HRTF data and sixth HRTF data
  • the fourth HRTF data set includes seventh HRTF data and eighth HRTF data.
  • the electronic device stores the first HRTF data h lfl and the second HRTF data h lfr in the first position LF, and the third HRTF data h lbl and the fourth HRTF data h lbr in the second position LB, and the third RB position into fifth and sixth h rbl data HRTF HRTF data h rbr, in fourth position RF HRTF data stored in the seventh and eighth h rfl HRTF data h rfr.
  • the electronic device can acquire the first HRTF data h lfl , the second HRTF data h lfr , and the third HRTF data h lbl, fourth HRTF data h lbr, fifth HRTF data h rbl, sixth HRTF data h rbr, seventh HRTF data h rfl, eighth HRTF data h rfr.
  • the electronic device determines the first based on the first synthesized signal, the first HRTF data, the second synthesized signal, the third HRTF data, the third synthesized signal, the fifth HRTF data, the fourth synthesized signal, and the seventh HRTF data output signal.
  • the first output signal L lf * h lfl + lb * h lbl + rb * h rbl + rf * h rfl .
  • the electronic device determines the second according to the first synthesized signal, the second HRTF data, the second synthesized signal, the fourth HRTF data, the third synthesized signal, the sixth HRTF data, the fourth synthesized signal, and the eighth HRTF data output signal.
  • the electronic device uses an artificial reverberation algorithm to perform reverberation processing on the first output signal and the second output signal.
  • the electronic device may use an artificial reverberation algorithm to perform reverberation processing on the first output signal L and the second output signal R to eliminate the positioning phenomenon in the head.
  • the electronic device may use the Schroeder artificial reverberation algorithm to perform reverberation processing on the first output signal and the second output signal.
  • the Schroeder artificial reverberation algorithm can be established by 4 parallel comb filters and 2 series all-pass filters. Comb filters are used to provide echoes with longer delays, while all-pass filters can be used to correct nonlinear phase problems in the system.
  • the system function of the comb filter is: Where a and D are constants.
  • the system function of the all-pass filter is: Where a and D are constants.
  • D 1 ⁇ D 4 denote the delay of 4 comb filters
  • D 5 ⁇ D 6 denote the delay of 2 all-pass filters
  • a 1 ⁇ a 4 denote the attenuation gain of 4 comb filters
  • a 5 ⁇ a 6 represents the feedback gain of the four all-pass filters.
  • the values of D 1 ⁇ D 4 cannot be set too small, and at the same time, they cannot be set too large, to avoid the occurrence of echo effects.
  • the delay parameters of each comb filter may be 14.61 ms, 18.83 ms, 20.74 ms, and 22.15 ms, and the attenuation gain of each comb filter may be 0.84, 0.82, 0.8, and 0.78, respectively.
  • the delay parameters of the all-pass filter can be 3ms and 4.1ms, and the feedback gain of the two all-pass filters can be 0.8.
  • the electronic device outputs the reverberated first output signal and the second output signal to the earphone.
  • the electronic device can output the reverberated first output signal L 1 and the second output signal R 1 to the earphone, and the user can Hear audio with three-dimensional sound effects.
  • a HRTF data group button can be set on the preset interface. If the user feels that the three-dimensional sound effect of the audio he hears is poor, he can click the Replace HRTF data group button to issue an instruction to replace the HRTF data group. After receiving the instruction to replace the HRTF data set, the electronic device may replace the first HRTF data set, the second HRTF data set, the third HRTF data set, and the fourth HRTF data set. Then the flow 211 to 215 is executed. If the user still feels that the three-dimensional sound effect of the audio he hears is poor at this time, the electronic device may continue to replace the first HRTF data set, the second HRTF data set, the third HRTF data set, and the fourth HRTF data set.
  • the electronic device When the electronic device no longer receives the instruction to replace the HRTF data set, it means that the current first HRTF data set, second HRTF data set, third HRTF data set, and fourth HRTF data set may be the four most suitable for the user Group HRTF data set.
  • the electronic device may generate and display prompt information, and the prompt information is used to prompt the user to input a user name. Then, the electronic device can create a new folder and name the folder with the user name entered by the user. Then, the electronic device can save the current four sets of HRTF data sets to a folder named after the user name entered by the user. In order to enable the user to use the application next time, he can directly select the four sets of HRTF data sets in the folder, so that the electronic device stores them in the corresponding four preset locations.
  • the following process may also be performed:
  • the electronic device determines the third sub-input signal according to the input signal and the fifth preset value.
  • the electronic device may set the fifth preset value to 0.707.
  • the third sub-input signal w 0.707 * s.
  • the electronic device determines the first synthesized signal of the input signal at the first position according to the first sub-input signal, the second sub-input signal, the third sub-input signal, and the first preset value.
  • the first synthesized signal lf w + 0.707 * (x + y).
  • the electronic device determines the second composite signal of the input signal at the second position according to the first sub-input signal, the second sub-input signal, the third sub-input signal, and the second preset value.
  • the second synthesized signal lb w + 0.707 * (x-y).
  • the electronic device determines the third composite signal of the input signal at the third position according to the first sub-input signal, the second sub-input signal, the third sub-input signal, and the third preset value.
  • the third synthesized signal rb w + 0.707 * (-x + y).
  • the electronic device determines the fourth synthesized signal of the input signal at the fourth position according to the first sub-input signal, the second sub-input signal, the third sub-input signal, and the fourth preset value.
  • the fourth synthesized signal rf w + 0.707 * (-x-y).
  • the electronic device may enter the process 211.
  • FIG. 10 is a schematic structural diagram of a device 400 for implementing a three-dimensional sound effect provided by an embodiment of the present application.
  • the apparatus 400 for implementing a three-dimensional sound effect may include a first acquisition module 401, a decomposition module 402, a first determination module 403, a second acquisition module 404, and a second determination module 405.
  • the first obtaining module 401 is used to obtain an input signal corresponding to a sound source and obtain position information of the sound source.
  • the decomposition module 402 is configured to decompose the input signal according to the location information to obtain multiple sub-input signals.
  • the first determining module 403 is configured to determine a composite signal of the input signal at each of the four preset positions according to the multiple sub-input signals.
  • the second obtaining module 404 is configured to obtain the HRTF data set corresponding to each of the four preset positions.
  • the second determining module 405 is configured to determine the first output signal and the second output according to the composite signal of the input signal at each of the four preset positions and the HRTF data set corresponding to each position Signal, wherein the first output signal and the second output signal are signals output to the earphone.
  • the first acquiring module 401 may be used to: receive a click operation on a preset interface from a user; determine an input signal corresponding to a sound source according to the click operation, and the sound source is Set a coordinate point in a rectangular coordinate system; determine the angle between the target connecting the coordinate point and the origin of the preset rectangular coordinate system and the positive half axis of the X axis of the preset rectangular coordinate system, wherein the target The angle is the angle between the positive half axis of the X axis and the positive half axis of the Y axis to the angle corresponding to the target connection line; obtaining the input signal corresponding to the sound source, and obtaining the target angle Angle value.
  • the decomposition module 402 may be used to decompose the input signal according to the angle value to obtain multiple sub-input signals.
  • the decomposition module 402 may be used to: determine the first sub-input signal according to the input signal and the cosine function of the angle value; according to the input signal and the sine function of the angle value To determine the second sub-input signal.
  • the first determining module 403 may be used to: according to the first sub-input signal and the second sub-input signal, determine the synthesis of the input signal at each of the four preset positions signal.
  • the four preset positions include a first position, a second position, a third position, and a fourth position; the first determining module 403 may be used to: according to the first sub-input Signal, the second sub-input signal and a first preset value, determining a first synthesized signal of the input signal at the first position; according to the first sub-input signal, the second sub-input signal and A second preset value, determining a second synthesized signal of the input signal at the second position; determining the input according to the first sub-input signal, the second sub-input signal, and a third preset value A third composite signal with the signal at the third position; based on the first sub-input signal, the second sub-input signal, and a fourth preset value, determining the fourth of the input signal at the fourth position Composite signal.
  • the second obtaining module 404 may be used to obtain a first HRTF data group corresponding to the first position, a second HRTF data group corresponding to the second position, and third HRTF data corresponding to the third position The fourth HRTF data set corresponding to the group and the fourth position.
  • the second determining module 405 may be used to: according to the first synthesized signal, the second synthesized signal, the third synthesized signal, the fourth synthesized signal, the first HRTF data set, The second HRTF data set, the third HRTF data set, and the fourth HRTF data set determine a first output signal and a second output signal.
  • the first HRTF data set includes first HRTF data and second HRTF data
  • the second HRTF data set includes third HRTF data and fourth HRTF data
  • the third HRTF data set includes Fifth HRTF data and sixth HRTF data
  • the fourth HRTF data group includes seventh HRTF data and eighth HRTF data
  • the second determination module 405 may be used to: according to the first synthesized signal, the Determine the first HRTF data, the second synthesized signal, the third HRTF data, the third synthesized signal, the fifth HRTF data, the fourth synthesized signal, and the seventh HRTF data
  • the first output signal according to the first synthesized signal, the second HRTF data, the second synthesized signal, the fourth HRTF data, the third synthesized signal, the sixth HRTF data, the The fourth synthesized signal and the eighth HRTF data determine the second output signal.
  • the decomposition module 402 may be used to determine the third sub-input signal according to the input signal and the fifth preset value.
  • the first determining module 403 may be used to determine that the input signal is in four preset positions according to the first sub-input signal, the second sub-input signal, and the third sub-input signal The synthesized signal of each position.
  • the second determination module 405 may be used to: perform reverberation processing on the first output signal and the second output signal using an artificial reverberation algorithm; The output signal and the second output signal are output to the earphone.
  • An embodiment of the present application provides a computer-readable storage medium on which a computer program is stored.
  • the computer program is executed on a computer, the computer is caused to execute the three-dimensional sound effect implementation method provided in this embodiment. Process.
  • An embodiment of the present application also provides an electronic device, including a memory and a processor, where a computer program is stored in the memory, and the processor is used to execute the computer program stored in the memory by executing the computer program The process in the realization method of the three-dimensional sound effect.
  • the aforementioned electronic device may be a mobile terminal such as a tablet computer or a smart phone.
  • FIG. 11 is a first structural schematic diagram of an electronic device provided by an embodiment of the present application.
  • the electronic device 500 may include a display screen 501, a speaker 502, a memory 503, a processor 504, and other components.
  • a display screen 501 may include a display screen 501, a speaker 502, a memory 503, a processor 504, and other components.
  • FIG. 11 does not constitute a limitation on the electronic device, and may include more or less components than those illustrated, or combine some components, or arrange different components.
  • the display screen 501 can be used to display information input by the user or provided to the user and various graphical user interfaces of the electronic device. These graphical user interfaces can be composed of graphics, text, icons, video, and any combination thereof.
  • the speaker 502 may be used to convert electrical signals into sound.
  • the memory 503 may be used to store application programs and data.
  • the application program stored in the memory 503 contains executable code.
  • the application program can form various functional modules.
  • the processor 504 executes application programs stored in the memory 503 to execute various functional applications and data processing.
  • the processor 504 is the control center of the electronic device, and uses various interfaces and lines to connect the various parts of the entire electronic device, and executes the electronic device by running or executing the application program stored in the memory 503 and calling the data stored in the memory 503 Various functions and processing data, so as to carry out overall monitoring of electronic equipment.
  • the processor 504 in the electronic device will load the executable code corresponding to the process of one or more application programs into the memory 503 according to the following instructions, and the processor 504 will run the executable code stored in the memory The application in 503, thereby realizing the process:
  • the plurality of sub-input signals determine a composite signal of the input signal at each of the four preset positions
  • the output signal and the second output signal are signals output to the earphone.
  • FIG. 12 is a second schematic structural diagram of an electronic device according to an embodiment of the present application.
  • the electronic device 600 may include a display screen 601, a speaker 602, a memory 603, a processor 604, a microphone 605, and other components.
  • the display screen 601 can be used to display information input by the user or provided to the user and various graphical user interfaces of the electronic device. These graphical user interfaces can be composed of graphics, text, icons, video, and any combination thereof.
  • the speaker 602 may be used to convert electrical signals into sound.
  • the memory 603 may be used to store application programs and data.
  • the application program stored in the memory 603 contains executable code.
  • the application program can form various functional modules.
  • the processor 604 executes application programs stored in the memory 603 to execute various functional applications and data processing.
  • the processor 604 is the control center of the electronic device, and uses various interfaces and lines to connect the various parts of the entire electronic device, and executes the electronic device by running or executing application programs stored in the memory 603 and calling data stored in the memory 603 Various functions and processing data, so as to carry out overall monitoring of electronic equipment.
  • the microphone 605 can be used to pick up the voice uttered by the user and the like.
  • the processor 604 in the electronic device loads the executable code corresponding to the process of one or more application programs into the memory 603 according to the following instructions, and the processor 604 runs and stores the memory in the memory The application in 603, so as to realize the process:
  • the plurality of sub-input signals determine a composite signal of the input signal at each of the four preset positions
  • the output signal and the second output signal are signals output to the earphone.
  • the processor 604 may also execute: receiving a click operation on the preset interface from the user; according to the Click to determine the input signal corresponding to the sound source and the coordinate point of the sound source in the preset rectangular coordinate system; determine the target connection line connecting the coordinate point and the origin of the preset rectangular coordinate system and the preset rectangular coordinate system The target angle of the positive half axis of the X axis, wherein the target angle is the angle corresponding to the rotation of the positive half axis of the X axis to the positive half axis of the Y axis to the target line; processing When the device 604 executes the process of obtaining the input signal corresponding to the sound source and obtaining the position information of the sound source, it may execute: obtaining the input signal corresponding to the sound source and obtaining the angle value of the target included angle; the processor 604 When performing the process of decomposing the input signal according to the position
  • processor 604 when the processor 604 executes the process of decomposing the input signal according to the angle value to obtain multiple sub-input signals, it may execute: according to the input signal and the cosine of the angle value Function, determine the first sub-input signal; determine the second sub-input signal according to the sine function of the input signal and the angle value; processor 604 executes the When the process of synthesizing the signal at each of the four preset positions may be performed: according to the first sub-input signal and the second sub-input signal, determine that the input signal is in the preset four Composite signal for each of the three positions.
  • the four preset positions include a first position, a second position, a third position, and a fourth position
  • the processor 604 executes the second position according to the first sub-input signal and the second position.
  • Sub-input signal when determining the flow of the composite signal of the input signal at each of the four preset positions, it may be performed according to: the first sub-input signal, the second sub-input signal and A first preset value, determining a first synthesized signal of the input signal at the first position; determining the input according to the first sub-input signal, the second sub-input signal, and a second preset value A second composite signal with the signal at the second position; based on the first sub-input signal, the second sub-input signal and a third preset value, determining the third of the input signal at the third position A synthesized signal; determining a fourth synthesized signal of the input signal at the fourth position according to the first sub-input signal, the second sub-input signal and a fourth prese
  • the first HRTF data set includes first HRTF data and second HRTF data
  • the second HRTF data set includes third HRTF data and fourth HRTF data
  • the third HRTF data set includes Fifth HRTF data and sixth HRTF data
  • the fourth HRTF data group includes seventh HRTF data and eighth HRTF data
  • processor 604 executes the process according to the first synthesized signal, the second synthesized signal, and The third synthesized signal, the fourth synthesized signal, the first HRTF data set, the second HRTF data set, the third HRTF data set, and the fourth HRTF data set, to determine the first output signal And the second output signal flow, it can be executed according to: the first synthesized signal, the first HRTF data, the second synthesized signal, the third HRTF data, the third synthesized signal, the Fifth HRTF data, the fourth synthesized signal and the seventh HRTF data, to determine the first output signal; according to the first synthesized signal, the second HRTF data, the second synthesized signal, The fourth HRTF data, the third synthesized signal
  • the processor 604 may also execute: according to the input signal and the fifth preset Value to determine the third sub-input signal; the processor 604 may execute the process of determining the synthesized signal corresponding to each of the four preset positions of the input signal according to the multiple sub-input signals : Determine a composite signal of the input signal at each of the four preset positions according to the first sub-input signal, the second sub-input signal, and the third sub-input signal.
  • the processor 604 executes the synthesized signal according to the input signal at each of the four preset positions, and the HRTF data set corresponding to each position to determine the first output signal After the process of the second output signal and the second output signal, it can also be performed: using an artificial reverberation algorithm to perform reverberation processing on the first output signal and the second output signal; The output signal is output to the headphones.
  • the device for implementing the three-dimensional sound effect provided by the embodiment of the present application and the method for implementing the three-dimensional sound effect in the above embodiments belong to the same concept.
  • the embodiment of the method for implementing the three-dimensional sound effect on the device for implementing the three-dimensional sound effect For any method provided, the specific implementation process is described in detail in the three-dimensional sound effect implementation method embodiment, which will not be repeated here.
  • the method for implementing the three-dimensional sound effect described in the embodiments of the present application a person of ordinary skill in the art can understand that all or part of the process for implementing the three-dimensional sound effect described in the embodiment of the present application can be implemented by a computer program Control related hardware to complete, the computer program can be stored in a computer readable storage medium, such as stored in a memory, and executed by at least one processor, the implementation process can include the realization of the three-dimensional sound effect The process of the method embodiment.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM, Read Only Memory), a random access memory (RAM, Random Access Memory), and so on.
  • each functional module may be integrated into one processing chip, or each module may exist alone physically, or two or more modules may be integrated into one module .
  • the above integrated modules may be implemented in the form of hardware or software function modules. If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it may also be stored in a computer-readable storage medium, such as a read-only memory, magnetic disk, or optical disk, etc. .

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Acoustics & Sound (AREA)
  • Signal Processing (AREA)
  • Stereophonic System (AREA)

Abstract

一种三维音效的实现方法、装置、存储介质及电子设备,所述方法包括:获取声源对应的输入信号和位置信息;根据位置信息对输入信号进行分解,得到多个子输入信号;根据多个子输入信号确定输入信号在每个位置的合成信号;获取每个位置对应的HRTF数据组;根据输入信号在每个位置的合成信号及每个位置对应的HRTF数据组确定第一输出信号和第二输出信号。

Description

三维音效的实现方法、装置、存储介质及电子设备 技术领域
本申请属于电子设备技术领域,尤其涉及一种三维音效的实现方法、装置、存储介质及电子设备。
背景技术
随着多媒体技术的快速发展,人们对音频和视频的音效的要求也越来越高。响应于用户的需求,相关技术提出了具有3D音效的音频和视频。相关技术中,可以通过采用头相关变换函数(Head Related Transfer Function,HRTF)来实现3D音效。这种实现3D音效的方式需要在各个可能存在声源的位置都存入HRTF数据。可能存在声源的位置可能有1000个左右,因此,存入的HRTF数据也可能有1000个左右。可见,相关技术中,这种实现3D音效的方式需要存入大量的HRTF数据,占用较多的存储空间。
发明内容
本申请实施例提供一种三维音效的实现方法、装置、存储介质及电子设备,可以节省存储空间。
第一方面,本申请实施例提供一种三维音效的实现方法,应用于电子设备,包括:
获取声源对应的输入信号,并获取声源的位置信息;
根据所述位置信息,对所述输入信号进行分解,得到多个子输入信号;
根据所述多个子输入信号,确定所述输入信号在预先设置的四个位置中的每个位置的合成信号;
获取所述预先设置的四个位置中的每个位置对应的HRTF数据组;
根据所述输入信号在预先设置的四个位置中的每个位置的合成信号,以及所述每个位置对应的HRTF数据组,确定第一输出信号和第二输出信号,其中,所述第一输出信号和第二输出信号为输出到耳机中的信号。
第二方面,本申请实施例提供一种三维音效的实现装置,应用于电子设备,包括:
第一获取模块,用于获取声源对应的输入信号,并获取声源的位置信息;
分解模块,用于根据所述位置信息,对所述输入信号进行分解,得到多个子输入信号;
第一确定模块,用于根据所述多个子输入信号,确定所述输入信号在预先设置的四个位置中的每个位置的合成信号;
第二获取模块,用于获取所述预先设置的四个位置中的每个位置对应的HRTF数据组;
第二确定模块,用于根据所述输入信号在预先设置的四个位置中的每个位置的合成信号,以及所述每个位置对应的HRTF数据组,确定第一输出信号和第二输出信号,其中,所述第一输出信号和第二输出信号为输出到耳机中的信号。
第三方面,本申请实施例提供一种存储介质,其上存储有计算机程序,其中,当所述计算机程序在计算机上执行时,使得所述计算机执行本实施例提供的三维音效的实现方法。
第四方面,本申请实施例提供一种电子设备,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器通过调用所述存储器中存储的所述计算机程序,用于执行:
获取声源对应的输入信号,并获取声源的位置信息;
根据所述位置信息,对所述输入信号进行分解,得到多个子输入信号;
根据所述多个子输入信号,确定所述输入信号在预先设置的四个位置中的每个位置的合成信号;
获取所述预先设置的四个位置中的每个位置对应的HRTF数据组;
根据所述输入信号在预先设置的四个位置中的每个位置的合成信号,以及所述每个位 置对应的HRTF数据组,确定第一输出信号和第二输出信号,其中,所述第一输出信号和第二输出信号为输出到耳机中的信号。
本申请实施例中,通过获取预先设置的四个位置中的每个位置对应的HRTF数据组,然后可以根据每个位置对应的HRTF数据组和输入信号在每个位置的合成信号,确定第一输出信号和第二输出信号。可以理解,若将该第一输出信号和第二输出信号输出到耳机中,用户则可在耳机中听到3D音效的音频。可见,本申请实施例中,只需要在预先设置的四个位置中的每个位置存入对应的HRTF数据组,即可实现3D音效,节省存储空间。
附图说明
下面结合附图,通过对本申请的具体实施方式详细描述,将使本申请的技术方案及其有益效果显而易见。
图1是本申请实施例提供的三维音效的实现方法的第一种流程示意图。
图2是本申请实施例提供的三维音效的实现方法的第二种流程示意图。
图3是本申请实施例提供的三维音效的实现方法的第一种场景示意图。
图4是本申请实施例提供的三维音效的实现方法的第二种场景示意图。
图5是本申请实施例提供的三维音效的实现方法的第三种场景示意图。
图6是本申请实施例提供的三维音效的实现方法的第四种场景示意图。
图7是本申请实施例提供的三维音效的实现方法的第五种场景示意图。
图8是本申请实施例提供的三维音效的实现方法的第六种场景示意图。
图9是本申请实施例提供的三维音效的实现方法的第三种流程示意图。
图10是本申请实施例提供的三维音效的实现装置的结构示意图。
图11是本申请实施例提供的电子设备的第一种结构示意图。
图12是本申请实施例提供的电子设备的第二种结构示意图。
具体实施方式
请参照图示,其中相同的组件符号代表相同的组件,本申请的原理是以实施在一适当的运算环境中来举例说明。以下的说明是基于所例示的本申请具体实施例,其不应被视为限制本申请未在此详述的其它具体实施例。
请参阅图1,图1是本申请实施例提供的三维音效的实现方法的第一种流程示意图。该三维音效的实现方法的流程可以包括:
在101中,获取声源对应的输入信号,并获取声源的位置信息。
比如,可以在电子设备中内置一应用程序,该应用程序为可以实现三维音效的应用程序。用户可以点击该应用程序,进入该应用程序的界面。在该应用程序的界面,用户可以点击选取声源按钮选择声源。例如,用户可以选择一段音频,将其作为声源,然后点击该界面的某个位置,电子设备可以根据该位置确定声源的位置信息。电子设备获取声源对应的输入信号,并获取声源的位置信息。
在102中,根据声源的位置信息,对输入信号进行分解,得到多个子输入信号。
比如,电子设备可以根据获取到的声源的位置信息,对获取到的输入信号进行分解,将输入信号分解为多个子输入信号。
在一些实施例中,电子设备可以根据获取到的声源的位置信息,对获取到的输入信号进行分解,将输入信号分解为第一子输入信号和第二子输入信号。
在另一些实施例中,电子设备可以根据获取到的声源的位置信息,对获取到的输入信号进行分解,将输入信号分解为第一子输入信号、第二子输入信号和第三子输入信号。
在一些实施例中,电子设备可以根据获取到的声源的位置信息,对获取到的输入信号进行分解,将输入信号分解为第一子输入信号、第二子输入信号、第三子输入信号和第四 子输入信号。
在103中,根据多个子输入信号,确定输入信号在预先设置的四个位置中的每个位置的合成信号。
比如,电子设备在可以实现三维音效的应用程序中预先设置四个位置,当输入信号被分解成多个子输入信号后,电子设备就可以根据多个子输入信号,确定输入信号在预先设置的四个位置中的每个位置的合成信号。
在104中,获取预先设置的四个位置中的每个位置对应的HRTF数据组。
比如,当电子设备在可以实现三维音效的应用程序中预先设置四个位置后,电子设备可以在这四个位置的每个位置存入对应的HRTF数据组。当电子设备根据多个子输入信号,确定输入信号在这四个位置的每个位置的合成信号之后,电子设备可以获取每个位置对应的HRTF数据组。
在105中,根据输入信号在预先设置的四个位置中的每个位置的合成信号,以及每个位置对应的HRTF数据组,确定第一输出信号和第二输出信号。
比如,当电子设备根据多个子输入信号,确定输入信号在预先设置的四个位置的每个位置的合成信号,并且,获取到每个位置对应的HRTF数据组之后,电子设备可以根据输入信号在预先设置的四个位置的每个位置的合成信号,以及每个位置对应的HRTF数据组,确定第一输出信号和第二输出信号。其中,第一输出信号和第二输出信号为输出到耳机中的信号。
可以理解,若是将第一输出信号和第二输出信号输出到耳机中,用户就可以听到该段音频在头部周围的某个位置播放。
本申请实施例中,通过获取预先设置的四个位置中的每个位置对应的HRTF数据组,然后可以根据每个位置对应的HRTF数据组和输入信号在每个位置的合成信号,确定第一输出信号和第二输出信号。可以理解,若将该第一输出信号和第二输出信号输出到耳机中,用户则可在耳机中听到3D音效的音频。可见,本申请实施例中,只需要在预先设置的四个位置中的每个位置存入对应的HRTF数据组,即可实现3D音效,节省存储空间。
请参阅图2,图2为本申请实施例提供的三维音效的实现方法的第二种流程示意图。该三维音效的实现方法可以包括:
在201中,电子设备从用户处接收对预设界面的点击操作。
比如,可以在电子设备中内置一应用程序,该应用程序为可以实现三维音效的应用程序。用户可以点击该应用程序,进入该应用程序的界面,该界面即为预设界面。该应用程序的界面如图3所示。该界面包括头部模型BR,以及围绕该头部模型的圆R,以及设置在该圆R的圆周上的四个位置,分别为第一位置LF、第二位置LB、第三位置RB及第四位置RF。其中,第一位置LF、第二位置LB、第三位置RB及第四位置RF这四个位置均分该圆R的圆周,以更好的实现三维音效。
为方便描述,可以设置一预设直角坐标系,为方便计算,该预设直角坐标系可以如图4所示。即该预设直角坐标系以头部模型BR的中点为原点,第一位置LF、第二位置LB、第三位置RB及第四位置RF这四个位置分别平分该预设直角坐标系的第一象限、第二象限、第三象限及第四象限。
在本实施例中,用户可以在该圆的圆周上随意点击。当用户在圆周上点击之后,电子设备即接收到对预设界面的点击操作。
在202中,电子设备根据点击操作确定声源对应的输入信号,以及声源在预设直角坐标系中的坐标点。
例如,如图4所示,用户在圆周上的N位置进行点击,电子设备接收到该点击操作之后,可以根据该点击操作确定声源对应的输入信号s。其中,该输入信号s可以为一段音频 信号。
当电子设备获取到点击操作之后,可以根据该点击操作确定声源在预设直角坐标系中的坐标点N(i,j)。
在203中,电子设备确定连接坐标点和预设直角坐标系的原点的目标连线与预设直角坐标系的X轴的正半轴的目标夹角。
其中,目标夹角为X轴的正半轴向Y轴的正半轴方向旋转至目标连线所对应的夹角。
例如,如图4所示,电子设备可以确定连接坐标点和预设直角坐标系的原点的目标连线与预设直角坐标系的X轴的正半轴的目标夹角∠n。
在204中,电子设备获取声源对应的输入信号,并获取目标夹角的角度值。
比如,电子设备获取声源对应的输入信号s,并获取目标夹角∠n的角度值,假设∠n的角度值为θ。
在205中,电子设备根据输入信号和角度值的余弦函数,确定第一子输入信号。
其中,第一子输入信号x可以由输入信号s乘以角度值θ的余弦函数得到。即x=s*cosθ。
在206中,电子设备根据输入信号和角度值的正弦函数,确定第二子输入信号。
其中,第二子输入信号y可以由输入信号s乘以角度值θ的正弦函数得到。即y=s*sinθ。
在207中,电子设备根据第一子输入信号、第二子输入信号和第一预设值,确定输入信号在第一位置的第一合成信号。
如图5所示,电子设备可以根据连接第一位置LF与原点O的连线,以及X轴的正半轴确定的夹角∠a的角度值的正弦函数与余弦函数来设置第一预设值。其中,夹角∠a为X轴的正半轴向Y轴的正半轴方向旋转至连接第一位置LF与原点O的连线所对应的夹角。
由于第一位置LF、第二位置RF、第三位置RB及第四位置LB分别平分预设直角坐标系的第一象限、第二象限、第三象限及第四象限。那么,连接第一位置LF与原点O的连线,以及X轴的正半轴确定的夹角∠a的角度值为45°。
Figure PCTCN2018116216-appb-000001
Figure PCTCN2018116216-appb-000002
因此可以将第一预设值设置为0.707。
第一合成信号lf可以根据第一子输入信号x乘以第一预设值加上第二子输入信号y乘以第一预设值确定。即lf=0.707*x+0.707*y。即lf=0.707*(x+y)。
在208中,电子设备根据第一子输入信号、第二子输入信号和第二预设值,确定输入信号在第二位置的第二合成信号。
如图6所示,电子设备可以根据连接第二位置LB与原点O的连线,以及X轴的正半轴确定的夹角∠b的角度值的正弦函数与余弦函数来设置第二预设值。其中,夹角∠b为X轴的正半轴向Y轴的正半轴方向旋转至连接第二位置LB与原点O的连线所对应的夹角。
可以理解,连接第二位置LB与原点O的连线,以及X轴的正半轴确定的夹角∠b的角度值为135°。
Figure PCTCN2018116216-appb-000003
第二预设值可以包括第一子预设值和第二子预设值,其中,电子设备可以将第一子预设值设置为-0.707,将第二子预设值设置为0.707。
第二合成信号lb可以根据第一子输入信号x乘以第一子预设值加上第二子输入信号y乘以第二子预设值确定。即第二合成信号lb=-0.707*x+0.707*y。即lb=0.707*(-x+y)。
在209中,电子设备根据第一子输入信号、第二子输入信号和第三预设值,确定输入信号在第三位置的第三合成信号。
如图7所示,电子设备可以根据连接第三位置RB与原点O的连线,以及X轴的正半 轴确定的夹角∠c的角度值的正弦函数与余弦函数来设置第三预设值。其中,夹角∠c为X轴的正半轴向Y轴的正半轴旋转至连接第三位置RB与原点O的连线所对应的夹角。
可以理解,连接第三位置RB与原点O的连线,以及X轴的正半轴确定的夹角∠c的角度值为225°。
Figure PCTCN2018116216-appb-000004
电子设备可以将第三预设值设置为-0.707。
第三合成信号rb可以根据第一子输入信号x乘以第三预设值加上第二子输入信号y乘以第三预设值确定。即第三合成信号rb=-0.707*x+(-0.707)*y。即rb=0.707*(-x-y)。
在210中,电子设备根据第一子输入信号、第二子输入信号和第四预设值,确定输入信号在第四位置的第四合成信号。
如图8所示,电子设备可以根据连接第四位置RF与原点O的连线,以及X轴的正半轴确定的夹角∠d的角度值的正弦函数与余弦函数来设置第四预设值。其中夹角∠d为X轴的正半轴向Y轴的正半轴方向旋转至连接第四位置RF与原点O的连线所对应的夹角。
可以理解,连接第四位置RF与原点O的连线,以及X轴的正半轴确定的夹角∠d的角度值为315°。
Figure PCTCN2018116216-appb-000005
第四预设值可以包括第三子预设值和第四子预设值,其中,电子设备可以将第三子预设值设置为0.707,将第四子预设值设置为-0.707。
第四合成信号rf可以根据第一子输入信号x乘以第三子预设值加上第二子输入信号y乘以第四子预设值确定。即第四合成信号rf=0.707*x+(-0.707)*y。即rb=0.707*(x-y)。
在211中,电子设备获取第一位置对应的第一HRTF数据组、第二位置对应的第二HRTF数据组、第三位置对应的第三HRTF数据组和第四位置对应的第四HRTF数据组。
其中,第一HRTF数据组包括第一HRTF数据和第二HRTF数据,第二HRTF数据组包括第三HRTF数据和第四HRTF数据,第三HRTF数据组包括第五HRTF数据和第六HRTF数据,第四HRTF数据组包括第七HRTF数据和第八HRTF数据。
比如,电子设备预先在第一位置LF存入第一HRTF数据h lfl和第二HRTF数据h lfr,在第二位置LB存入第三HRTF数据h lbl和第四HRTF数据h lbr,在第三位置RB存入第五HRTF数据h rbl和第六HRTF数据h rbr,在第四位置RF存入第七HRTF数据h rfl和第八HRTF数据h rfr。当电子设备确定第一合成信号lf、第二合成信号lb、第三合成信号rb和第四合成信号rf之后,电子设备可以获取第一HRTF数据h lfl、第二HRTF数据h lfr、第三HRTF数据h lbl、第四HRTF数据h lbr、第五HRTF数据h rbl、第六HRTF数据h rbr、第七HRTF数据h rfl、第八HRTF数据h rfr
在212中,电子设备根据第一合成信号、第一HRTF数据、第二合成信号、第三HRTF数据、第三合成信号、第五HRTF数据、第四合成信号和第七HRTF数据,确定第一输出信号。
其中,第一输出信号L=lf*h lfl+lb*h lbl+rb*h rbl+rf*h rfl
在213中,电子设备根据第一合成信号、第二HRTF数据、第二合成信号、第四HRTF数据、第三合成信号、第六HRTF数据、第四合成信号和第八HRTF数据,确定第二输出信号。
其中,第二输出信号R=lf*h lfr+lb*h lbr+rb*h rbr+rf*h rfr
在214中,电子设备采用人工混响算法对第一输出信号和第二输出信号进行混响处理。
比如,当电子设备确定第一输出信号L和第二输出信号R之后,若此时将第一输出信 号L和第二输出信号R输出到耳机中,可能会产生头内定位的现象。因此,电子设备可以采用人工混响算法对第一输出信号L和第二输出信号R进行混响处理,以消除头内定位现象。
其中,电子设备可以采用Schroeder人工混响算法对第一输出信号和第二输出信号进行混响处理。该Schroeder人工混响算法可以由4个并联的梳状滤波器和2个串联的全通滤波器建立起来。梳状滤波器用来提供延迟较长的回声,而全通滤波器可以用来对系统的非线性相位问题进行校正。梳状滤波器系统函数为:
Figure PCTCN2018116216-appb-000006
其中a,D均为常数。全通滤波器系统函数为:
Figure PCTCN2018116216-appb-000007
其中a,D均为常数。用D 1~D 4表示4个梳状滤波器的延迟,D 5~D 6表示2个全通滤波器的延迟,a 1~a 4表示4个梳状滤波器的衰减增益,a 5~a 6表示4个全通滤波器的反馈增益。为了有明显的混响效果,D 1~D 4的值不能设置得太小,同时也不能设置得太大,避免出现回声效果。在一些实施例中,各个梳状滤波器的延迟参数分别可以为14.61ms,18.83ms,20.74ms和22.15ms,各个梳状滤波器的衰减增益分别可以为0.84,0.82,0.8和0.78,两个全通滤波器的延迟参数可以为3ms和4.1ms,两个全通滤波器的反馈增益都可以为0.8。
在215中,电子设备将经过混响处理的第一输出信号和第二输出信号输出到耳机中。
比如,当第一输出信号L和第二输出信号R经过混响处理之后,电子设备可以将经过混响处理的第一输出信号L 1和第二输出信号R 1输出到耳机中,用户即可以听到具有三维音效的音频。
可以在预设界面设置一个HRTF数据组按钮,若用户感觉所听到的音频的三维音效效果差,则可以点击更换HRTF数据组按钮,以发出更换HRTF数据组的指令。电子设备接收到更换HRTF数据组的指令后,可以将第一HRTF数据组、第二HRTF数据组、第三HRTF数据组、第四HRTF数据组进行更换。然后执行流程211至215。若此时用户仍感觉所听到的音频的三维音效效果差,则电子设备可以继续更换第一HRTF数据组、第二HRTF数据组、第三HRTF数据组、第四HRTF数据组。
当电子设备不再接收到更换HRTF数据组的指令时,则表示当前的第一HRTF数据组、第二HRTF数据组、第三HRTF数据组、第四HRTF数据组可能是最适合该用户的四组HRTF数据组。电子设备可以生成提示信息并显示,该提示信息用于提示用户输入用户名。然后,电子设备可以新建一文件夹,并以该用户输入的用户名命名该文件夹。接着,电子设备可以将当前的这四组HRTF数据组保存至以该用户输入的用户名命名的文件夹。以使该用户下次使用该应用程序时,可以直接在该文件夹中选择这四组HRTF数据组,以使电子设备将其存入对应的预先设置的四个位置。
如图8所示,在一些实施例中,在流程206之后,还可以执行以下流程:
301、电子设备根据输入信号和第五预设值,确定第三子输入信号。
其中,电子设备可以将第五预设值设置为0.707。
第三子输入信号w=0.707*s。
302、电子设备根据第一子输入信号、第二子输入信号、第三子输入信号和第一预设值,确定输入信号在第一位置的第一合成信号。
其中,第一合成信号lf=w+0.707*(x+y)。
303,电子设备根据第一子输入信号、第二子输入信号、第三子输入信号和第二预设值,确定输入信号在第二位置的第二合成信号。
其中,第二合成信号lb=w+0.707*(x-y)。
304,电子设备根据第一子输入信号、第二子输入信号、第三子输入信号和第三预设值,确定输入信号在第三位置的第三合成信号。
其中,第三合成信号rb=w+0.707*(-x+y)。
305,电子设备根据第一子输入信号、第二子输入信号、第三子输入信号和第四预设值,确定输入信号在第四位置的第四合成信号。
其中,第四合成信号rf=w+0.707*(-x-y)。
需要说明的是,当电子设备执行完流程305之后,则可以进入流程211。
请参阅图10,图10为本申请实施例提供的三维音效的实现装置400的结构示意图。该三维音效的实现装置400装置可以包括:第一获取模块401,分解模块402,第一确定模块403,第二获取模块404和第二确定模块405。
第一获取模块401,用于获取声源对应的输入信号,并获取声源的位置信息。
分解模块402,用于根据所述位置信息,对所述输入信号进行分解,得到多个子输入信号。
第一确定模块403,用于根据所述多个子输入信号,确定所述输入信号在预先设置的四个位置中的每个位置的合成信号。
第二获取模块404,用于获取所述预先设置的四个位置中的每个位置对应的HRTF数据组。
第二确定模块405,用于根据所述输入信号在预先设置的四个位置中的每个位置的合成信号,以及所述每个位置对应的HRTF数据组,确定第一输出信号和第二输出信号,其中,所述第一输出信号和第二输出信号为输出到耳机中的信号。
在一些实施方式中,所述第一获取模块401,可以用于:从用户处接收对预设界面的点击操作;根据所述点击操作确定声源对应的输入信号,以及所述声源在预设直角坐标系中的坐标点;确定连接所述坐标点和预设直角坐标系的原点的目标连线与预设直角坐标系的X轴的正半轴的目标夹角,其中,所述目标夹角为所述X轴的正半轴向Y轴的正半轴方向旋转至所述目标连线所对应的夹角;获取所述声源对应的输入信号,并获取所述目标夹角的角度值。
所述分解模块402,可以用于:根据所述角度值,对所述输入信号进行分解,得到多个子输入信号。
在一些实施方式中,所述分解模块402,可以用于:根据所述输入信号和所述角度值的余弦函数,确定第一子输入信号;根据所述输入信号和所述角度值的正弦函数,确定第二子输入信号。
所述第一确定模块403,可以用于:根据所述第一子输入信号和所述第二子输入信号,确定所述输入信号在所述预先设置的四个位置中的每个位置的合成信号。
在一些实施方式中,所述预先设置的四个位置包括第一位置、第二位置、第三位置及第四位置;所述第一确定模块403,可以用于:根据所述第一子输入信号、所述第二子输入信号和第一预设值,确定所述输入信号在所述第一位置的第一合成信号;根据所述第一子输入信号、所述第二子输入信号和第二预设值,确定所述输入信号在所述第二位置的第二合成信号;根据所述第一子输入信号、所述第二子输入信号和第三预设值,确定所述输入信号在所述第三位置的第三合成信号;根据所述第一子输入信号、所述第二子输入信号和第四预设值,确定所述输入信号在所述第四位置的第四合成信号。
所述第二获取模块404,可以用于:获取所述第一位置对应的第一HRTF数据组、所述第二位置对应的第二HRTF数据组、所述第三位置对应的第三HRTF数据组和所述第四位置对应的第四HRTF数据组。
所述第二确定模块405,可以用于:根据所述第一合成信号、所述第二合成信号、所述第三合成信号、所述第四合成信号、所述第一HRTF数据组、所述第二HRTF数据组、所述第三HRTF数据组和所述第四HRTF数据组,确定第一输出信号和第二输出信号。
在一些实施方式中,所述第一HRTF数据组包括第一HRTF数据和第二HRTF数据,所述第二HRTF数据组包括第三HRTF数据和第四HRTF数据,所述第三HRTF数据组包括第五HRTF数据和第六HRTF数据,所述第四HRTF数据组包括第七HRTF数据和第八HRTF数据;所述第二确定模块405,可以用于:根据所述第一合成信号、所述第一HRTF数据、所述第二合成信号、所述第三HRTF数据、所述第三合成信号、所述第五HRTF数据、所述第四合成信号和所述第七HRTF数据,确定所述第一输出信号;根据所述第一合成信号、所述第二HRTF数据、所述第二合成信号、所述第四HRTF数据、所述第三合成信号、所述第六HRTF数据、所述第四合成信号和所述第八HRTF数据,确定所述第二输出信号。
在一些实施方式中,所述分解模块402,可以用于:根据所述输入信号和第五预设值,确定第三子输入信号。
所述第一确定模块403,可以用于:根据所述第一子输入信号、所述第二子输入信号和所述第三子输入信号,确定所述输入信号在预先设置的四个位置中的每个位置的合成信号。
在一些实施方式中,所述第二确定模块405,可以用于:采用人工混响算法对所述第一输出信号和所述第二输出信号进行混响处理;将经过混响处理的第一输出信号和第二输出信号输出到耳机中。
本申请实施例提供一种计算机可读的存储介质,其上存储有计算机程序,当所述计算机程序在计算机上执行时,使得所述计算机执行如本实施例提供的三维音效的实现方法中的流程。
本申请实施例还提供一种电子设备,包括存储器,处理器,所述存储器中存储有计算机程序,所述处理器通过调用所述存储器中存储的所述计算机程序,用于执行本实施例提供的三维音效的实现方法中的流程。
例如,上述电子设备可以是诸如平板电脑或者智能手机等移动终端。请参阅图11,图11为本申请实施例提供的电子设备的第一种结构示意图。
该电子设备500可以包括显示屏501、扬声器502、存储器503、处理器504等部件。本领域技术人员可以理解,图11中示出的电子设备结构并不构成对电子设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
显示屏501可用于显示由用户输入的信息或提供给用户的信息以及电子设备的各种图形用户接口,这些图形用户接口可以由图形、文本、图标、视频和其任意组合来构成。
扬声器502可用于将电信号转换为声音。
存储器503可用于存储应用程序和数据。存储器503存储的应用程序中包含有可执行代码。应用程序可以组成各种功能模块。处理器504通过运行存储在存储器503的应用程序,从而执行各种功能应用以及数据处理。
处理器504是电子设备的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或执行存储在存储器503内的应用程序,以及调用存储在存储器503内的数据,执行电子设备的各种功能和处理数据,从而对电子设备进行整体监控。
在本实施例中,电子设备中的处理器504会按照如下的指令,将一个或一个以上的应用程序的进程对应的可执行代码加载到存储器503中,并由处理器504来运行存储在存储器503中的应用程序,从而实现流程:
获取声源对应的输入信号,并获取声源的位置信息;
根据所述位置信息,对所述输入信号进行分解,得到多个子输入信号;
根据所述多个子输入信号,确定所述输入信号在预先设置的四个位置中的每个位置的合成信号;
获取所述预先设置的四个位置中的每个位置对应的HRTF数据组;
根据所述输入信号在预先设置的四个位置中的每个位置的合成信号,以及所述每个位置对应的HRTF数据组,确定第一输出信号和第二输出信号,其中,所述第一输出信号和第二输出信号为输出到耳机中的信号。
请参阅图12,图12为本申请实施例提供的电子设备的第二种结构示意图。
该电子设备600可以包括显示屏601、扬声器602、存储器603、处理器604、麦克风605等部件。
显示屏601可用于显示由用户输入的信息或提供给用户的信息以及电子设备的各种图形用户接口,这些图形用户接口可以由图形、文本、图标、视频和其任意组合来构成。
扬声器602可用于将电信号转换为声音。
存储器603可用于存储应用程序和数据。存储器603存储的应用程序中包含有可执行代码。应用程序可以组成各种功能模块。处理器604通过运行存储在存储器603的应用程序,从而执行各种功能应用以及数据处理。
处理器604是电子设备的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或执行存储在存储器603内的应用程序,以及调用存储在存储器603内的数据,执行电子设备的各种功能和处理数据,从而对电子设备进行整体监控。
麦克风605可用于拾取用户发出的语音等。
在本实施例中,电子设备中的处理器604会按照如下的指令,将一个或一个以上的应用程序的进程对应的可执行代码加载到存储器603中,并由处理器604来运行存储在存储器603中的应用程序,从而实现流程:
获取声源对应的输入信号,并获取声源的位置信息;
根据所述位置信息,对所述输入信号进行分解,得到多个子输入信号;
根据所述多个子输入信号,确定所述输入信号在预先设置的四个位置中的每个位置的合成信号;
获取所述预先设置的四个位置中的每个位置对应的HRTF数据组;
根据所述输入信号在预先设置的四个位置中的每个位置的合成信号,以及所述每个位置对应的HRTF数据组,确定第一输出信号和第二输出信号,其中,所述第一输出信号和第二输出信号为输出到耳机中的信号。
在一些实施方式中,处理器604执行所述获取声源对应的输入信号,并获取声源的位置信息的流程之前,还可以执行:从用户处接收对预设界面的点击操作;根据所述点击操作确定声源对应的输入信号,以及所述声源在预设直角坐标系中的坐标点;确定连接所述坐标点和预设直角坐标系的原点的目标连线与预设直角坐标系的X轴的正半轴的目标夹角,其中,所述目标夹角为所述X轴的正半轴向Y轴的正半轴方向旋转至所述目标连线所对应的夹角;处理器604执行所述获取声源对应的输入信号,并获取声源的位置信息的流程时,可以执行:获取所述声源对应的输入信号,并获取所述目标夹角的角度值;处理器604执行所述根据所述位置信息,对所述输入信号进行分解,得到多个子输入信号的流程时,可以执行:根据所述角度值,对所述输入信号进行分解,得到多个子输入信号。
在一些实施方式中,处理器604执行所述根据所述角度值,对所述输入信号进行分解,得到多个子输入信号的流程时,可以执行:根据所述输入信号和所述角度值的余弦函数,确定第一子输入信号;根据所述输入信号和所述角度值的正弦函数,确定第二子输入信号;处理器604执行所述根据所述多个子输入信号,确定所述输入信号在预先设置的四个位置 中的每个位置的合成信号的流程时,可以执行:根据所述第一子输入信号和所述第二子输入信号,确定所述输入信号在所述预先设置的四个位置中的每个位置的合成信号。
在一些实施方式中,所述预先设置的四个位置包括第一位置、第二位置、第三位置和第四位置,处理器604执行所述根据所述第一子输入信号和所述第二子输入信号,确定所述输入信号在所述预先设置的四个位置中的每个位置的合成信号的流程时,可以执行:根据所述第一子输入信号、所述第二子输入信号和第一预设值,确定所述输入信号在所述第一位置的第一合成信号;根据所述第一子输入信号、所述第二子输入信号和第二预设值,确定所述输入信号在所述第二位置的第二合成信号;根据所述第一子输入信号、所述第二子输入信号和第三预设值,确定所述输入信号在所述第三位置的第三合成信号;根据所述第一子输入信号、所述第二子输入信号和第四预设值,确定所述输入信号在所述第四位置的第四合成信号;处理器604执行所述获取所述预先设置的四个位置中的每个位置对应的HRTF数据组的流程时,可以执行:获取所述第一位置对应的第一HRTF数据组、所述第二位置对应的第二HRTF数据组、所述第三位置对应的第三HRTF数据组和所述第四位置对应的第四HRTF数据组;处理器604执行所述根据所述输入信号在预先设置的四个位置中的每个位置的合成信号,以及所述每个位置对应的HRTF数据组,确定第一输出信号和第二输出信号的流程时,可以执行:根据所述第一合成信号、所述第二合成信号、所述第三合成信号、所述第四合成信号、所述第一HRTF数据组、所述第二HRTF数据组、所述第三HRTF数据组和所述第四HRTF数据组,确定第一输出信号和第二输出信号。
在一些实施方式中,所述第一HRTF数据组包括第一HRTF数据和第二HRTF数据,所述第二HRTF数据组包括第三HRTF数据和第四HRTF数据,所述第三HRTF数据组包括第五HRTF数据和第六HRTF数据,所述第四HRTF数据组包括第七HRTF数据和第八HRTF数据;处理器604执行所述根据所述第一合成信号、所述第二合成信号、所述第三合成信号、所述第四合成信号、所述第一HRTF数据组、所述第二HRTF数据组、所述第三HRTF数据组和所述第四HRTF数据组,确定第一输出信号和第二输出信号的流程时,可以执行:根据所述第一合成信号、所述第一HRTF数据、所述第二合成信号、所述第三HRTF数据、所述第三合成信号、所述第五HRTF数据、所述第四合成信号和所述第七HRTF数据,确定所述第一输出信号;根据所述第一合成信号、所述第二HRTF数据、所述第二合成信号、所述第四HRTF数据、所述第三合成信号、所述第六HRTF数据、所述第四合成信号和所述第八HRTF数据,确定所述第二输出信号。
在一些实施方式中,处理器604执行所述根据所述输入信号和所述角度值的正弦函数,确定第二子输入信号的流程之后,还可以执行:根据所述输入信号和第五预设值,确定第三子输入信号;处理器604执行所述根据所述多个子输入信号,确定所述输入信号在预先设置的四个位置中的每个位置对应的合成信号的流程时,可以执行:根据所述第一子输入信号、所述第二子输入信号和所述第三子输入信号,确定所述输入信号在预先设置的四个位置中的每个位置的合成信号。
在一些实施方式中,处理器604执行所述根据所述输入信号在预先设置的四个位置中的每个位置的合成信号,以及所述每个位置对应的HRTF数据组,确定第一输出信号和第二输出信号的流程之后,还可以执行:采用人工混响算法对所述第一输出信号和所述第二输出信号进行混响处理;将经过混响处理的第一输出信号和第二输出信号输出到耳机中。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见上文针对三维音效的实现方法的详细描述,此处不再赘述。
本申请实施例提供的所述三维音效的实现装置与上文实施例中的三维音效的实现方法属于同一构思,在所述三维音效的实现装置上可以运行所述三维音效的实现方法实施例中提供的任一方法,其具体实现过程详见所述三维音效的实现方法实施例,此处不再赘述。
需要说明的是,对本申请实施例所述三维音效的实现方法而言,本领域普通技术人员可以理解实现本申请实施例所述三维音效的实现方法的全部或部分流程,是可以通过计算机程序来控制相关的硬件来完成,所述计算机程序可存储于一计算机可读取存储介质中,如存储在存储器中,并被至少一个处理器执行,在执行过程中可包括如所述三维音效的实现方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,Random Access Memory)等。
对本申请实施例的所述三维音效的实现装置而言,其各功能模块可以集成在一个处理芯片中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中,所述存储介质譬如为只读存储器,磁盘或光盘等。
以上对本申请实施例所提供的一种三维音效的实现方法、装置、存储介质以及电子设备进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。

Claims (20)

  1. 一种三维音效的实现方法,应用于电子设备,其中,包括:
    获取声源对应的输入信号,并获取声源的位置信息;
    根据所述位置信息,对所述输入信号进行分解,得到多个子输入信号;
    根据所述多个子输入信号,确定所述输入信号在预先设置的四个位置中的每个位置的合成信号;
    获取所述预先设置的四个位置中的每个位置对应的HRTF数据组;
    根据所述输入信号在预先设置的四个位置中的每个位置的合成信号,以及所述每个位置对应的HRTF数据组,确定第一输出信号和第二输出信号,其中,所述第一输出信号和第二输出信号为输出到耳机中的信号。
  2. 根据权利要求1所述的三维音效的实现方法,其中,在所述获取声源对应的输入信号,并获取声源的位置信息之前,还包括:
    从用户处接收对预设界面的点击操作;
    根据所述点击操作确定声源对应的输入信号,以及所述声源在预设直角坐标系中的坐标点;
    确定连接所述坐标点和预设直角坐标系的原点的目标连线与预设直角坐标系的X轴的正半轴的目标夹角,其中,所述目标夹角为所述X轴的正半轴向Y轴的正半轴方向旋转至所述目标连线所对应的夹角;
    所述获取声源对应的输入信号,并获取声源的位置信息,包括:
    获取所述声源对应的输入信号,并获取所述目标夹角的角度值;
    所述根据所述位置信息,对所述输入信号进行分解,得到多个子输入信号,包括:
    根据所述角度值,对所述输入信号进行分解,得到多个子输入信号。
  3. 根据权利要求2所述的三维音效的实现方法,其中,所述根据所述角度值,对所述输入信号进行分解,得到多个子输入信号,包括:
    根据所述输入信号和所述角度值的余弦函数,确定第一子输入信号;
    根据所述输入信号和所述角度值的正弦函数,确定第二子输入信号;
    所述根据所述多个子输入信号,确定所述输入信号在预先设置的四个位置中的每个位置的合成信号,包括:
    根据所述第一子输入信号和所述第二子输入信号,确定所述输入信号在所述预先设置的四个位置中的每个位置的合成信号。
  4. 根据权利要求3所述的三维音效的实现方法,其中,所述预先设置的四个位置包括第一位置、第二位置、第三位置和第四位置;
    所述根据所述第一子输入信号和所述第二子输入信号,确定所述输入信号在所述预先设置的四个位置中的每个位置的合成信号,包括:
    根据所述第一子输入信号、所述第二子输入信号和第一预设值,确定所述输入信号在所述第一位置的第一合成信号;
    根据所述第一子输入信号、所述第二子输入信号和第二预设值,确定所述输入信号在所述第二位置的第二合成信号;
    根据所述第一子输入信号、所述第二子输入信号和第三预设值,确定所述输入信号在所述第三位置的第三合成信号;
    根据所述第一子输入信号、所述第二子输入信号和第四预设值,确定所述输入信号在所述第四位置的第四合成信号;
    所述获取所述预先设置的四个位置中的每个位置对应的HRTF数据组,包括:
    获取所述第一位置对应的第一HRTF数据组、所述第二位置对应的第二HRTF数据组、 所述第三位置对应的第三HRTF数据组和所述第四位置对应的第四HRTF数据组;
    所述根据所述输入信号在预先设置的四个位置中的每个位置的合成信号,以及所述每个位置对应的HRTF数据组,确定第一输出信号和第二输出信号,包括:
    根据所述第一合成信号、所述第二合成信号、所述第三合成信号、所述第四合成信号、所述第一HRTF数据组、所述第二HRTF数据组、所述第三HRTF数据组和所述第四HRTF数据组,确定第一输出信号和第二输出信号。
  5. 根据权利要求4所述的三维音效的实现方法,其中,所述第一HRTF数据组包括第一HRTF数据和第二HRTF数据,所述第二HRTF数据组包括第三HRTF数据和第四HRTF数据,所述第三HRTF数据组包括第五HRTF数据和第六HRTF数据,所述第四HRTF数据组包括第七HRTF数据和第八HRTF数据;
    所述根据所述第一合成信号、所述第二合成信号、所述第三合成信号、所述第四合成信号、所述第一HRTF数据组、所述第二HRTF数据组、所述第三HRTF数据组和所述第四HRTF数据组,确定第一输出信号和第二输出信号,包括:
    根据所述第一合成信号、所述第一HRTF数据、所述第二合成信号、所述第三HRTF数据、所述第三合成信号、所述第五HRTF数据、所述第四合成信号和所述第七HRTF数据,确定所述第一输出信号;
    根据所述第一合成信号、所述第二HRTF数据、所述第二合成信号、所述第四HRTF数据、所述第三合成信号、所述第六HRTF数据、所述第四合成信号和所述第八HRTF数据,确定所述第二输出信号。
  6. 根据权利要求3所述的三维音效的实现方法,其中,在所述根据所述输入信号和所述角度值的正弦函数,确定第二子输入信号之后,还包括:
    根据所述输入信号和第五预设值,确定第三子输入信号;
    所述根据所述多个子输入信号,确定所述输入信号在预先设置的四个位置中的每个位置对应的合成信号,包括:
    根据所述第一子输入信号、所述第二子输入信号和所述第三子输入信号,确定所述输入信号在预先设置的四个位置中的每个位置的合成信号。
  7. 根据权利要求1所述的三维音效的实现方法,其中,在所述根据所述输入信号在预先设置的四个位置中的每个位置的合成信号,以及所述每个位置对应的HRTF数据组,确定第一输出信号和第二输出信号之后,还包括:
    采用人工混响算法对所述第一输出信号和所述第二输出信号进行混响处理;
    将经过混响处理的第一输出信号和第二输出信号输出到耳机中。
  8. 一种三维音效的实现装置,应用于电子设备,其中,包括:
    第一获取模块,用于获取声源对应的输入信号,并获取声源的位置信息;
    分解模块,用于根据所述位置信息,对所述输入信号进行分解,得到多个子输入信号;
    第一确定模块,用于根据所述多个子输入信号,确定所述输入信号在预先设置的四个位置中的每个位置的合成信号;
    第二获取模块,用于获取所述预先设置的四个位置中的每个位置对应的HRTF数据组;
    第二确定模块,用于根据所述输入信号在预先设置的四个位置中的每个位置的合成信号,以及所述每个位置对应的HRTF数据组,确定第一输出信号和第二输出信号,其中,所述第一输出信号和第二输出信号为输出到耳机中的信号。
  9. 根据权利要求8所述的三维音效的实现装置,其中,所述第一获取模块,用于:
    从用户处接收对预设界面的点击操作;
    根据所述点击操作确定声源对应的输入信号,以及所述声源在预设直角坐标系中的坐标点;
    确定连接所述坐标点和预设直角坐标系的原点的目标连线与预设直角坐标系的X轴的正半轴的目标夹角,其中,所述目标夹角为所述X轴的正半轴向Y轴的正半轴方向旋转至所述目标连线所对应的夹角;
    获取所述声源对应的输入信号,并获取所述目标夹角的角度值;
    所述分解模块,用于:根据所述角度值,对所述输入信号进行分解,得到多个子输入信号。
  10. 根据权利要求9所述的三维音效的实现装置,其中,所述分解模块,用于:
    根据所述输入信号和所述角度值的余弦函数,确定第一子输入信号;
    根据所述输入信号和所述角度值的正弦函数,确定第二子输入信号;
    所述第一确定模块,用于:根据所述第一子输入信号和所述第二子输入信号,确定所述输入信号在所述预先设置的四个位置中的每个位置的合成信号。
  11. 根据权利要求10所述的三维音效的实现装置,其中,所述预先设置的四个位置包括第一位置、第二位置、第三位置和第四位置;所述第一确定模块,用于:
    根据所述第一子输入信号、所述第二子输入信号和第一预设值,确定所述输入信号在所述第一位置的第一合成信号;
    根据所述第一子输入信号、所述第二子输入信号和第二预设值,确定所述输入信号在所述第二位置的第二合成信号;
    根据所述第一子输入信号、所述第二子输入信号和第三预设值,确定所述输入信号在所述第三位置的第三合成信号;
    根据所述第一子输入信号、所述第二子输入信号和第四预设值,确定所述输入信号在所述第四位置的第四合成信号;
    所述第二获取模块,用于:获取所述第一位置对应的第一HRTF数据组、所述第二位置对应的第二HRTF数据组、所述第三位置对应的第三HRTF数据组和所述第四位置对应的第四HRTF数据组;
    所述第二确定模块,用于:根据所述第一合成信号、所述第二合成信号、所述第三合成信号、所述第四合成信号、所述第一HRTF数据组、所述第二HRTF数据组、所述第三HRTF数据组和所述第四HRTF数据组,确定第一输出信号和第二输出信号。
  12. 根据权利要求11所述的三维音效的实现装置,其中,所述第一HRTF数据组包括第一HRTF数据和第二HRTF数据,所述第二HRTF数据组包括第三HRTF数据和第四HRTF数据,所述第三HRTF数据组包括第五HRTF数据和第六HRTF数据,所述第四HRTF数据组包括第七HRTF数据和第八HRTF数据;
    所述第二确定模块,用于:
    根据所述第一合成信号、所述第一HRTF数据、所述第二合成信号、所述第三HRTF数据、所述第三合成信号、所述第五HRTF数据、所述第四合成信号和所述第七HRTF数据,确定所述第一输出信号;
    根据所述第一合成信号、所述第二HRTF数据、所述第二合成信号、所述第四HRTF数据、所述第三合成信号、所述第六HRTF数据、所述第四合成信号和所述第八HRTF数据,确定所述第二输出信号。
  13. 一种存储介质,其中,所述存储介质中存储有计算机程序,当所述计算机程序在计算机上运行时,使得所述计算机执行权利要求1至7任一项所述的三维音效的实现方法。
  14. 一种电子设备,其中,所述电子设备包括处理器和存储器,所述存储器中存储有计算机程序,所述处理器通过调用所述存储器中存储的所述计算机程序,用于执行:
    获取声源对应的输入信号,并获取声源的位置信息;
    根据所述位置信息,对所述输入信号进行分解,得到多个子输入信号;
    根据所述多个子输入信号,确定所述输入信号在预先设置的四个位置中的每个位置的合成信号;
    获取所述预先设置的四个位置中的每个位置对应的HRTF数据组;
    根据所述输入信号在预先设置的四个位置中的每个位置的合成信号,以及所述每个位置对应的HRTF数据组,确定第一输出信号和第二输出信号,其中,所述第一输出信号和第二输出信号为输出到耳机中的信号。
  15. 根据权利要求14所述的电子设备,其中,所述处理器用于执行:
    从用户处接收对预设界面的点击操作;
    根据所述点击操作确定声源对应的输入信号,以及所述声源在预设直角坐标系中的坐标点;
    确定连接所述坐标点和预设直角坐标系的原点的目标连线与预设直角坐标系的X轴的正半轴的目标夹角,其中,所述目标夹角为所述X轴的正半轴向Y轴的正半轴方向旋转至所述目标连线所对应的夹角;
    获取所述声源对应的输入信号,并获取所述目标夹角的角度值;
    根据所述角度值,对所述输入信号进行分解,得到多个子输入信号。
  16. 根据权利要求15所述的电子设备,其中,所述处理器用于执行:
    根据所述输入信号和所述角度值的余弦函数,确定第一子输入信号;
    根据所述输入信号和所述角度值的正弦函数,确定第二子输入信号;
    根据所述第一子输入信号和所述第二子输入信号,确定所述输入信号在所述预先设置的四个位置中的每个位置的合成信号。
  17. 根据权利要求16所述的电子设备,其中,所述预先设置的四个位置包括第一位置、第二位置、第三位置和第四位置;
    所述处理器用于执行:
    根据所述第一子输入信号、所述第二子输入信号和第一预设值,确定所述输入信号在所述第一位置的第一合成信号;
    根据所述第一子输入信号、所述第二子输入信号和第二预设值,确定所述输入信号在所述第二位置的第二合成信号;
    根据所述第一子输入信号、所述第二子输入信号和第三预设值,确定所述输入信号在所述第三位置的第三合成信号;
    根据所述第一子输入信号、所述第二子输入信号和第四预设值,确定所述输入信号在所述第四位置的第四合成信号;
    获取所述第一位置对应的第一HRTF数据组、所述第二位置对应的第二HRTF数据组、所述第三位置对应的第三HRTF数据组和所述第四位置对应的第四HRTF数据组;
    根据所述第一合成信号、所述第二合成信号、所述第三合成信号、所述第四合成信号、所述第一HRTF数据组、所述第二HRTF数据组、所述第三HRTF数据组和所述第四HRTF数据组,确定第一输出信号和第二输出信号。
  18. 根据权利要求17所述的电子设备,其中,所述第一HRTF数据组包括第一HRTF数据和第二HRTF数据,所述第二HRTF数据组包括第三HRTF数据和第四HRTF数据,所述第三HRTF数据组包括第五HRTF数据和第六HRTF数据,所述第四HRTF数据组包括第七HRTF数据和第八HRTF数据;
    所述处理器用于执行:
    根据所述第一合成信号、所述第一HRTF数据、所述第二合成信号、所述第三HRTF数据、所述第三合成信号、所述第五HRTF数据、所述第四合成信号和所述第七HRTF数据,确定所述第一输出信号;
    根据所述第一合成信号、所述第二HRTF数据、所述第二合成信号、所述第四HRTF数据、所述第三合成信号、所述第六HRTF数据、所述第四合成信号和所述第八HRTF数据,确定所述第二输出信号。
  19. 根据权利要求16所述的电子设备,其中,所述处理器用于执行:
    根据所述输入信号和第五预设值,确定第三子输入信号;
    根据所述第一子输入信号、所述第二子输入信号和所述第三子输入信号,确定所述输入信号在预先设置的四个位置中的每个位置的合成信号。
  20. 根据权利要求14所述的电子设备,其中,所述处理器用于执行:
    采用人工混响算法对所述第一输出信号和所述第二输出信号进行混响处理;
    将经过混响处理的第一输出信号和第二输出信号输出到耳机中。
PCT/CN2018/116216 2018-11-19 2018-11-19 三维音效的实现方法、装置、存储介质及电子设备 WO2020102941A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201880097706.0A CN112789869B (zh) 2018-11-19 2018-11-19 三维音效的实现方法、装置、存储介质及电子设备
PCT/CN2018/116216 WO2020102941A1 (zh) 2018-11-19 2018-11-19 三维音效的实现方法、装置、存储介质及电子设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/116216 WO2020102941A1 (zh) 2018-11-19 2018-11-19 三维音效的实现方法、装置、存储介质及电子设备

Publications (1)

Publication Number Publication Date
WO2020102941A1 true WO2020102941A1 (zh) 2020-05-28

Family

ID=70774125

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/116216 WO2020102941A1 (zh) 2018-11-19 2018-11-19 三维音效的实现方法、装置、存储介质及电子设备

Country Status (2)

Country Link
CN (1) CN112789869B (zh)
WO (1) WO2020102941A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114630145A (zh) * 2022-03-17 2022-06-14 腾讯音乐娱乐科技(深圳)有限公司 一种多媒体数据合成方法、设备及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1901761A (zh) * 2005-07-20 2007-01-24 三星电子株式会社 宽单声道声音再现方法和设备
US20160119737A1 (en) * 2013-05-24 2016-04-28 Barco Nv Arrangement and method for reproducing audio data of an acoustic scene
CN105872940A (zh) * 2016-06-08 2016-08-17 北京时代拓灵科技有限公司 一种虚拟现实声场生成方法及系统
CN106454686A (zh) * 2016-08-18 2017-02-22 华南理工大学 一种基于体感摄像头的多通路环绕声动态双耳重放方法
CN107360494A (zh) * 2017-08-03 2017-11-17 北京微视酷科技有限责任公司 一种3d音效处理方法、装置、系统及音响系统

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101516055B (zh) * 2008-02-18 2010-06-09 昊迪移通(北京)技术有限公司 一种能够模拟不同音响环境的三维回声音效方法和设备
JP2009206691A (ja) * 2008-02-27 2009-09-10 Sony Corp 頭部伝達関数畳み込み方法および頭部伝達関数畳み込み装置
KR101496760B1 (ko) * 2008-12-29 2015-02-27 삼성전자주식회사 서라운드 사운드 가상화 방법 및 장치
US10827292B2 (en) * 2013-03-15 2020-11-03 Jawb Acquisition Llc Spatial audio aggregation for multiple sources of spatial audio
CN104869524B (zh) * 2014-02-26 2018-02-16 腾讯科技(深圳)有限公司 三维虚拟场景中的声音处理方法及装置
CN108766457B (zh) * 2018-05-30 2020-09-18 北京小米移动软件有限公司 音频信号处理方法、装置、电子设备及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1901761A (zh) * 2005-07-20 2007-01-24 三星电子株式会社 宽单声道声音再现方法和设备
US20160119737A1 (en) * 2013-05-24 2016-04-28 Barco Nv Arrangement and method for reproducing audio data of an acoustic scene
CN105872940A (zh) * 2016-06-08 2016-08-17 北京时代拓灵科技有限公司 一种虚拟现实声场生成方法及系统
CN106454686A (zh) * 2016-08-18 2017-02-22 华南理工大学 一种基于体感摄像头的多通路环绕声动态双耳重放方法
CN107360494A (zh) * 2017-08-03 2017-11-17 北京微视酷科技有限责任公司 一种3d音效处理方法、装置、系统及音响系统

Also Published As

Publication number Publication date
CN112789869B (zh) 2022-05-17
CN112789869A (zh) 2021-05-11

Similar Documents

Publication Publication Date Title
CN110288997A (zh) 用于声学组网的设备唤醒方法及系统
US11595774B2 (en) Spatializing audio data based on analysis of incoming audio data
US11651772B2 (en) Narrowband direction of arrival for full band beamformer
CN106485956A (zh) 一种演示电子设备功能的方法、装置和智能终端
CN109996166A (zh) 声音处理装置和方法、以及程序
US20140052438A1 (en) Managing audio capture for audio applications
US20200265848A1 (en) Method for recovering audio signals, terminal and storage medium
CN108281152A (zh) 音频处理方法、装置及存储介质
CN112465945B (zh) 一种模型生成方法、装置、存储介质及计算机设备
US11696087B2 (en) Emphasis for audio spatialization
CN113630695A (zh) 声道切换方法、装置和电子设备
US20230055257A1 (en) Sound capture for mobile devices
JP2021167977A (ja) 音声信号処理方法、音声信号処理装置、電子機器及び記憶媒体
WO2020102941A1 (zh) 三维音效的实现方法、装置、存储介质及电子设备
CN108345440A (zh) 一种显示添加的几何图形辅助线的方法及其装置
CN111615045B (zh) 音频处理方法、装置、设备及存储介质
CN105959905B (zh) 混合模式空间声生成系统与方法
CN109584898B (zh) 一种语音信号的处理方法、装置、存储介质及电子设备
JP6985425B2 (ja) インコヒーレント冪等アンビソニックスレンダリング
CN112581947A (zh) 一种语音指令响应方法、装置及终端设备
WO2022222922A1 (zh) 语音信号的处理方法和装置
CN114520950B (zh) 音频输出方法、装置、电子设备及可读存储介质
CN115150494A (zh) 音频录制方法及装置、电子设备和可读存储介质
CN117837173A (zh) 用于音频渲染的信号处理方法、装置和电子设备
CN115499760A (zh) 一种基于对象的音频元数据空间标识转换方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18940678

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS (EPO FORM 1205A DATED 30.09.2021)

122 Ep: pct application non-entry in european phase

Ref document number: 18940678

Country of ref document: EP

Kind code of ref document: A1