WO2019080901A1 - 交互界面的显示方法和装置、存储介质、电子装置 - Google Patents
交互界面的显示方法和装置、存储介质、电子装置Info
- Publication number
- WO2019080901A1 WO2019080901A1 PCT/CN2018/111915 CN2018111915W WO2019080901A1 WO 2019080901 A1 WO2019080901 A1 WO 2019080901A1 CN 2018111915 W CN2018111915 W CN 2018111915W WO 2019080901 A1 WO2019080901 A1 WO 2019080901A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- account
- voice
- server
- target
- location
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/16—Sound input; Sound output
Definitions
- the present application relates to the field of the Internet, and in particular, to a display method and apparatus for an interactive interface, a storage medium, and an electronic device.
- the application client collects Pulse Code Modulation (PCM) audio data of the microphone. Pre-optimize the PCM data (such as denoising, judging whether it is muted, etc.), then use the voice compression library to compress and send it to the voice server through the User Datagram Protocol (UDP). After receiving the voice packet, the voice server determines the channel the player is in and forwards the voice packet to other clients in the same channel. The client that receives the voice packet decompresses the audio and plays it.
- PCM Pulse Code Modulation
- UDP User Datagram Protocol
- the current voice solution is in the form of a voice group (members of the same voice group are located in the same channel).
- the voice server sends the voice to the voice server because the transmission bandwidth and the server bearability are limited.
- the voice server may exceed the maximum load and affect the voice quality.
- the embodiment of the present application provides a display method and device for an interactive interface, a storage medium, and an electronic device, so as to at least solve the technical problem that the voice solution in the related art easily causes the voice server to exceed the maximum load.
- a method for transmitting a voice includes: acquiring, by a server, a first voice of a first account, where the first account is an account in a target application, and the first account is used to identify a first object in the scene map of the target application, where the location of the first object in the scene map is a first location; the server acquires a second account in the target application, and the second account is used to identify the first object in the scene map
- the second object of the voice, the second object is an object in the first area of the scene map, the first area is determined by the first location; and the server sends the first voice to the second account.
- a method for transmitting a voice includes: the terminal logging in a second account of the target application on the second client of the target application, where the second account is used to identify the target a second object in the applied scene map; the terminal receives, on the second client, the first voice forwarded by the first account by the server, where the first account is used to identify the first object located in the first location in the scene map, the server And determining, by the first location, a first area in the scene map that allows the first object to be heard, and the second object is an object in the first area.
- a voice transmission apparatus which is applied to a server, where the apparatus includes: a first acquiring unit, configured to acquire a first voice of a first account, where the first account is An account in the target application, where the first account is used to identify the first object in the scene map of the target application, the location of the first object in the scene map is the first location, and the second acquiring unit is configured to obtain the first in the target application.
- the first sending unit is configured to send the first voice to the second account.
- a voice transmission apparatus is further provided, which is applied to a terminal, where the apparatus includes: a login unit, configured to log in to the second account of the target application on the second client of the target application.
- the second account is used to identify the second object in the scene map of the target application;
- the receiving unit is configured to receive, on the second client, the first voice forwarded by the first account by the server, where the first account is used for Identifying a first object located at a first location in the scene map, the server configured to determine, according to the first location, a first region of the scene map that allows to hear the voice of the first object, the second object being an object in the first region.
- the server acquires the first voice of the first account in the target application, where the first account is used to identify the first object located in the first location in the scenario map of the target application, and the server obtains the target application in the target application.
- a second account wherein the second account is used to identify a second object in the scene map that allows to hear the voice of the first object, and the second object is an object in the first region determined by the first location in the scene map, and the server
- the first voice is sent to the second account in the first area, thereby implementing location-based voice forwarding, which can solve the technical problem that the voice solution in the related art easily causes the voice server to exceed the maximum load, thereby achieving the voice server reduction.
- the technical effect of the load is a second account in the scene map that allows to hear the voice of the first object, and the second object is an object in the first region determined by the first location in the scene map
- FIG. 1 is a schematic diagram of a hardware environment of a method for transmitting voice according to an embodiment of the present application
- FIG. 2 is a flowchart of an optional voice transmission method according to an embodiment of the present application.
- FIG. 3 is a flowchart of an optional voice transmission method according to an embodiment of the present application.
- FIG. 4 is a schematic diagram of an optional voice system architecture in accordance with an embodiment of the present application.
- FIG. 5 is a schematic diagram of an optional voice system architecture according to an embodiment of the present application.
- FIG. 6 is a schematic diagram of an optional sound propagation range in accordance with an embodiment of the present application.
- FIG. 7 is a flow chart of an alternative sound attenuation in accordance with an embodiment of the present application.
- FIG. 8 is a flow chart of an alternative sound attenuation in accordance with an embodiment of the present application.
- FIG. 9 is a flowchart of an optional voice transmission method according to an embodiment of the present application.
- FIG. 10 is a schematic diagram of an optional virtual reality scenario according to an embodiment of the present application.
- FIG. 11 is a schematic diagram of an optional client interface according to an embodiment of the present application.
- FIG. 12 is a schematic diagram of an optional voice transmission apparatus according to an embodiment of the present application.
- FIG. 13 is a schematic diagram of an optional voice transmission apparatus according to an embodiment of the present application.
- FIG. 14 is a structural block diagram of a terminal according to an embodiment of the present application.
- Dry sound The original sound collected from the microphone without any processing.
- Wet sound The sound that has been processed by the collected sound waves as needed.
- a method embodiment of a method for transmitting a voice is provided.
- the voice transmission method may be applied to a hardware environment formed by the server 102 and the terminal 104 as shown in FIG. 1.
- the server 102 is connected to the terminal 104 through a network.
- the network includes but is not limited to a wide area network, a metropolitan area network, or a local area network.
- the terminal 104 is not limited to a PC, a mobile phone, a tablet, or the like.
- the voice transmission method of the embodiment of the present application may be performed by the server 102, may be performed by the terminal 104, or may be jointly performed by the server 102 and the terminal 104.
- the method for transmitting the voice performed by the terminal 104 in the embodiment of the present application may also be performed by a client installed thereon.
- the program code corresponding to the method of the present application may be directly executed on the server or the terminal.
- the voice transmission method of the embodiment of the present application is performed by the server and the terminal together, the voice is sent by the terminal to the server.
- the server executes the program code corresponding to the method of the present application, and forwards the voice to the matching location. Required terminal.
- FIG. 2 is a flowchart of an optional voice transmission method according to an embodiment of the present application, as shown in FIG. 2 . As shown, the method can include the following steps:
- Step S202 Acquire a first voice of the first account, where the first account is an account in the target application, and the first account is used to identify the first object in the scene map of the target application, and the location of the first object in the scene map. For the first position.
- the above targeted applications include, but are not limited to, social applications, game applications, and life applications.
- the target application can realize the recognition of the location of the object in the scene map.
- the scene map is a two-dimensional 2D map
- the recognized position is the two-dimensional position information (such as two-dimensional coordinates) of the object
- the scene map is When a three-dimensional 3D map is used, the recognized position is the three-dimensional position information (such as three-dimensional coordinates) of the object.
- the first voice that is, the voice sent by the first account, is regarded as the voice that is sent by the first object in the scene map at the first location in the target application.
- Step S204 The server acquires a second account in the target application, where the second account is used to identify a second object in the scene map that allows to hear the voice of the first object, and the second object is an object in the first region of the scene map.
- the first area is determined by the first location.
- the first area is an area that is allowed to hear the voice sent from the first location according to the first location, and when the server acquires the first voice of the first account, finds the second of all the second objects in the area. Account number to send the first voice to the second account.
- Step S206 the server sends the first voice to the second account.
- the voice solution is in the form of a voice group.
- the voice server sends voice to all members in the voice group because the transmission bandwidth and the server bearability are limited. This may cause the voice server to exceed the maximum load and affect the voice quality.
- a new voice forwarding policy is provided.
- the first object sends a voice
- only the voice is forwarded to the second object adjacent to the object, and the voice is not forwarded to the voice. All objects in the scene map, reducing the load on the voice server.
- the server acquires the first voice of the first account in the target application, where the first account is used to identify the first object located in the first location in the scene map of the target application, and the server acquires the target application.
- a second account wherein the second account is used to identify a second object in the scene map that allows to hear the voice of the first object, and the second object is an object in the first region determined by the first location in the scene map
- the server The first voice is sent to the second account in the first area, so that the voice forwarding based on the account location is implemented, which can solve the technical problem that the voice solution in the related art easily causes the voice server to exceed the maximum load, thereby achieving the reduction.
- the technical effect of the load of the voice server is used to identify the first object located in the first location in the scene map of the target application, and the server acquires the target application.
- the voice room-based scheme in the related art is more suitable for a limited number of game scenarios, and the limitation is as follows: at the same time, there is an upper limit on the number of speakers, generally about 6 digits, more than the number of people, and the network data forwarding pressure is too large, and a sound is generated.
- the problem of delays and delays is increased; the target is not flexible, and the chat object can be switched through the process of building, adding, and checking out, in a massively multiplayer online role-playing game (Massive or Massively Multiplayer Online Role-Playing Game,
- the user experience is not good in games such as MMORPG.
- the voices are pure 2D voices, which are difficult to integrate with ordinary 3D scenes, and lack of sense of substitution.
- the present application proposes a new voice solution, which has the following features: the concept of removing the traditional voice room, without the maximum number of people, the player's freedom of communication is greatly improved; removing the maximum number of simultaneous speaking restrictions, through the player The relative position dynamically forwards the voice data, avoiding the problem of the number of voices being transmitted at the same time; using 3D audio technology to simulate the real voice propagation, greatly improving the realism of the voice environment, and solving the voice interaction of large-scale players simultaneously online. problem.
- the player upper limit is not set, the voice object is dynamically determined according to the player position, and what is seen and talked; without the voice room concept, all players in one world, each person may communicate with each other; the player's voice is added to the space. Sense, matching the player's 3D environment, adds immersion.
- the voice server obtains the first voice of the first account, where the first account is a class index (a type of account), and refers to an account that sends voice at the current time in the target application, which may be one. Or multiple, there is no limit to the number of first accounts here.
- class index a type of account
- the threads may be processed by multiple threads running in parallel, and each thread processes the first voice of the first account, and performs subsequent operations.
- the steps including but not limited to steps S204 to S206), such as searching for the corresponding second account, sending a voice (such as the first voice described above) to the second account or the like.
- step S204 when the voice server obtains the second account in the target application, the second object located in the first area may be searched for in the object in the scene map, and the second object is obtained.
- the second account, the first area is an area determined by the distance that the first voice propagates in the target direction in the scene map based on the first position.
- the target direction is one or more. If the area where the first object is located is relatively simple, such as opening an area without an obstacle, the distance of the first sound in any direction in the area is substantially equal.
- the target direction may be an arbitrary orientation direction, and the first region obtained is a circular region having a radius R, and R is a propagation distance of the voice in the target direction.
- the target direction is in a plurality of different directions, so as to measure the propagation distance in the plurality of directions, thereby determining the first region.
- the first area can be determined by the following methods:
- Step S11 In the case where there is no obstacle in the target direction with the first position as the starting point in the scene map, the first attenuation model is used to determine the first transmission distance of the first voice in the target direction, and the first attenuation model is used. Representing the relationship between the distance traveled by the voice in the first medium and the attenuation of the sound intensity, the first medium being the transmission medium of the first voice in the target direction.
- the first attenuation model can be a linear model and a nonlinear model.
- the two principles are basically similar and can be selected according to actual needs.
- the following is a detailed example of a linear model.
- the unit of the sound intensity here can be dB, and the distance unit is meters.
- Step S12 in the case where there is an obstacle in the target direction with the first position as the starting point in the scene map, the first transmission distance of the first voice in the target direction is determined according to the first attenuation model and the second attenuation model, and second The attenuation model is used to represent the relationship between the distance the speech propagates in the obstacle and the attenuation of the sound intensity.
- the above obstacle refers to an obstacle within the propagation range of the first audio, as in the above assumption, an obstacle within 90 meters from the first position.
- the second attenuation model may also be a linear model and a nonlinear model.
- the two principles are basically similar, and may be selected according to actual needs.
- the above y2 refers to the sound intensity when the first voice is transmitted to the obstacle, and can be calculated by referring to the calculation formula of the first attenuation model, for example, obtaining the distance between the first position and the obstacle.
- step S12 there are the following two results, one is that the first speech cannot pass through the obstacle, and the distance that the first speech can propagate in the obstacle can be calculated by the second attenuation model.
- l2 [(a-k1 *l1)-c]/k2, where l1 is the distance between the first position and the obstacle.
- step S12 can be implemented by the following substeps:
- Step S122 in the case that the first sound is stronger than the target sound intensity, the second sound intensity when the first voice passes the obstacle is determined by using the second attenuation model, and the target sound intensity is the minimum allowed to be heard by the object in the target application.
- Sound intensity that is, the minimum sound intensity that can be heard by the human ear
- y2 (a-k1*l1)-k2*x
- the value of x is the length of the obstacle in the target direction or the distance l3, and the y2 is obtained.
- the value is (a-k1*l1)-k2*l3;
- Step S124 the distance between the first position and the obstacle, the length of the obstacle in the target direction, and the sum of the second distances are taken as the first transmission distance.
- step S13 the position after the first transmission distance is transmitted in the target direction starting from the first position is used as the area boundary of the first area.
- the first area is a circle having a radius of the first transmission distance; if the area where the first object is located is relatively complicated, the first area includes the first position, and The position reached by the first transmission distance calculated in any direction of a position is the boundary of the area in that direction.
- the search of the second account includes, but is not limited to, the following two implementation manners.
- One is that the server finds the related second account according to the location relationship when receiving the voice; the second is that the client specifies the account associated with the account (ie, , the account near the account), the following two ways to detail.
- the server finds the account in real time.
- step S21 the server determines the first area in the scene map by the above manner (ie, step S121 to step S124).
- Step S22 The server searches for the second object located in the first area, and acquires a second account used to identify the second object.
- the server finds the account through the previously maintained target relationship table (ie, the account list).
- step S31 the target relationship table is created, and when the position of the target object (that is, any one of the objects in the scene map) changes, the target relationship table is updated, and the target object is the object identified by the account number in the target relationship table.
- Mode 1 is maintained by the client for the maintenance of the target relationship table.
- the target object includes at least one of a first object, a second object, and a third object, where when the server updates the target relationship table, the update information sent by the first client of the target application is obtained, and is updated according to the update.
- the information is updated to the target relationship table, and the first account is used on the first client, wherein the update information includes at least one of the first information, the second information, and the third information.
- the first information is used to indicate the third account, and the third object identified by the third account is an object that changes in position in the scene map, and the first client monitors the position change of the object in the first area in real time, in the third
- the object is located at a position before the position change (ie, located in the first area), allowing the third object to hear the voice of the first object, and the third object is located at the position after the position change (ie, the third object moves out of the first In the case of an area, the third object is not allowed to hear the voice of the first object, and the first message is generated by the first client and sent to the server.
- the second information is used to indicate the second account, and the second object identified by the second account is an object that changes position in the scene map, and the second object is located before the position change (ie, not in the first area). Not allowing the second object to hear the voice of the first object, and in the case where the second object is located at the position after the position change (ie, in the first region), allowing the second object to hear the voice of the first object, which is generated The second information above.
- the third information is used to indicate a fourth account
- the fourth account is used to identify an object that allows to hear the voice of the first object located in the second location, where the second location is a location in the scene map after the location change of the first object occurs.
- the first object is located at a first position in the scene map before the position change occurs, and after the first object moves to the second position, the first area is recalculated, and the fourth object in the recalculated first area is recalculated
- the account number is sent to the server through a third message.
- the situation in which the account associated with the first account in the target relationship table is changed is divided into three types. Accordingly, the target relationship table is updated according to the update information, and there are also three cases:
- the server releases the association between the third account indicated by the first information and the first account in the target relationship table.
- the second is that in the case that the second object has a position change in the scene map, the server sets the second account indicated by the second information to be associated with the first account in the target relationship table.
- the third is that in the case where the first object changes position in the scene map, the server sets the fourth account indicated by the third information to be associated with the first account in the target relationship table.
- Mode 2 Maintenance of the target relationship table by the server
- the target object includes at least one of the first object, the second object, and the third object.
- the server updates the target relationship table
- the location change information of the target object is acquired, and the target relationship table is updated according to the location change information.
- the position change information is used to indicate at least one of the second position, the third position, and the fourth position.
- the second location is a location where the first object is located after the location change in the scene map, and is reported by the first client.
- the third position is a position where the second object is located after the position change in the scene map, and in the case where the second object is located before the position change (ie, outside the first area), the second object is not allowed to hear.
- the voice of the first object in the case that the second object is located in the third position after the position change (ie, located in the first area), allowing the second object to hear the voice of the first object, and the third location is located by the second account
- the second client is reported.
- the fourth position is a position where the third object is located after the position change in the scene map, and in the case where the third object is located before the position change (ie, located in the first area), the third object is allowed to hear the first
- the voice of an object in the case where the third object is located at the fourth position after the position change (ie, outside the first area), the third object is not allowed to hear the voice of the first object, and the third object is the target application.
- the third location identified by the third account is located in the scene map, and the fourth location is reported by the third client where the third account is located.
- the situation in which the account associated with the first account in the target relationship table is changed is divided into three types. Accordingly, the target relationship table is updated according to the update information, and there are also three cases:
- the second is that, in the case where the location of the second object changes, the server sets the second account to be associated with the first account in the target relationship table according to the location change information.
- the third is that, when the location of the first object changes, the server sets the fourth account to be associated with the first account in the target relationship table according to the location change information, where the first object is located in the scene after the location change A second location in the map, the fourth account number is used to identify an object that allows the voice of the first object located in the second location to be heard.
- Step S32 the server searches for the second account associated with the first account from the target relationship table when needed, and in the case of the second object that allows the second account identifier to hear the voice of the first object, The second account is set to be associated with the first account.
- the server sends the first voice to the second account, that is, the first voice of the 3D type is sent to the second client, and the second account is used by the second client of the target application.
- FIG. 3 is a flowchart of an optional voice transmission method according to an embodiment of the present application, as shown in FIG. As shown, the method can include the following steps:
- Step S302 The terminal logs in to the second account of the target application on the second client of the target application, where the second account is used to identify the second object in the scene map of the target application.
- Step S304 the terminal receives, on the second client, the first voice that is forwarded by the first account by the server, where the first account is used to identify the first object located in the first location in the scene map, and the server is configured to determine according to the first location.
- a first area of the voice of the first object is allowed to be heard in the scene map, and the second object is an object in the first area.
- the terminal logs in the second account of the target application on the second client of the target application, where the second account is used to identify the second object in the scene map of the target application, and the terminal is in the second client.
- the first area of the voice of the object, and the second object is the object in the first area, thereby realizing location-based voice forwarding, which can solve the technical problem that the voice solution in the related art easily causes the voice server to exceed the maximum load, thereby achieving The technical effect of reducing the load of the voice server.
- step S302 the terminal logs in the second account of the target application on the second client of the target application.
- a second client of the target application is installed on the terminal. After logging in to the second account of the target application on the second client of the target application, the user (ie, the second account) can receive and send voice through the second client.
- the second voice of the second account is obtained in the second client. If the second voice is not a private message, the second voice is sent to the responding account according to the current location of the second object; if the second voice is a private message, the second voice is sent to the fifth account specified by the second account (specific The second voice is sent to the fifth account through the server.
- setting may be performed in the second client, and setting the sending object of the private message (ie, the fifth account) .
- the fifth account number may be multiple, and when the server sends the second voice to the fifth account, the server sends the second voice to the multiple fifth accounts, where each fifth account is used to identify A fifth object in the virtual reality scene map, the target application is a virtual reality application.
- step S304 when the second client receives the voice, the terminal receives the first voice forwarded by the first account by the server on the second client, and may be the 3D type received on the second client.
- the first voice when the second client receives the voice, the terminal receives the first voice forwarded by the first account by the server on the second client, and may be the 3D type received on the second client. The first voice.
- the second account may specify that the account is banned (such as the first account) in the second client, and the banned accounts are set to the specified type of account.
- the second client After receiving the first voice forwarded by the first account by the server, the second client determines the type of the first account. If the first account is the account of the specified type, the first voice is not played in the second client. The specified type of account is the banned account specified by the second account.
- the second client acquires the third voice of the first voice, and the third tone
- the strong is the sound intensity attenuated when the first voice is transmitted from the first position to the fifth position where the second object is located; and the first voice is played on the second client according to at least the third sound intensity.
- the foregoing step, “playing the first voice according to the third tone strength on the second client” may be, on the second client, the first sound source information according to the third sound intensity and the first voice. Voice playback.
- the third client obtains the third sound intensity of the first voice by the following two methods:
- Method 1 is calculated by the client in real time
- a third pitch is determined or calculated based on the fifth location and the first location on the second client.
- the second client determines a second transmission distance between the fifth location where the second object is located and the first location, and the second client uses The attenuation model determines a third intensity that the first speech is attenuated after transmission through the second transmission distance, and the attenuation model is used to represent the relationship between the distance of speech propagation and the attenuation of the sound intensity.
- the attenuation model here may be the first attenuation model and/or the second attenuation model described above, and the specific calculation manner refers to the previous embodiment.
- Method 2 is calculated by the server and sent to the second client.
- the second client obtains, from the server, a third pitch determined by the server based on the fifth location and the first location.
- the sound intensity acquisition here may be that the second client actively requests the server, or may be delivered together when the server sends the first voice.
- the calculation method of the server is the same as or similar to that of the second client, and is not described here.
- the second client obtains the sound source information in the following two manners:
- Method 1 is calculated by the client in real time
- the second client When determining the sound source information according to the first position and the fifth position of the second object, the second client first determines the transmission direction of the first voice according to the first location and the fifth location (ie, the direction from the first location to the fifth location) The angle between the transmission direction and the target direction is taken as the sound source angle, and the target direction is the direction in which the line perpendicular to the line between the ears of the second object is located, and the sound source information includes the sound source angle.
- Method 2 is calculated by the server and sent to the second client.
- the second client acquires sound source information determined by the server according to the first location and the fifth location.
- the process of calculating the sound source information by the server is the same as or similar to the process of calculating the second client, and details are not described herein again.
- the second client When the first voice is played according to the third sound intensity and the sound source information of the first voice on the second client, the second client according to the third sound intensity, the target binaural time difference, the target binaural intensity difference, and the target spectrum At least one of the changes plays the first voice.
- the target binaural time difference is determined according to the sound source angle indicated by the sound source information, the brain radius of the second object, and the sound transmission speed; the target binaural intensity difference is determined according to the sound source angle and the sound frequency of the first voice.
- the target spectral change is determined based on the sound source angle, the sound source elevation angle, the distance of the sound source from the first object, the angular velocity of the sound source, and the brain size of the second object.
- FIG. 4 An optional voice system architecture diagram is shown in FIG. 4
- FIG. 5 An optional voice system architecture diagram of the present application is shown in FIG. 5 . Both differ in terms of client logic, server logic, and communication data between the two.
- the processing logic of voice is as follows:
- step S41 the client (such as client 1 and client 2) collects voice (gets the microphone data) by calling the microphone on the terminal, compresses the code and transmits it to the voice server through the network.
- the client such as client 1 and client 2 collects voice (gets the microphone data) by calling the microphone on the terminal, compresses the code and transmits it to the voice server through the network.
- step S42 the voice server collects voice data of each client in real time, performs silence detection (VOD) and mixing processing, and converts the voice data into one channel to all clients in the room.
- VOD silence detection
- Step S43 After receiving the voice data sent from the network, the client performs decompression and decoding processing, and plays through the audio interface of the corresponding hardware platform (here, the direct play does not distinguish which account object the voice comes from, and plays in the same manner. ).
- the client collects the relative position information of the object in the scene map on the basis of collecting the microphone data.
- the client determines the account to send the voice (ie, MemberID, or player account ID) through the location information, and periodically updates it to the server.
- voice ie, MemberID, or player account ID
- this function can also be performed by the server.
- the server does not send a voice to all players, and decides whether to send to the designated player by judging the list of account IDs uploaded by the client.
- the client of the account receives the data pushed by the server, indicating that he can hear the voice corresponding to the data, and then uses the 3D playback strategy to play the voice locally.
- the sound propagation range of each player is predefined, or dynamically adjusted according to changes in the environment (such as different air and water propagation ranges, different indoor and wilderness areas, and whether there are obstacles, etc.).
- player 1 (account ID1) is in the current propagation range R1
- player 2 (account ID2) has a propagation range of R2
- each player has a propagation object list MemberIdList, such as player 1's list including ID3, ID4, ID8.
- the list represents the account ID of other players to be delivered by the voice.
- the process of changing the movement trajectory in Fig. 6 below simulates a typical process of changing the positional relationship of the player.
- step S51 on the client 1, the main character is player 1, the player 8 (corresponding to the account ID8) enters the propagation range R1 of the player 1 from the outside, the memberId1 of the player 1 adds the ID8, and triggers the MemberIdList change event.
- step S52 according to the event, the MemberIdList1 is uploaded to the server, and the server sends an object to change.
- step S53 the player 8 continues to move within the range of R1, at which time the transmission relationship has not changed and no processing is performed.
- step S54 the player 8 moves and leaves the R1 range, and the player 1 removes it from the MemberIdList1 and triggers the MemberIdList change event, also uploads the server and updates the sending policy.
- the change process is similar to the above process.
- the server forwards all players' policies. Referring to Table 1, the server forwarding process is described as follows:
- step S61 the application is started to create an empty two-dimensional table, and the horizontal and vertical images represent different player IDs.
- step S62 when all players join, an item is added in the horizontal and vertical directions, and when the player quits, the previous item is deleted.
- step S63 taking the player ID1 as an example, if there are three player ID2 and ID5 in the current range R1, the server updates the entry according to the information. As shown in Table 1, "1" represents transmission, and "0" represents no transmission.
- step S64 the server dynamically maintains the forwarding table according to the information uploaded by each player.
- step S65 when the data is forwarded, the voice data is dynamically sent according to the flow direction of the forwarding table, and if it is "0", it is not sent to the corresponding player. For the voice of the player ID5, only the player ID1 and the player ID2 need to be sent.
- the above forwarding strategy is often generated by a sparse matrix, which can greatly reduce the forwarding pressure of the server.
- the voice transmitted by the server to the client is filtered by distance. It fully utilizes the characteristics of sound attenuation. In the performance of the client, it can express the effect of this attenuation, and join 3D. The sound effect makes the player's voice more realistic. This process can be described as the conversion of Dry Sound to Wet Sound, which is done in two stages.
- the sense of distance can be realized by the loudness attenuation of the sound.
- the loudness is also called the volume and the sound intensity. It is the subjective feeling of the human ear on the strength of the sound heard.
- the objective evaluation scale is the amplitude of the sound. This feeling is derived from the pressure generated when the object vibrates, that is, the sound pressure.
- the sound pressure is divided into "levels" (sound pressure levels) so that the intensity of the sound can be objectively expressed, and the unit is called “decibel” (dB).
- the attenuation radius of the sound is 100m
- the maximum loudness (volume) of the sound is 100
- the minimum loudness is 0, then the player can hear at a distance of 30m from the sound.
- the loudness is 70, and the loudness is 0 at a distance of 110m, that is, no sound is heard.
- the loudness is up to 100. In this way, the player can perceive the sound source distance by changing the loudness of the sound.
- the position information of a sound can be obtained and analyzed by the human brain in the following three ways:
- ITD Interaural Time Difference
- the second is: the difference in the intensity of the sound transmitted to the left and right ears (English full name Interaural Level Difference, can be referred to as ILD), this is because the sound is blocked by the head, resulting in different sound intensity of the left and right ears.
- ILD Interaural Level Difference
- the third is: the spectrum filtering of sound coming from different directions around the human brain. This is because the sound is emitted from different parts of the body (such as the trunk, shoulders, auricles, etc.) when the sound is transmitted from the outside to the auricle. Variety.
- the time difference before the ears is related to the frequency of the sound.
- the source frequency is f
- the angular position of the sound source relative to the human brain is ⁇
- the radius of the human brain is r
- the speed of the sound is c.
- the ITD time difference is proportional to r and sin( ⁇ ), and inversely proportional to c.
- Applicant recognizes that the sound on the right side of the brain is transmitted to the right ear at a greater intensity than the sound transmitted to the left ear. This is due to the fact that the left ear is blocked by the head, the so-called Head Shadow phenomenon. And, as the frequency of the sound itself changes, the ILD also changes. The higher the sound frequency f, the more obvious the ILD. A large number of theoretical studies have shown that ILD is a function of frequency f and vocal angle position ⁇ , which is proportional to f and sin( ⁇ ).
- the ITD can be applied to the time change of the left and right channels in real time, and the ILD is applied to the intensity changes of the left and right channels, thereby initially realizing the sound localization function.
- the human brain can also determine the direction of the sound for the spectral changes produced when the sound is transmitted from different directions.
- HRTF head related transfer function
- HRFT represents the process of converting the spectrum of sound from any orientation to the spectrum heard at the position of the auricle. For the left and right ears, they can be expressed by the following formula:
- L and R represent the left and right ears, respectively, and PL and PR respectively represent the sound spectrum at the entrance of the left and right ear holes.
- P0 represents the spectrum of the sound at the center of the head, and this place is now unaffected by the audience.
- HL and HR are functions of the following parameters, the sound source angular position ⁇ , the sound source elevation angle ⁇ , the distance r between the sound source and the brain center, the sound source angular velocity ⁇ , and the head size ⁇ .
- the HFTF requires a large number of accurate data measurements.
- the MIT_KEMAR database can be used to collect 710 different positions in the range of -40 degrees to +90 degrees from vertical to 360 degrees.
- the HL and HR functions are recorded.
- the PL and PR values are inversely calculated in the following manner.
- PR(r, ⁇ , ⁇ , ⁇ , ⁇ ) HR(r, ⁇ , ⁇ , ⁇ , ⁇ )/P0(r, ⁇ ) (6)
- the above calculation may also be implemented using a database provided by a company such as LISTEN, CIPIC, FIU, or the like.
- a company such as LISTEN, CIPIC, FIU, or the like.
- the specific processing process is shown in Figure 9:
- step S901 the received dry sound is attenuated by the distance model, and the attenuated sound intensity is calculated.
- Step S902 transmitting the attenuated sound to the direction model.
- step S903 the direction model calculates the ITD and the ILD in the above manner, and then obtains a wet sound, and is played by the client.
- the above distance model and direction model can be integrated into the client.
- the technical solution of the present application is applicable to a multi-person voice interaction scenario based on a 3D scenario, and is applied to various applications, such as a 3D application, a VR virtual reality application, an AR augmented reality application, etc., and these types of applications include but are not limited to Games, social.
- the VR game may be a VR-based social game.
- the voice interaction with high degree of freedom is one of its highlights.
- the player logs in to the VR game service, enters a VR scene, and automatically matches the corresponding voice room, in which only one voice room is in the game scene. , so the players are in a virtual room, that is, a virtual world corresponds to a virtual voice room.
- the received player's voice will simulate the 3D positioning and attenuation of the real sound, so that the player's voice beyond a certain range will be hidden, which is convenient for positioning and avoids the noise caused by too much sound at the same time. problem.
- the player can also do some upper-level logic processing for a certain player chat, which can be implemented through system settings, such as banned words (by means of banned settings), private chat, and the like.
- FIG. 12 is a schematic diagram of an optional voice transmission apparatus according to an embodiment of the present application. As shown in FIG. 12, the apparatus may be applied to a server, where the apparatus may include: a first obtaining unit 1201 and a second acquiring unit. 1203 and a first sending unit 1205.
- the first acquiring unit 1201 is configured to acquire a first voice of the first account, where the first account is an account in the target application, and the first account is used to identify the first object in the scene map of the target application, where the first object is The position in the scene map is the first position.
- the above targeted applications include, but are not limited to, social applications, game applications, and life applications.
- the target application can realize the recognition of the location of the object in the scene map.
- the scene map is a two-dimensional 2D map
- the recognized position is the two-dimensional position information (such as two-dimensional coordinates) of the object
- the scene map is When a three-dimensional 3D map is used, the recognized position is the three-dimensional position information (such as three-dimensional coordinates) of the object.
- the first voice that is, the voice sent by the first account, is used as the voice of the first object in the scene map at the first location in the target application.
- the second acquiring unit 1203 is configured to acquire a second account in the target application, where the second account is used to identify a second object in the scene map that allows the voice of the first object to be heard, and the second object is the first of the scene map. An object in the area, the first area being determined by the first location.
- the first area is an area that is allowed to hear the voice sent from the first location according to the first location, and when the server acquires the first voice of the first account, finds the second of all the second objects in the area. Account number to send the first voice to the second account.
- the first sending unit 1205 is configured to send the first voice to the second account.
- the voice solution is in the presence of a voice group.
- the voice server sends voice to all members in the voice group because the transmission bandwidth and the server bearability are limited. This can cause the voice server to exceed the maximum load and affect the voice quality.
- a new voice forwarding policy is provided.
- the first object sends a voice
- only the voice is forwarded to the second object adjacent to the object, and the voice is not forwarded to the voice. All objects in the scene map, reducing the load on the voice server.
- first obtaining unit 1201 in this embodiment may be configured to perform step S202 in the embodiment of the present application.
- the second obtaining unit 1203 in this embodiment may be configured to perform step S204 in the embodiment of the present application.
- the first sending unit 1205 in this embodiment may be configured to perform step S206 in the embodiment of the present application.
- the foregoing modules are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the contents disclosed in the foregoing embodiments. It should be noted that the foregoing module may be implemented in a hardware environment as shown in FIG. 1 as part of the device, and may be implemented by software or by hardware.
- the first voice of the first account in the target application where the first account is used to identify the first object located in the first location in the scenario map of the target application, and obtain the second account in the target application, and the second account a second object for identifying a voice of the first object in the scene map, where the second object is an object in the first region determined by the first location in the scene map, and sending the first voice to the first region
- the second account thereby implementing location-based voice forwarding, can solve the technical problem that the voice solution in the related art easily causes the voice server to exceed the maximum load, thereby achieving the technical effect of reducing the load of the voice server.
- the first obtaining unit 1201 acquires a plurality of first voices of the plurality of first accounts, where the first account is used to identify a first object in the virtual reality, and the target application is a virtual reality application.
- the second obtaining unit 1203 is further configured to: search for a second object located in the first area in the object in the scene map, and acquire a second account that is used to identify the second object, where the first area is The area in which the first voice is determined by the distance from the first position to the target direction in the scene map.
- the second acquiring unit 1203 may determine the first area by using the first attenuation model to determine the first voice in the target direction in the case where there is no obstacle in the target direction starting from the first position in the scene map.
- a first transmission distance wherein the first attenuation model is used to represent a relationship between a distance traveled by the voice in the first medium and a sound intensity attenuation, and the first medium is a transmission medium of the first voice in the target direction;
- the first transmission distance of the first voice in the target direction is determined according to the first attenuation model and the second attenuation model, wherein the second attenuation model It is used to indicate the relationship between the distance that the voice propagates in the obstacle and the attenuation of the sound intensity; the position after the first transmission distance is transmitted in the target direction with the first position as the starting point as the area boundary of the first region.
- the second acquiring unit 1203 determines the first time when the first voice is transmitted to the obstacle by using the first attenuation model when determining the first transmission distance of the first voice in the target direction according to the first attenuation model and the second attenuation model.
- Sound intensity in the case where the first sound is stronger than the target sound intensity, the second sound intensity when the first voice passes the obstacle is determined by using the second attenuation model, wherein the target sound intensity is allowed to be heard by the object in the target application
- the minimum sound intensity in the case where the second sound is stronger than the target sound intensity, the first distance transmitted after the first voice passes through the obstacle and decays to the target sound intensity is determined by using the first attenuation model; The distance between the position and the obstacle, the length of the obstacle in the target direction, and the sum of the second distances are taken as the first transmission distance.
- the second acquiring unit 1203, when searching for the second object located in the first area in the object in the scene map, and acquiring the second account for identifying the second object, may determine the first manner in the scene map by using the foregoing manner. And finding a second object located in the first area and obtaining a second account number for identifying the second object.
- the second obtaining unit 1203, when searching for the second object located in the first area in the object in the scene map, and acquiring the second account for identifying the second object, may also search and select from the target relationship table.
- the second account associated with the account wherein, in the case that the second object that allows the second account identifier to hear the voice of the first object, the second account in the target relationship table is set to be associated with the first account.
- the apparatus of the present application may include: a maintenance unit, configured to create a target relationship table; and a situation where the location of the target object changes Next, the target relationship table is updated, wherein the target object is an object identified by an account in the target relationship table.
- the target object includes at least one of the first object, the second object, and the third object
- the maintenance unit acquires the update information sent by the first client of the target application when updating the target relationship table, and according to the update
- the information is updated to the target relationship table, and the first account is used on the first client, wherein the update information includes at least one of the first information, the second information, and the third information.
- the first information is used to indicate a third account, wherein the third object identified by the third account is an object that has a position change in the scene map, and in the case that the third object is located before the position change, the third object is allowed.
- the third object is not allowed to hear the voice of the first object.
- the second information is used to indicate the second account, wherein the second object identified by the second account is an object in the scene map where the location change occurs, and in the case where the second object is located before the location change, the second object is not allowed.
- the object hears the voice of the first object, and in the case where the second object is located at the position after the position change, allows the second object to hear the voice of the first object.
- the third information is used to indicate a fourth account, wherein the fourth account is used to identify an object that allows the voice of the first object located in the second location to be heard, and the second location is a scene map after the location change of the first object occurs.
- the position in the first object is located in the first position in the scene map before the position change occurs.
- the maintenance unit updates the target relationship table according to the update information
- the location change of the third object in the scene map the association between the third account indicated by the first information and the first account is released in the target relationship table; If the second object has a position change in the scene map, the second account indicated by the second information is set to be associated with the first account in the target relationship table; and the position change occurs in the first object in the scene map.
- the fourth account indicated by the third information is set to be associated with the first account in the target relationship table.
- the target object includes at least one of the first object, the second object, and the third object, wherein when the maintenance unit updates the target relationship table, the location change information of the target object is acquired, and the target relationship is determined according to the location change information.
- the table is updated, and the location change information is used to indicate at least one of the second location, the third location, and the fourth location.
- the second position is the position where the first object is located after the position change in the scene map.
- the third position is the position where the second object is located in the scene map, and the second object is located before the position change. In this case, the second object is not allowed to hear the voice of the first object, and in the case where the second object is located at the third position after the position change, the second object is allowed to hear the voice of the first object.
- the fourth position is a position where the third object is located after the position change occurs in the scene map, wherein, in the case where the third object is located before the position change, the third object is allowed to hear the voice of the first object, In the case where the third object is located at the fourth position after the position change, the third object is not allowed to hear the voice of the first object, and the third object is the object located in the scene map identified by the third account of the target application.
- the maintenance unit updates the target relationship table according to the location change information
- the following situations are included: when the location of the third object changes, the third account and the first account are released in the target relationship table according to the location change information.
- the second account is set to be associated with the first account in the target relationship table; in the case where the location of the first object changes, According to the location change information, the fourth account is set to be associated with the first account in the target relationship table, wherein the first object is located in the second location in the scene map after the location change, and the fourth account is used to identify the permission to be heard.
- the first sending unit 1205 is further configured to send the first voice of the 3D type to the second client, where the second account is used by the second client of the target application.
- FIG. 13 is a schematic diagram of an optional voice transmission apparatus according to an embodiment of the present application. As shown in FIG. 13, the apparatus may be applied to a terminal, and the apparatus may include: a login unit 1301 and a receiving unit 1303.
- the login unit 1301 is configured to log in to the second account of the target application on the second client of the target application, where the second account is used to identify the second object in the scene map of the target application.
- the receiving unit 1303 is configured to receive, on the second client, the first voice forwarded by the first account by the server, where the first account is used to identify the first object located in the first location in the scene map, and the server is configured to use the first A first area in the location determination scene map that allows the first object to be heard is heard, and the second object is an object in the first area.
- the login unit 1301 in this embodiment may be configured to perform step S302 in the embodiment of the present application.
- the receiving unit 1303 in this embodiment may be configured to perform step S304 in the embodiment of the present application.
- the foregoing modules are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the contents disclosed in the foregoing embodiments. It should be noted that the foregoing module may be implemented in a hardware environment as shown in FIG. 1 as part of the device, and may be implemented by software or by hardware.
- the first voice of the first account in the target application where the first account is used to identify the first object located in the first location in the scenario map of the target application, and obtain the second account in the target application, and the second account a second object for identifying a voice of the first object in the scene map, where the second object is an object in the first region determined by the first location in the scene map, and sending the first voice to the first region
- the second account thereby implementing location-based voice forwarding, can solve the technical problem that the voice solution in the related art easily causes the voice server to exceed the maximum load, thereby achieving the technical effect of reducing the load of the voice server.
- the foregoing apparatus of the present application may further include: a third acquiring unit, configured to acquire a second account of the second account in the second client after logging in to the second account of the target application on the second client of the target application Voice, wherein the second voice is sent by the second account to the fifth account in the target application; and the second sending unit is configured to send the second voice to the fifth account by using the server.
- a third acquiring unit configured to acquire a second account of the second account in the second client after logging in to the second account of the target application on the second client of the target application Voice, wherein the second voice is sent by the second account to the fifth account in the target application
- the second sending unit is configured to send the second voice to the fifth account by using the server.
- the fifth account number may be multiple.
- the second sending unit sends the second voice to the fifth account by using the server, the second voice is sent to the plurality of fifth accounts by the server, where each fifth account is used.
- a fifth object in the scene map identifying the virtual reality, the target application is a virtual reality application.
- the second account may specify a certain account to be banned in the second client (such as the first account), set the banned account to a specified type of account, and receive the first on the second client.
- the first account is determined. If the first account is a specified account, the first voice is not played in the second client, and the specified account is specified in the second account.
- the banned account number is included in the second client.
- the receiving unit 1303 After receiving the first voice of the 3D type on the second client, acquires the third voice of the first voice,
- the third sound intensity is a sound intensity attenuated when the first voice is transmitted from the first position to the fifth position where the second object is located; and the playing unit plays the first voice according to the third sound intensity on the second client.
- the first voice when the first voice is played according to the third sound intensity on the second client, the first voice is played on the second client according to the third sound intensity and the sound source information of the first voice.
- the manner in which the second client obtains the third sound intensity of the first voice includes: the second client determines the third sound intensity according to the fifth location and the first location; or the second client acquires the server from the server according to the fifth location And the third intensity determined by the first position.
- the playing unit Before playing the first voice according to the third sound intensity and the sound source information of the first voice on the second client, the playing unit acquires the sound source information according to the following manner: determining according to the first location and the fifth location of the second object Sound source information; or, the sound source information determined by the server according to the first location and the fifth location.
- the playing unit is further configured to determine sound source information according to the first position and the fifth position of the second object, first determining a transmission direction of the first voice according to the first position and the fifth position; and then acquiring a clip between the transmission direction and the target direction
- the angle is a sound source angle, wherein the target direction is a direction in which a straight line perpendicular to a line between the ears of the second object is located, and the sound source information includes a sound source angle.
- the playing unit plays the first voice according to at least one of the third pitch, the target binaural time difference, the target binaural intensity difference, and the target spectrum change, wherein the target binaural time difference is indicated according to the sound source information.
- the sound source angle, the brain radius of the second object, and the sound transmission speed are determined; the target binaural intensity difference is determined according to the sound source angle and the sound frequency of the first voice; the target spectrum change is based on the sound source angle, the sound source
- the elevation angle, the distance of the sound source from the first object, the angular velocity of the sound source, and the brain size of the second object are determined.
- the voice room-based scheme in the related art is more suitable for a limited number of game scenarios, and the limitation is as follows: at the same time, there is an upper limit on the number of speakers, generally about 6 digits, more than the number of people, and the network data forwarding pressure is too large, and a sound is generated.
- the problem of delaying the card and increasing the delay; the object of the speech is not flexible, the user must switch the chat object after the process of building a house, adding a room, and checking out.
- the user experience is not good in MMORPG and other types of games; the voice is pure 2D voice, with Ordinary 3D scenes are difficult to integrate and lack a sense of substitution.
- the present application proposes a new voice solution, which has the following features: the concept of removing the traditional voice room, without the maximum number of people, the player's freedom of communication is greatly improved; removing the maximum number of simultaneous speaking restrictions, through the player The relative position dynamically forwards the voice data, avoiding the problem of the number of voices being transmitted at the same time; using 3D audio technology to simulate the real voice propagation, greatly improving the realism of the voice environment, and solving the voice interaction of large-scale players simultaneously online. problem.
- the player upper limit is not set, the voice object is dynamically determined according to the player position, and what is seen and talked; without the voice room concept, all players in one world, each person may communicate with each other; the player's voice is added to the space. Sense, matching the player's 3D environment, adding immersion.
- the foregoing modules are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the contents disclosed in the foregoing embodiments. It should be noted that the foregoing module may be implemented in a hardware environment as shown in FIG. 1 as part of the device, and may be implemented by software or by hardware, where the hardware environment includes a network environment.
- a server or terminal for implementing the above-described voice transmission method.
- FIG. 14 is a structural block diagram of a terminal according to an embodiment of the present application.
- the terminal may include: one or more (only one shown in FIG. 14) processor 1401, memory 1403, and transmission device. 1405 (such as the transmitting device in the above embodiment), as shown in FIG. 14, the terminal may further include an input/output device 1407.
- the memory 1403 can be used to store the software program and the module, such as the voice transmission method and the program instruction/module corresponding to the device in the embodiment of the present application, and the processor 1401 executes by executing the software program and the module stored in the memory 1403.
- Memory 1403 can include high speed random access memory, and can also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid state memory.
- memory 1403 can further include memory remotely located relative to processor 1401, which can be connected to the terminal over a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
- the above-mentioned transmission device 1405 is used to receive or transmit data via a network, and can also be used for data transmission between a processor and a memory. Specific examples of the above network may include a wired network and a wireless network.
- the transmission device 1405 includes a Network Interface Controller (NIC) that can be connected to other network devices and routers through a network cable to communicate with the Internet or a local area network.
- the transmission device 1405 is a Radio Frequency (RF) module for communicating with the Internet wirelessly.
- NIC Network Interface Controller
- RF Radio Frequency
- the memory 1403 is configured to store an application.
- the processor 1401 can call the application stored in the memory 1403 through the transmission device 1405 to perform the following steps:
- Obtaining a first voice of the first account where the first account is an account in the target application, and the first account is used to identify the first object in the scene map of the target application, where the location of the first object in the scene map is the first location;
- Obtaining a second account in the target application where the second account is used to identify a second object in the scene map that allows the voice of the first object to be heard, and the second object is an object in the first area of the scene map, where the first area is A location determination; sending the first voice to the second account.
- the processor 1401 is further configured to perform the following steps:
- a first voice wherein the first account is used to identify a first object located in a first location in the scene map, and the server is configured to determine, according to the first location, a first region in the scene map that allows to hear the voice of the first object, and second The object is an object in the first area.
- the first voice of the first account in the target application is obtained, where the first account is used to identify the first object located in the first location in the scenario map of the target application, and the second account in the target application is obtained.
- the second account is used to identify a second object in the scene map that allows the first object to be heard.
- the second object is an object in the first area determined by the first location in the scene map, and the first voice is sent to the first object.
- the second account in the area implements location-based voice forwarding, which can solve the technical problem that the voice solution in the related art easily causes the voice server to exceed the maximum load, thereby achieving the technical effect of reducing the load of the voice server.
- the terminal can be a smart phone (such as an Android mobile phone, an iOS mobile phone, etc.), a tablet computer, a palmtop computer, and a mobile Internet device (Mobile Internet Devices, MID for short). ), PAD and other terminal devices.
- Fig. 14 does not limit the structure of the above electronic device.
- the terminal may also include more or fewer components (such as a network interface, display device, etc.) than shown in FIG. 14, or have a different configuration than that shown in FIG.
- a person of ordinary skill in the art may understand that all or part of the steps of the foregoing embodiments may be completed by a program to instruct terminal device related hardware, and the program may be stored in a computer readable storage medium, and the storage medium may be Including: flash disk, read-only memory (Read-Only Memory, ROM for short), random access memory (Random Access Memory, RAM), disk or optical disk.
- the storage medium may be Including: flash disk, read-only memory (Read-Only Memory, ROM for short), random access memory (Random Access Memory, RAM), disk or optical disk.
- Embodiments of the present application also provide a storage medium.
- the foregoing storage medium may be used to execute program code of a voice transmission method.
- the foregoing storage medium may be located on at least one of the plurality of network devices in the network shown in the foregoing embodiment.
- the storage medium is arranged to store program code for performing the following steps:
- the first voice of the first account is obtained, where the first account is an account in the target application, and the first account is used to identify the first object in the scene map of the target application, where the first object is in the scene map. position;
- S72 Acquire a second account in the target application, where the second account is used to identify a second object in the scene map that allows the voice of the first object to be heard, and the second object is an object in the first area of the scene map, and the first area is Determined by the first location;
- the storage medium is further arranged to store program code for performing the following steps:
- the first voice received by the first account by the server is received on the second client, where the first account is used to identify the first object located in the first location in the scene map, and the server is configured to determine the scene map according to the first location.
- the first area of the voice of the first object is allowed to be heard, and the second object is the object in the first area.
- the foregoing storage medium may include, but is not limited to, a USB flash drive, a Read-Only Memory (ROM), and a Random Access Memory (RAM).
- ROM Read-Only Memory
- RAM Random Access Memory
- the integrated unit in the above embodiment if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in the above-described computer readable storage medium.
- the technical solution of the present application may be embodied in the form of a software product, or the whole or part of the technical solution, which is stored in the storage medium, including
- the instructions are used to cause one or more computer devices (which may be a personal computer, server or network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application.
- the disclosed client may be implemented in other manners.
- the device embodiments described above are merely illustrative.
- the division of the unit is only a logical function division.
- multiple units or components may be combined or may be Integrate into another system, or some features can be ignored or not executed.
- the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, unit or module, and may be electrical or otherwise.
- the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
- each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
- the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
- the server obtains the first voice of the first account, where the first account is an account in the target application, and the first account is used to identify the first object in the scene map of the target application, and the first object is in the scene map.
- the location is the first location; the server obtains the second account in the target application, where the second account is used to identify the second object in the scene map that allows the voice of the first object to be heard, and the second object is the first region of the scene map.
- the object in the first area is determined by the first location; the server sends the first voice to the second account, and the voice forwarding based on the account location is used to reduce the load of the voice server.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Audiology, Speech & Language Pathology (AREA)
- General Health & Medical Sciences (AREA)
- Telephonic Communication Services (AREA)
- Telephone Function (AREA)
Abstract
本申请公开一种交互界面的显示方法和装置、存储介质、电子装置。其中,该方法包括:服务器获取第一帐号的第一语音,其中,第一帐号为目标应用中的帐号,第一帐号用于标识目标应用的场景地图中的第一对象,第一对象在场景地图中的位置为第一位置;服务器获取目标应用中的第二帐号,其中,第二帐号用于标识场景地图中允许听到第一对象的语音的第二对象,第二对象为场景地图的第一区域中的对象,第一区域由第一位置确定;服务器将第一语音发送给第二帐号。本申请解决了相关技术中的语音解决方案容易造成语音服务器超过最大负荷的技术问题。
Description
本申请要求于2017年10月27日提交到中国专利局、优先权号为201711025125X、发明名称为“语音的传输方法和装置、存储介质、电子装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及互联网领域,具体而言,涉及一种交互界面的显示方法和装置、存储介质、电子装置。
目前,越来越多的线上应用(如线上游戏、即时通讯应用)可以实现语音聊天功能,其原理如下:应用客户端采集麦克风的脉冲编码调制(Pulse Code Modulation,简称为PCM)音频数据,对PCM数据进行前期优化(如去噪、判断是否静音等),然后使用语音压缩库压缩,并通过用户数据报协议(User Datagram Protocol,简称为UDP)方式发送到语音服务器。语音服务器接收到语音包后,判断玩家所处的频道,向处于同一频道中的其他客户端转发语音包。收到语音包的客户端解压缩音频后进行播放。
现在的语音解决方案是以语音组(同一语音组的成员位于同一频道中)的形式出现的,当语音组的成员数量过多时,由于传输带宽及服务器承载能力有限,当语音服务器将语音发送至语音组中所有成员时,有可能会导致语音服务器超过最大负载,影响语音音质的情况。
针对相关技术中的语音解决方案容易造成语音服务器超过最大负荷的技术问题,目前尚未提出有效的解决方案。
发明内容
本申请实施例提供了一种交互界面的显示方法和装置、存储介质、电 子装置,以至少解决相关技术中的语音解决方案容易造成语音服务器超过最大负荷的技术问题。
根据本申请实施例的一个方面,提供了一种语音的传输方法,该方法包括:服务器获取第一帐号的第一语音,其中,第一帐号为目标应用中的帐号,第一帐号用于标识目标应用的场景地图中的第一对象,第一对象在场景地图中的位置为第一位置;服务器获取目标应用中的第二帐号,第二帐号用于标识场景地图中允许听到第一对象的语音的第二对象,第二对象为场景地图的第一区域中的对象,第一区域由第一位置确定;服务器将第一语音发送给第二帐号。
根据本申请实施例的一个方面,还提供了一种语音的传输方法,该方法包括:终端在目标应用的第二客户端上登录目标应用的第二帐号,其中,第二帐号用于标识目标应用的场景地图中的第二对象;终端在第二客户端上接收第一帐号通过服务器转发的第一语音,其中,第一帐号用于标识位于场景地图中第一位置的第一对象,服务器用于根据第一位置确定场景地图中允许听到第一对象的语音的第一区域,第二对象为第一区域中的对象。
根据本申请实施例的另一方面,提供了一种语音的传输装置,应用于服务器中,该装置包括:第一获取单元,设置为获取第一帐号的第一语音,其中,第一帐号为目标应用中的帐号,第一帐号用于标识目标应用的场景地图中的第一对象,第一对象在场景地图中的位置为第一位置;第二获取单元,设置为获取目标应用中的第二帐号,其中,第二帐号用于标识场景地图中允许听到第一对象的语音的第二对象,第二对象为场景地图的第一区域中的对象,第一区域由第一位置确定;第一发送单元,设置为将第一语音发送给第二帐号。
根据本申请实施例的另一方面,还提供了一种语音的传输装置,应用于终端中,该装置包括:登录单元,设置为在目标应用的第二客户端上登录目标应用的第二帐号,其中,第二帐号用于标识目标应用的场景地图中的第二对象;接收单元,设置为在第二客户端上接收第一帐号通过服务器 转发的第一语音,其中,第一帐号用于标识位于场景地图中第一位置的第一对象,服务器用于根据第一位置确定场景地图中允许听到第一对象的语音的第一区域,第二对象为第一区域中的对象。
在本申请实施例中,服务器获取目标应用中的第一帐号的第一语音,其中,第一帐号用于标识位于目标应用的场景地图中第一位置的第一对象,服务器获取目标应用中的第二帐号,其中,第二帐号用于标识场景地图中允许听到第一对象的语音的第二对象,第二对象为场景地图中由第一位置确定的第一区域内的对象,服务器将第一语音发送给位于第一区域内的第二帐号,从而实现了基于位置的语音转发,可以解决相关技术中的语音解决方案容易造成语音服务器超过最大负荷的技术问题,进而达到了降低语音服务器的负载的技术效果。
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:
图1是根据本申请实施例的语音的传输方法的硬件环境的示意图;
图2是根据本申请实施例的一种可选的语音的传输方法的流程图;
图3是根据本申请实施例的一种可选的语音的传输方法的流程图;
图4是根据本申请实施例的一种可选的语音系统架构的示意图;
图5是根据本申请实施例的一种可选的语音系统架构的示意图;
图6是根据本申请实施例的一种可选的声音传播范围的示意图;
图7是根据本申请实施例的一种可选的声音衰减的流程图;
图8是根据本申请实施例的一种可选的声音衰减的流程图;
图9是根据本申请实施例的一种可选的语音的传输方法的流程图;
图10是根据本申请实施例的一种可选的虚拟现实场景的示意图;
图11是根据本申请实施例的一种可选的客户端界面的示意图;
图12是根据本申请实施例的一种可选的语音的传输装置的示意图;
图13是根据本申请实施例的一种可选的语音的传输装置的示意图;以及
图14是根据本申请实施例的一种终端的结构框图。
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本申请保护的范围。
需要说明的是,本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
首先,在对本申请实施例进行描述的过程中出现的部分名词或者术语适用于如下解释:
干声:从麦克风采集,未经过任何处理的原始声音。
湿声:根据需求,对采集的声波进行处理过的声音。
根据本申请实施例,提供了一种语音的传输方法的方法实施例。
可选地,在本实施例中,上述语音的传输方法可以应用于如图1所示的由服务器102和终端104所构成的硬件环境中。如图1所示,服务器102通过网络与终端104进行连接,上述网络包括但不限于:广域网、城域网或局域网,终端104并不限定于PC、手机、平板电脑等。本申请实施例的语音的传输方法可以由服务器102来执行,也可以由终端104来执行,还可以是由服务器102和终端104共同执行。其中,终端104执行本申请实施例的语音的传输方法也可以是由安装在其上的客户端来执行。
当本申请实施例的语音的传输方法由服务器或终端来单独执行时,直接在服务器或终端上来执行与本申请的方法对应的程序代码即可。
当本申请实施例的语音的传输方法由服务器和终端共同来执行时,由一终端发送语音至服务器,此时,由服务器来执行与本申请的方法对应的程序代码,将语音转发至符合位置要求的终端。
下面以在服务器上来执行与本申请的方法对应的程序代码为例详述本申请的实施例,图2是根据本申请实施例的一种可选的语音的传输方法的流程图,如图2所示,该方法可以包括以下步骤:
步骤S202,获取第一帐号的第一语音,其中,第一帐号为目标应用中的帐号,第一帐号用于标识目标应用的场景地图中的第一对象,第一对象在场景地图中的位置为第一位置。
上述的目标应用包括但不局限于社交应用、游戏应用、生活应用。目标应用能够实现对其场景地图中对象所在位置的识别,在场景地图为二维的2D地图时,识别到的位置为该对象的二维的位置信息(如二维坐标),在场景地图为三维的3D地图时,识别到的位置为该对象的三维的位置信息(如三维坐标)。
上述的第一语音即第一帐号发送的语音,在目标应用中,被当作是场景地图中的第一对象在第一位置发出的语音。
步骤S204,服务器获取目标应用中的第二帐号,其中,第二帐号用于标识场景地图中允许听到第一对象的语音的第二对象,第二对象为场景地图的第一区域中的对象,第一区域由第一位置确定。
上述的第一区域是根据第一位置确定的允许听到从第一位置发出的语音的区域,服务器获取到第一帐号的第一语音时,查找到该区域内的所有第二对象的第二帐号,以将第一语音发送给第二帐号。
步骤S206,服务器将第一语音发送给第二帐号。
在相关技术中,语音解决方案是以语音组的形式出现的,当语音组的成员数量过多时,由于传输带宽及服务器承载能力有限,当语音服务器将语音发送至语音组中所有成员时,有可能会导致语音服务器超过最大负载,影响语音音质的情况。
而在本申请的上述技术方案中,提供了一种全新的语音转发策略,当第一对象发送语音时,仅仅只会将语音转发给邻近该对象的第二对象,而不会将语音转发给场景地图中所有的对象,从而降低了语音服务器的负载。
通过上述步骤S202至步骤S206,服务器获取目标应用中的第一帐号的第一语音,其中,第一帐号用于标识位于目标应用的场景地图中第一位置的第一对象,服务器获取目标应用中的第二帐号,其中,第二帐号用于标识场景地图中允许听到第一对象的语音的第二对象,第二对象为场景地图中由第一位置确定的第一区域内的对象,服务器将第一语音发送给位于第一区域内的第二帐号,从而实现了基于帐号位置的语音转发,可以解决相关技术中的语音解决方案容易造成语音服务器超过最大负荷的技术问题,进而达到了降低语音服务器的负载的技术效果。
相关技术中基于语音房间的方案比较适合人数有限的游戏场景,其局限性体现在:同时说话人数有上限,一般为6位左右,多于该人数,网络数据转发压力过大,就会产生声音顿卡及延迟增大的问题;说话对象不灵活,要经过建房、加房、退房的流程才能切换聊天对象,在大型多人在线 角色扮演游戏(Massive或Massively Multiplayer Online Role-Playing Game,简称为MMORPG)等类型游戏中用户体验不好;语音都是纯2D语音,跟普通的3D场景难以融入,缺乏代入感。
针对以上局限性,本申请提出了一种新的语音解决方案,它具备如下特征:去除传统语音房间的概念,没有最大人数限制,玩家交流自由度大大提高;去除同时说话最大人数限制,通过玩家相对位置动态转发语音数据,避免同时说话人数多造成了语音转发的卡顿的问题;用3D音频技术模拟真实语音传播,大大提高语音环境的真实感,解决了大规模玩家同时在线时的语音交互问题。
在本申请的技术方案中,不设置玩家上限,根据玩家位置动态确定语音对象,所见即所聊;没有语音房间概念,所有玩家在一个世界,每个人都可能相互交流;玩家的声音加入空间感,与玩家所处的3D环境相匹配,增加了沉浸感。
下面结合步骤如图2所示的步骤详述本申请的实施例:
在步骤S202提供的技术方案中,语音服务器获取第一帐号的第一语音,此处的第一帐号是类指(一类帐号),是指目标应用中当前时刻发送语音的帐号,可以为一个或多个,此处对第一帐号的数量没有限定。
可选地,对于语音服务器,在同时接收到多个第一帐号的第一语音时,可以通过多个并行运行的线程来处理,每个线程处理一个第一帐号的第一语音,并执行后续的步骤(包括但不局限于步骤S204至S206),如查找对应的第二帐号,发送语音(如上述的第一语音)至第二帐号等。
在步骤S204提供的技术方案中,语音服务器获取目标应用中的第二帐号时,可在场景地图中的对象中查找位于第一区域中的第二对象,并获取用于标识第二对象的第二帐号,第一区域是根据第一语音以第一位置为起点在场景地图中向目标方向传播的距离确定的区域。
(一)关于区域边界的确定
上述的目标方向为一个或多个,若第一对象所在的区域相对较简单,如为开阔没有障碍物的区域,那么第一声音在该区域内任意一个方向的传播距离是基本相等的,此时的目标方向可以为一个任意朝向的方向,得到的第一区域是半径为R的圆形区域,R为语音在目标方向上的传播距离。
若第一对象所在的区域相对较复杂,如存在障碍物、处于狭长峡谷中等,那么目标方向为多个不同的方向,以便于测量出在这多个方向的传播距离,进而确定第一区域。
对于以上情况,可以通过以下的方式确定第一区域包括:
步骤S11,在场景地图中以第一位置为起点的目标方向上不存在障碍物的情况下,使用第一衰减模型确定第一语音在目标方向上的第一传输距离,第一衰减模型用于表示语音在第一介质中传播的距离与音强衰减之间的关系,第一介质为第一语音在目标方向上的传输介质。
第一衰减模型可以为线性模型和非线性模型,二者原理基本类似,可以根据实际需求进行选择,下面以线性模型为例进行详述,如第一语音的音强与传输距离成反比:y1=a-k1*x,其中,y1为音强为a的第一语音经过传输距离x后剩余的音强,k1表示在当前介质中单位距离音强的衰减量。此处音强的单位可以为dB,距离单位为米。
假设a=100,k1=1,人耳朵能听见的最小音强为c(如10),那么可以计算出第一传输距离x=(100-10)/1=90米。
步骤S12,在场景地图中以第一位置为起点的目标方向上存在障碍物的情况下,按照第一衰减模型和第二衰减模型确定第一语音在目标方向上的第一传输距离,第二衰减模型用于表示语音在障碍物中传播的距离与音强衰减之间的关系。
需要说明的是,上述的障碍物是指第一音频的传播范围内的障碍物,如在上述的假设中,距离第一位置90米内的障碍物。
可选地,上述的第二衰减模型也可以为线性模型和非线性模型,二者原理基本类似,可以根据实际需求进行选择,下面以线性模型为例进行详述,如第一语音的音强与传输距离成反比:y2=b-k2*x,其中,y2为音强为b的第一语音经过传输距离x后剩余的音强,k2表示在障碍物中单位距离音强的衰减量。
上述的y2是指第一语音传输至障碍物时的音强,具体可以参照第一衰减模型的计算公式计算得到,如获取第一位置与障碍物之间的距离。
在步骤S12中,存在以下两种结果,一种是第一语音不能透过障碍物,此时可通过第二衰减模型计算第一语音能在障碍物中传播的距离l2=[(a-k1*l1)-c]/k2,其中,l1为第一位置与障碍物之间的距离。
另一种是,第一语音能透过障碍物,此时步骤S12可以通过如下子步骤实现:
步骤S121,通过使用第一衰减模型确定第一语音传输至障碍物时的第一音强,y1=a-k1*x,其中x的取值为l1,得到y1的取值为(a-k1*l1);
步骤S122,在第一音强大于目标音强的情况下,通过使用第二衰减模型确定第一语音通过障碍物时的第二音强,目标音强为允许被目标应用中的对象听见的最小音强(也即人耳朵能听见的最小音强),y2=(a-k1*l1)-k2*x,x的取值为障碍物在目标方向上的长度或距离l3,得到y2的取值为(a-k1*l1)-k2*l3;
步骤S123,在第二音强大于目标音强的情况下,通过使用第一衰减模型确定第一语音通过障碍物后、且衰减至目标音强时所传输的第二距离l4=[(a-k1*l1)-k2*l3-c)]/k1;
步骤S124,将第一位置与障碍物之间的距离、障碍物在目标方向上的长度以及第二距离之和作为第一传输距离。
步骤S13,将以第一位置为起点向目标方向上传输第一传输距离后的位置作为第一区域的区域边界。
若第一对象所在的区域相对较简单,那么第一区域则是以第一传输距离为半径的圆;若第一对象所在的区域相对较复杂,那么第一区域包括第一位置,且在第一位置的任意方向上计算出的第一传输距离所到达的位置即该方向上的区域边界。
(二)关于第二帐号的查找
第二帐号的查找包括但不局限于以下两种实现方式,其一是服务器在接收到语音时根据位置关系查找到相关的第二帐号;第二是由客户端指定与之关联的帐号(即,该帐号附近的帐号),下面分别就这两种方式进行详述。
(1)服务器实时查找帐号
步骤S21,服务器在场景地图中通过上述的方式确定第一区域(即步骤S121至步骤S124)。
步骤S22,服务器查找位于第一区域中的第二对象,并获取用于标识第二对象的第二帐号。
(2)服务器通过事先维护好的目标关系表(即帐号列表)来查找帐号
步骤S31,创建目标关系表,在目标对象(即场景地图中的任意一个对象)的位置发生变化的情况下,对目标关系表进行更新,目标对象为目标关系表中的帐号所标识的对象。
对于目标关系表的维护,包括但不局限于如下两种方式:
方式一由客户端进行目标关系表的维护
上述的目标对象包括第一对象、第二对象以及第三对象中的至少之一,其中,在服务器对目标关系表进行更新时,获取目标应用的第一客户端发送的更新信息,并根据更新信息对目标关系表进行更新,第一帐号在第一 客户端上使用,其中,更新信息包括第一信息、第二信息以及第三信息中的至少之一。
上述的第一信息用于指示第三帐号,第三帐号标识的第三对象为场景地图中发生位置变化的对象,由第一客户端实时监测第一区域中的对象的位置变化,在第三对象位于位置变化前的位置(即位于第一区域内)的情况下,允许第三对象听到第一对象的语音,在第三对象位于位置变化后的位置(即第三对象运动出了第一区域)的情况下,不允许第三对象听到第一对象的语音,此时由第一客户端产生第一消息并发送给服务器。
上述的第二信息用于指示第二帐号,第二帐号标识的第二对象为场景地图中发生位置变化的对象,在第二对象位于位置变化前的位置(即不在第一区域)的情况下,不允许第二对象听到第一对象的语音,在第二对象位于位置变化后的位置(即在第一区域)的情况下,允许第二对象听到第一对象的语音,此时产生上述的第二信息。
第三信息用于指示第四帐号,第四帐号用于标识允许听到位于第二位置的第一对象的语音的对象,第二位置为第一对象发生位置变化后在场景地图中的位置,第一对象发生位置变化前位于场景地图中的第一位置,在第一对象运动至第二位置后,重新计算上述的第一区域,并将重新计算后的第一区域内的对象的第四帐号通过第三消息发送给服务器。
在上述实施例中,引发目标关系表中与第一帐号关联的帐号发生变化的情况分为三种,相应地,根据更新信息对目标关系表进行更新,也存在三种情况:
其一是在第三对象在场景地图中发生位置变化的情况下,服务器在目标关系表中解除第一信息指示的第三帐号与第一帐号的关联。
其二是在第二对象在场景地图中发生位置变化的情况下,服务器在目标关系表中将第二信息指示的第二帐号设置为与第一帐号相关联。
其三是在第一对象在场景地图中发生位置变化的情况下,服务器在目 标关系表中将第三信息指示的第四帐号设置为与第一帐号相关联。
方式二由服务器进行目标关系表的维护
上述的目标对象包括第一对象、第二对象以及第三对象中的至少之一,服务器对目标关系表进行更新时,获取目标对象的位置变化信息,并根据位置变化信息对目标关系表进行更新,位置变化信息用于指示第二位置、第三位置以及第四位置中的至少之一。
上述的第二位置为第一对象在场景地图中发生位置变化后所在的位置,由第一客户端进行上报。
上述的第三位置为第二对象在场景地图中发生位置变化后所在的位置,在第二对象位于位置变化前的位置(即位于第一区域外)的情况下,不允许第二对象听到第一对象的语音,在第二对象位于位置变化后的第三位置(即位于第一区域内)的情况下,允许第二对象听到第一对象的语音,第三位置由第二帐号所在的第二客户端进行上报。
上述的第四位置为第三对象在场景地图中发生位置变化后所在的位置,在第三对象位于位置变化前的位置(即位于第一区域内)的情况下,允许第三对象听到第一对象的语音,在第三对象位于位置变化后的第四位置(即位于第一区域外)的情况下,不允许第三对象听到第一对象的语音,第三对象为目标应用的第三帐号所标识的位于场景地图中的对象,第四位置由第三帐号所在的第三客户端进行上报。
在上述实施例中,引发目标关系表中与第一帐号关联的帐号发生变化的情况分为三种,相应地,根据更新信息对目标关系表进行更新,也存在三种情况:
其一是在第三对象的位置发生变化的情况下,服务器根据位置变化信息,在目标关系表中解除第三帐号与第一帐号的关联。
其二是在第二对象的位置发生变化的情况下,根据位置变化信息,服务器在目标关系表中将第二帐号设置为与第一帐号相关联。
其三是在第一对象的位置发生变化的情况下,服务器根据位置变化信息,在目标关系表中将第四帐号设置为与第一帐号相关联,其中,第一对象发生位置变化后位于场景地图中的第二位置,第四帐号用于标识允许听到位于第二位置的第一对象的语音的对象。
步骤S32,在需要时服务器从目标关系表中查找与第一帐号相关联的第二帐号,在允许第二帐号标识的第二对象听到第一对象的语音的情况下,目标关系表中的第二帐号被设置为与第一帐号相关联。
在步骤S206提供的技术方案中,服务器将第一语音发送给第二帐号,是将为3D类型的第一语音发送至第二客户端,第二帐号在目标应用的第二客户端上使用。
下面以在终端上来执行与本申请的方法对应的程序代码为例详述本申请的实施例,图3是根据本申请实施例的一种可选的语音的传输方法的流程图,如图3所示,该方法可以包括以下步骤:
步骤S302,终端在目标应用的第二客户端上登录目标应用的第二帐号,其中,第二帐号用于标识目标应用的场景地图中的第二对象。
步骤S304,终端在第二客户端上接收第一帐号通过服务器转发的第一语音,其中,第一帐号用于标识位于场景地图中第一位置的第一对象,服务器用于根据第一位置确定场景地图中允许听到第一对象的语音的第一区域,第二对象为第一区域中的对象。
通过上述步骤S302至步骤S304,终端在目标应用的第二客户端上登录目标应用的第二帐号,其中,第二帐号用于标识目标应用的场景地图中的第二对象,终端在第二客户端上接收第一帐号通过服务器转发的第一语音,其中,第一帐号用于标识位于场景地图中第一位置的第一对象,服务器用于根据第一位置确定场景地图中允许听到第一对象的语音的第一区 域,第二对象为第一区域中的对象,从而实现了基于位置的语音转发,可以解决相关技术中的语音解决方案容易造成语音服务器超过最大负荷的技术问题,进而达到了降低语音服务器的负载的技术效果。
下面结合步骤如图3所示的步骤详述本申请的实施例:
在步骤S302提供的技术方案中,终端在目标应用的第二客户端上登录目标应用的第二帐号。
可选地,终端上安装有目标应用的第二客户端。在目标应用的第二客户端上登录目标应用的第二帐号之后,用户(即第二帐号)可通过第二客户端进行语音的接收和发送。
当第二帐号发送语音时,在第二客户端中获取第二帐号的第二语音。若第二语音不是悄悄话,那么第二语音会根据第二对象的当前位置发送至响应的帐号;若第二语音是悄悄话,第二语音会被发送给第二帐号指定发送的第五帐号(具体是通过服务器将第二语音发送给第五帐号)。
需要说明的是,在上述实施例中,在目标应用的第二客户端上登录目标应用的第二帐号之后,可在第二客户端中进行设置,设置悄悄话的发送对象(即第五帐号)。
可选地,上述的第五帐号可以为多个,那么通过服务器将第二语音发送给第五帐号时,服务器将第二语音分别发送给多个第五帐号,每个第五帐号用于标识虚拟现实的场景地图中的一个第五对象,目标应用为虚拟现实的应用。
在步骤S304提供的技术方案中,在第二客户端接收语音时,终端在第二客户端上接收第一帐号通过服务器转发的第一语音,在第二客户端上接收到的可以为3D类型的第一语音。
可选地,第二帐号可以在第二客户端中指定对某一帐号禁言(如第一帐号),将这些禁言的帐号设置为指定类型的帐号。在第二客户端上接收第一帐号通过服务器转发的第一语音之后,判断第一帐号的类型,在第一帐号为指定类型的帐号的情况下,不在第二客户端中播放第一语音,指定类型的帐号为第二帐号指定的禁言的帐号。
若判断出第一帐号不为指定类型的帐号的情况下,在第二客户端上接收为3D类型的第一语音之后,则第二客户端获取第一语音的第三音强,第三音强是第一语音从第一位置传输至第二对象所在的第五位置时所衰减至的音强;在第二客户端上至少按照第三音强对第一语音进行播放。
可选地,上述步骤“在第二客户端上至少按照第三音强对第一语音进行播放”可以是在第二客户端上按照第三音强和第一语音的声源信息对第一语音进行播放。
(一)音强的确定
第二客户端获取第一语音的第三音强包括以下两种方式:
(1)方式一由客户端实时计算
在第二客户端上根据第五位置和第一位置确定或计算出第三音强。
在第二客户端根据第五位置和第一位置确定第三音强时,第二客户端确定第二对象所在的第五位置与第一位置之间的第二传输距离,第二客户端使用衰减模型确定第一语音在经过第二传输距离的传输后所衰减至的第三音强,衰减模型用于表示语音传播的距离与音强衰减之间的关系。
此处的衰减模型可以为上述的第一衰减模型和/或第二衰减模型,具体的计算方式参照前一实施例。
(2)方式二由服务器计算后下发给第二客户端
第二客户端从服务器获取服务器根据第五位置和第一位置确定的第 三音强。
此处的音强获取可以是第二客户端主动向服务器请求,也可以是在服务器下发第一语音时一起下发的。
服务器的计算方式与上述第二客户端的计算方式相同或者类似,在此不再赘述。
(二)声源信息的确定
类似地,在第二客户端上按照第三音强和第一语音的声源信息对第一语音进行播放之前,第二客户端按照如下两种方式获取声源信息:
(1)方式一由客户端实时计算
第二客户端根据第一位置和第二对象的第五位置确定声源信息时,先根据第一位置和第五位置确定第一语音的传输方向(即由第一位置指向第五位置的方向);再获取传输方向与目标方向之间的夹角为声源角,目标方向为与第二对象的双耳之间的连线所垂直的直线所在的方向,声源信息包括声源角。
(2)方式二由服务器计算后下发给第二客户端
第二客户端获取服务器根据第一位置和第五位置确定的声源信息。
服务器计算声源信息的过程与第二客户端计算的过程相同或类似,在此不再赘述。
(三)关于语音的播放
在第二客户端上按照第三音强和第一语音的声源信息对第一语音进行播放时,第二客户端按照第三音强、目标双耳时间差、目标双耳强度差以及目标频谱变化中的至少之一对第一语音进行播放。
上述的目标双耳时间差是根据声源信息指示的声源角、第二对象的脑部半径、声音传输速度确定的;目标双耳强度差是根据声源角和第一语音的声音频率确定的;目标频谱变化是根据声源角、声源仰角、声源与第一对象的距离、声源角速度以及第二对象的脑部尺寸确定的。
作为一种可选的实施例,下面从技术侧详述本申请的实施例:
本申请的技术方案改进了相关技术中语音系统的语音转发策略及语音播放方式,一种可选的语音系统架构图如图4所示,本申请的语音系统架构图如图5所示。两者在客户端逻辑、服务器逻辑及两者之间通信数据方面都有所不同。
在一种可选的基于语音房间的语音系统中,语音的处理逻辑是如下:
步骤S41,客户端(如客户端1和客户端2)通过调用终端上的麦克风采集语音(得到麦克风数据),压缩编码并通过网络传到语音服务器。
步骤S42,语音服务器实时收集各个客户端的语音数据,并对其进行静音检测(VOD)及混合处理,将其变为一路混音数据向房间内的所有客户端发送。
步骤S43,客户端在收到从网络下发的语音数据后,进行解压解码处理,并通过对应硬件平台的音频接口来播放(此处直接播放不区分该语音来自哪个帐号对象,采用相同方式播放)。
可选地,从系统框架来说,在以上流程基础上可做如下改进:
(1)客户端在采集麦克风数据的基础上,采集对象在场景地图内的相对位置信息。
(2)客户端通过位置信息来决定要发送语音的帐号(即MemberID,或玩家帐号ID),并定期更新将其发送到服务器,当然,该功能也可由服务器来执行。
(3)服务器不是向所有玩家发送语音,而且通过判断客户端上传的帐号ID列表来决策是否发送给指定玩家。
(4)帐号的客户端收到服务器推送到的数据,说明自己能听到该数据对应的语音,于是在本地使用3D播放策略来播放语音。
针对每一个环节的语音处理,下面进行详细阐述:
(一)客户端对声音传播对象的上报
在真实的自然环境中,声音作为一种波,会随着在介质中传播而衰减,表现出来的现象就是声音会随着距离的增加而越来越小,到一定衰减范围,声音几乎不能被感知。在本申请中通过利用这个原理,可以屏蔽衰减范围外的玩家,这样在一个大场景中就可以大大减小数据的发送量。
如图6所示,预定义每个玩家的声音传播范围,或者根据环境的变化(比如空气中跟水传播范围不同,室内跟旷野中的传播范围也不同,是否有障碍物等)动态调整,假设玩家1(帐号ID1)在当前的传播范围为R1,玩家2(帐号ID2)的传播范围为R2,每个玩家都有一个传播对象列表MemberIdList,如玩家1的列表中包括ID3、ID4、ID8,该列表代表了声音要传递的其它玩家的帐号ID。现在假设有另一个玩家角色在游戏场景中移动,下面结合图6中的移动轨迹的变化过程模拟了一个典型的玩家位置关系变化的过程。
步骤S51,在客户端1上,主角是玩家1,玩家8(对应于帐号ID8)从外面进入玩家1的传播范围R1,玩家1的MemberIdList1添加ID8,并触发MemberIdList变动事件。
步骤S52,根据该事件,将MemberIdList1上传到服务器,知会服务器发送对象发生变化。
步骤S53,玩家8继续在R1范围内移动,此时发送关系没变,不做 任何处理。
步骤S54,玩家8移动并离开R1范围,玩家1将其从MemberIdList1中移除,并触发MemberIdList变动事件,同样上传服务器并更新发送策略。
对于其它玩家和其它客户端,变化过程与上述过程类似。
(二)服务器的语音转发策略
服务器转发所有玩家的策略,参照表1,服务器转发过程描述如下:
表1
| ID1 | ID2 | ID3 | ID4 | ID5 | |
| ID1 | 0 | 1 | 0 | 0 | 1 |
| ID2 | 1 | 0 | 1 | 0 | 1 |
| ID3 | 0 | 1 | 0 | 1 | 0 |
| ID4 | 0 | 0 | 1 | 0 | 0 |
| ID5 | 1 | 1 | 0 | 0 | 0 |
步骤S61,应用启动,创建一张空的二维表,横向跟纵向都代表不同的玩家ID。
步骤S62,所有玩家加入则横纵方向都添加一项,玩家退出则删除之前的表项。
步骤S63,以玩家ID1为例,如果当前范围R1内有三个玩家ID2和ID5,则服务器端根据该信息更新表项,如表1中“1”代表发送,“0”代表不发送。
步骤S64,服务器根据每个玩家上传的信息动态维护这张转发表。
步骤S65,在转发数据时,根据转发表的流向去动态发送语音数据,为“0”则不向对应玩家发送,如对于玩家ID5的语音,仅需向玩家ID1和玩家ID2发送。
显而易见的,在玩家非常多的情况下,上述转发策略生成的往往是一个稀疏矩阵,可以大大减少服务器的转发压力。
(三)客户端对真实声音的模拟
通过服务器的转发策略可以看出,服务器传到客户端的声音是经过距离筛选的,它充分的利用了声音衰减的特性,那在客户端表现上,可以去表现这种衰减的效果,同时加入3D声音效果,使玩家的语音更具渲染感。可把这个过程描述为干声(Dry Sound)向湿声(Wet Sound)的转换,主要通过两个阶段来完成。
(1)距离建模(Distance Modeling)
距离感可以通过声音的响度衰减(Attenuation)来实现,响度又称为音量、音强,它是人耳对所听到的声音大小强弱的主观感受,其客观评价尺度是声音的振幅大小。这种感受源自物体振动时所产生的压力,即声压。为了对声音的感受量化成可以监测的指标,就把声压分成“级”(声压级),以便能客观的表示声音的强弱,其单位称为“分贝”(dB)。
如图7所示,以最简单的线性衰减为例,假设声音的衰减半径为100m,声音的最大响度(音量)为100,最小响度为0,那么,玩家在距离声音30m处,能听到的响度就为70,在距离声音110m处响度为0,即听不到声音,在距离声音0m即声源处,听到的响度最大为100。这样,玩家就可以通过声音的响度变化来感知声源距离。
上面只是以线性衰减方式为例讲述原理,在实际实现中,为了模拟更加真实的环境,可采取多种不同的衰减曲线来使用在不同的环境下,如图8所示的对数曲线衰减。
(2)方向建模(Orientation Modeling)
对于声音方向感建模,可以参照人脑的声音定位机理,一个声音的方 位信息可以通过以下三个途径被人脑获得并解析:
其一是:声音传到左右耳的时间差(英文全称为Interaural Time Difference,可简称为ITD),这个是由于左右耳距离不同导致的。
其二是:声音传到左右耳的强度差(英文全称为Interaural Level Difference,可简称为ILD),这个是因为声音被头部遮挡,导致左右耳声音强度不同。
其三是:声音从人脑周围不同方位传过来的频谱过滤,这个是因为声音从外部传入耳廓过程中被不同身体部位(如躯干、肩膀、耳廓等)遮挡过滤,从而出现的声音变化。
下面依次用这三种方式来修改声音的传播,以模拟人脑的定位方式。
(2.1)双耳时间差
申请人根据大量的实验验证,双耳之前的时间差跟声音的频率是相关的。假设音源频率为f、音源相对于人脑的角位置为θ,人脑的半径为r,声音的速度为c,那ITD时间差与r和sin(θ)成正比,与c成反比。
一种可选的ITD的计算公式是:
(2.2)双耳强度差
申请人认识到,位于脑部右边的声音传到右耳的声音强度要比传入左耳的声音强度大,这个是由于左耳被脑袋遮挡的原因,即所谓的头影(Head Shadow)现象,并且,随着声音自身频率的变化,ILD也会发生变化。声音频率f越高,ILD就越明显。大量的理论研究表明,ILD是一个关于频率f和声音角位置θ的函数,与f和sin(θ)成正比。
一种可选的ILD的计算公式是:
ILD=1+(f/1000)
0.8*sin(θ) (2)
根据上述公式计算得到ITD和ILD后,就可以将实时将ITD应用到左右声道的时间变化上,将ILD应用到左右声道的强度变化上,从而初步实现声音的定位功能。
(2.3)HRTF算法(英文全称为Head Related Transfer Function,中文名称为头相关变换函数)。
如前所述,人脑除了通过区分声音传入双耳的时间差和强度差外,还可以针对声音从不同方位传过来时产生的频谱变化来判断声音的方向。为了模拟这个声音变化过程,使用头部相关传递函数(HRTF)来表示。HRFT表示的将任意一个方位的声音频谱转换到耳廓位置所听到频谱的过程。针对左右耳,可以分别用如下公式表示:
HL=HL(r,θ,ψ,ω,α)=PL(r,θ,ψ,ω,α)/P0(r,ω) (3)
HR=HR(r,θ,ψ,ω,α)=PR(r,θ,ψ,ω,α)/P0(r,ω) (4)
其中,L和R分别代表左右耳,PL和PR分别代表了在左右耳孔入口的声音频谱。P0代表了人头中心位置声音的频谱,并且这个地方现在没有听众影响。HL和HR是关于以下参数的函数,声源角位置θ,声源仰角ψ,声源和脑袋中心的距离r,声源角速度ω,以及头部尺寸α。
HFTF需要大量准确的数据测量,可采用MIT_KEMAR数据库,它采集的数据在垂直-40度到+90度,水平360度的范围内采集到710个不同的位置,记录下了HL和HR函数,在使用时,通过以下方式反向计算PL和PR值。
PL(r,θ,ψ,ω,α)=HL(r,θ,ψ,ω,α)/P0(r,ω) (5)
PR(r,θ,ψ,ω,α)=HR(r,θ,ψ,ω,α)/P0(r,ω) (6)
可选地,还可以使用LISTEN、CIPIC、FIU等公司提供的数据库实现上述计算。具体处理过程如图9所示:
步骤S901,利用距离模型对接收到的干声进行响度衰减,计算得到上述衰减后的音强。
步骤S902,传送衰减后的声音给方向模型。
步骤S903,方向模型按照上述方式计算ITD和ILD,然后得到湿声,并由客户端进行播放。
上述的距离模型和方向模型可以集成到客户端中。
通过HRTF的方式,可以对更加真实的模拟音源从不同发出来的声音的变化,结合前面的ITD和ILD,这三个方式就可以让玩家体验到通过声音来定位的神奇效果。
本申请还提供了一种优选实施例,下面从产品侧详述本申请的实施例:
本申请的技术方案适用于基于3D场景的多人语音交互场景,应用于各类应用,如3D类应用、VR虚拟现实类应用、AR增强现实类应用等,这些类型的应用包括但不局限于游戏、社交。
如将本方案将应用于VR游戏业务,该VR游戏可以是基于VR的社交游戏,使用了本申请的技术方案之后,其高自由度的语音交互是其一大亮点。
(1)玩家(如图10所示的玩家1)登录该VR游戏业务,进入一个VR场景中,便会自动匹配到与之对应的语音房间这中,在该游戏场景中仅此一个语音房间,所以玩家都在一个虚拟房间中,即一个虚拟世界对应一个虚拟语音房间。
(2)玩家可以随意跟周围的玩家说话,不用考虑之间分组的概念(即“所见即所聊”),由服务器来根据位置关系进行语音的转发。
(3)在客户端上,接收到的玩家的声音会模拟现实声音的3D定位及衰减,这样超出一定范围的玩家声音即被隐去,既方便定位也可以避免同 时过多声音带来的嘈杂问题。
(4)基于该系统,如图11所示,玩家还可以对某个的玩家聊天做一些上层的逻辑处理,可以通过系统设置实现,比如禁言(通过禁言设置实现),私聊等。
在本申请的技术方案中,如在3D游戏中,同时支持大量玩家在同一个大场景中通话,避免了传统方案中只能小组聊天的局限性,同时3D声效的引入会使玩家的游戏体验大大提升。
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本申请所必须的。
根据本申请实施例,还提供了一种用于实施上述语音的传输方法的语音的传输装置。图12是根据本申请实施例的一种可选的语音的传输装置的示意图,如图12所示,该装置可以应用于服务器中,该装置可以包括:第一获取单元1201、第二获取单元1203以及第一发送单元1205。
第一获取单元1201,设置为获取第一帐号的第一语音,其中,第一帐号为目标应用中的帐号,第一帐号用于标识目标应用的场景地图中的第一对象,第一对象在场景地图中的位置为第一位置。
上述的目标应用包括但不局限于社交应用、游戏应用、生活应用。目标应用能够实现对其场景地图中对象所在位置的识别,在场景地图为二维的2D地图时,识别到的位置为该对象的二维的位置信息(如二维坐标),在场景地图为三维的3D地图时,识别到的位置为该对象的三维的位置信息(如三维坐标)。
上述的第一语音即第一帐号发送的语音,在目标应用中,被当做是场 景地图中的第一对象在第一位置发出的语音。
第二获取单元1203,设置为获取目标应用中的第二帐号,其中,第二帐号用于标识场景地图中允许听到第一对象的语音的第二对象,第二对象为场景地图的第一区域中的对象,第一区域由第一位置确定。
上述的第一区域是根据第一位置确定的允许听到从第一位置发出的语音的区域,服务器获取到第一帐号的第一语音时,查找到该区域内的所有第二对象的第二帐号,以将第一语音发送给第二帐号。
第一发送单元1205,设置为将第一语音发送给第二帐号。
在相关技术中,语音解决方案是以语音组的出现的,当语音组的成员数量过多时,由于传输带宽及服务器承载能力有限,当语音服务器将语音发送至语音组中所有成员时,有可能会导致语音服务器超过最大负载,影响语音音质的情况。
而在本申请的上述技术方案中,提供了一种全新的语音转发策略,当第一对象发送语音时,仅仅只会将语音转发给临近该对象的第二对象,而不会将语音转发给场景地图中所有的对象,从而降低了语音服务器的负载。
需要说明的是,该实施例中的第一获取单元1201可以设置为执行本申请实施例中的步骤S202,该实施例中的第二获取单元1203可以设置为执行本申请实施例中的步骤S204,该实施例中的第一发送单元1205可以设置为执行本申请实施例中的步骤S206。
此处需要说明的是,上述模块与对应的步骤所实现的示例和应用场景相同,但不限于上述实施例所公开的内容。需要说明的是,上述模块作为装置的一部分可以运行在如图1所示的硬件环境中,可以通过软件实现,也可以通过硬件实现。
通过上述模块,获取目标应用中的第一帐号的第一语音,第一帐号用于标识位于目标应用的场景地图中第一位置的第一对象,获取目标应用中的第二帐号,第二帐号用于标识场景地图中允许听到第一对象的语音的第 二对象,第二对象为场景地图中由第一位置确定的第一区域内的对象,将第一语音发送给位于第一区域内的第二帐号,从而实现了基于位置的语音转发,可以解决相关技术中的语音解决方案容易造成语音服务器超过最大负荷的技术问题,进而达到了降低语音服务器的负载的技术效果。
可选地,第一获取单元1201获取多个第一帐号的多个第一语音,一个第一帐号用于标识虚拟现实中的一个第一对象,目标应用为虚拟现实的应用。
可选地,第二获取单元1203还设置为在场景地图中的对象中查找位于第一区域中的第二对象,并获取用于标识第二对象的第二帐号,其中,第一区域是根据第一语音以第一位置为起点在场景地图中向目标方向传播的距离确定的区域。
上述的第二获取单元1203可通过如下方式确定第一区域:在场景地图中以第一位置为起点的目标方向上不存在障碍物的情况下,使用第一衰减模型确定第一语音在目标方向上的第一传输距离,其中,第一衰减模型用于表示语音在第一介质中传播的距离与音强衰减之间的关系,第一介质为第一语音在目标方向上的传输介质;在场景地图中以第一位置为起点的目标方向上存在障碍物的情况下,按照第一衰减模型和第二衰减模型确定第一语音在目标方向上的第一传输距离,其中,第二衰减模型用于表示语音在障碍物中传播的距离与音强衰减之间的关系;将以第一位置为起点向目标方向上传输第一传输距离后的位置作为第一区域的区域边界。
上述的第二获取单元1203按照第一衰减模型和第二衰减模型确定第一语音在目标方向上的第一传输距离时,通过使用第一衰减模型确定第一语音传输至障碍物时的第一音强;在第一音强大于目标音强的情况下,通过使用第二衰减模型确定第一语音通过障碍物时的第二音强,其中,目标音强为允许被目标应用中的对象听见的最小音强;在第二音强大于目标音强的情况下,通过使用第一衰减模型确定第一语音通过障碍物后、且衰减至目标音强时所传输的第二距离;将第一位置与障碍物之间的距离、障碍 物在目标方向上的长度以及第二距离之和作为第一传输距离。
上述的第二获取单元1203在场景地图中的对象中查找位于第一区域中的第二对象,并获取用于标识第二对象的第二帐号时,可在场景地图中通过上述方式确定第一区域;并查找位于第一区域中的第二对象,并获取用于标识第二对象的第二帐号。
上述的第二获取单元1203在场景地图中的对象中查找位于第一区域中的第二对象,并获取用于标识第二对象的第二帐号时,还可从目标关系表中查找与第一帐号相关联的第二帐号,其中,在允许第二帐号标识的第二对象听到第一对象的语音的情况下,目标关系表中的第二帐号被设置为与第一帐号相关联。
可选地,在第二获取单元1203获取用于标识第二对象的第二帐号之前,本申请的装置可包括:维护单元,设置为创建目标关系表;并在目标对象的位置发生变化的情况下,对目标关系表进行更新,其中,目标对象为目标关系表中的帐号所标识的对象。
上述的目标对象包括第一对象、第二对象以及第三对象中的至少之一,其中,维护单元对目标关系表进行更新时,获取目标应用的第一客户端发送的更新信息,并根据更新信息对目标关系表进行更新,第一帐号在第一客户端上使用,其中,更新信息包括第一信息、第二信息以及第三信息中的至少之一。
上述的第一信息用于指示第三帐号,其中,第三帐号标识的第三对象为场景地图中发生位置变化的对象,在第三对象位于位置变化前的位置的情况下,允许第三对象听到第一对象的语音,在第三对象位于位置变化后的位置的情况下,不允许第三对象听到第一对象的语音。
上述的第二信息用于指示第二帐号,其中,第二帐号标识的第二对象为场景地图中发生位置变化的对象,在第二对象位于位置变化前的位置的情况下,不允许第二对象听到第一对象的语音,在第二对象位于位置变化 后的位置的情况下,允许第二对象听到第一对象的语音。
上述的第三信息用于指示第四帐号,其中,第四帐号用于标识允许听到位于第二位置的第一对象的语音的对象,第二位置为第一对象发生位置变化后在场景地图中的位置,第一对象发生位置变化前位于场景地图中的第一位置。
维护单元根据更新信息对目标关系表进行更新时,在第三对象在场景地图中发生位置变化的情况下,在目标关系表中解除第一信息指示的第三帐号与第一帐号的关联;在第二对象在场景地图中发生位置变化的情况下,在目标关系表中将第二信息指示的第二帐号设置为与第一帐号相关联;在第一对象在场景地图中发生位置变化的情况下,在目标关系表中将第三信息指示的第四帐号设置为与第一帐号相关联。
上述的目标对象包括第一对象、第二对象以及第三对象中的至少之一,其中,维护单元对目标关系表进行更新时,获取目标对象的位置变化信息,并根据位置变化信息对目标关系表进行更新,位置变化信息用于指示第二位置、第三位置以及第四位置中的至少之一。
上述的第二位置为第一对象在场景地图中发生位置变化后所在的位置第三位置为第二对象在场景地图中发生位置变化后所在的位置,在第二对象位于位置变化前的位置的情况下,不允许第二对象听到第一对象的语音,在第二对象位于位置变化后的第三位置的情况下,允许第二对象听到第一对象的语音。
上述的第四位置为第三对象在场景地图中发生位置变化后所在的位置,其中,在第三对象位于位置变化前的位置的情况下,允许第三对象听到第一对象的语音,在第三对象位于位置变化后的第四位置的情况下,不允许第三对象听到第一对象的语音,第三对象为目标应用的第三帐号所标识的位于场景地图中的对象。
维护单元根据位置变化信息对目标关系表进行更新时,包括以下几种 情况:在第三对象的位置发生变化的情况下,根据位置变化信息,在目标关系表中解除第三帐号与第一帐号的关联;在第二对象的位置发生变化的情况下,根据位置变化信息,在目标关系表中将第二帐号设置为与第一帐号相关联;在第一对象的位置发生变化的情况下,根据位置变化信息,在目标关系表中将第四帐号设置为与第一帐号相关联,其中,第一对象发生位置变化后位于场景地图中的第二位置,第四帐号用于标识允许听到位于第二位置的第一对象的语音的对象。
可选地,第一发送单元1205还设置为将为3D类型的第一语音发送至第二客户端,第二帐号在目标应用的第二客户端上使用。
根据本申请实施例,还提供了一种用于实施上述语音的传输方法的语音的传输装置。图13是根据本申请实施例的一种可选的语音的传输装置的示意图,如图13所示,该装置可以应用于终端中,该装置可以包括:登录单元1301以及接收单元1303。
登录单元1301,设置为在目标应用的第二客户端上登录目标应用的第二帐号,其中,第二帐号用于标识目标应用的场景地图中的第二对象。
接收单元1303,设置为在第二客户端上接收第一帐号通过服务器转发的第一语音,其中,第一帐号用于标识位于场景地图中第一位置的第一对象,服务器用于根据第一位置确定场景地图中允许听到第一对象的语音的第一区域,第二对象为第一区域中的对象。
需要说明的是,该实施例中的登录单元1301可以设置为执行本申请实施例中的步骤S302,该实施例中的接收单元1303可以设置为执行本申请实施例中的步骤S304。
此处需要说明的是,上述模块与对应的步骤所实现的示例和应用场景相同,但不限于上述实施例所公开的内容。需要说明的是,上述模块作为装置的一部分可以运行在如图1所示的硬件环境中,可以通过软件实现, 也可以通过硬件实现。
通过上述模块,获取目标应用中的第一帐号的第一语音,第一帐号用于标识位于目标应用的场景地图中第一位置的第一对象,获取目标应用中的第二帐号,第二帐号用于标识场景地图中允许听到第一对象的语音的第二对象,第二对象为场景地图中由第一位置确定的第一区域内的对象,将第一语音发送给位于第一区域内的第二帐号,从而实现了基于位置的语音转发,可以解决相关技术中的语音解决方案容易造成语音服务器超过最大负荷的技术问题,进而达到了降低语音服务器的负载的技术效果。
可选地,本申请的上述装置还可以包括第三获取单元,设置为在目标应用的第二客户端上登录目标应用的第二帐号之后,在第二客户端中获取第二帐号的第二语音,其中,第二语音被第二帐号指定发送给目标应用中的第五帐号;第二发送单元,设置为通过服务器将第二语音发送给第五帐号。
上述的第五帐号可以为多个,第二发送单元通过服务器将第二语音发送给第五帐号时,通过服务器将第二语音分别发送给多个第五帐号,其中,每个第五帐号用于标识虚拟现实的场景地图中的一个第五对象,目标应用为虚拟现实的应用。
可选地,第二帐号可以在第二客户端中指定对某一帐号禁言(如第一帐号),将这些禁言的帐号设置为指定类型的帐号,在第二客户端上接收第一帐号通过服务器转发的第一语音之后,判断第一帐号的类型,在第一帐号为指定类型的帐号的情况下,不在第二客户端中播放第一语音,指定类型的帐号为第二帐号指定的禁言的帐号。
若判断出第一帐号不为指定类型的帐号的情况下,接收单元1303在第二客户端上接收为3D类型的第一语音之后,则第二客户端获取第一语音的第三音强,第三音强是第一语音从第一位置传输至第二对象所在的第五位置时所衰减至的音强;播放单元在第二客户端上至少按照第三音强对第一语音进行播放。
可选地,在第二客户端上至少按照第三音强对第一语音进行播放时,在第二客户端上按照第三音强和第一语音的声源信息对第一语音进行播放。
上述第二客户端获取第一语音的第三音强的方式包括:第二客户端根据第五位置和第一位置确定第三音强;或,第二客户端从服务器获取服务器根据第五位置和第一位置确定的第三音强。
第二客户端根据第五位置和第一位置确定第三音强时,确定第五位置与第一位置之间的第二传输距离;使用衰减模型确定第一语音在经过第二传输距离的传输后所衰减至的第三音强,其中,衰减模型用于表示语音传播的距离与音强衰减之间的关系。
在第二客户端上按照第三音强和第一语音的声源信息对第一语音进行播放之前,播放单元按照如下方式获取声源信息:根据第一位置和第二对象的第五位置确定声源信息;或,获取服务器根据第一位置和第五位置确定的声源信息。
播放单元还设置为根据第一位置和第二对象的第五位置确定声源信息,首先根据第一位置和第五位置确定第一语音的传输方向;然后获取传输方向与目标方向之间的夹角为声源角,其中,目标方向为与第二对象的双耳之间的连线所垂直的直线所在的方向,声源信息包括声源角。
在播放时,播放单元按照第三音强、目标双耳时间差、目标双耳强度差以及目标频谱变化中的至少之一对第一语音进行播放,其中,目标双耳时间差是根据声源信息指示的声源角、第二对象的脑部半径、声音传输速度确定的;目标双耳强度差是根据声源角和第一语音的声音频率确定的;目标频谱变化是根据声源角、声源仰角、声源与第一对象的距离、声源角速度以及第二对象的脑部尺寸确定的。
相关技术中基于语音房间的方案比较适合人数有限的游戏场景,其局限性体现在:同时说话人数有上限,一般为6位左右,多于该人数,网络 数据转发压力过大,就会产生声音顿卡及延迟增大的问题;说话对象不灵活,要经过建房、加房、退房的流程才能切换聊天对象,在MMORPG等类型游戏中用户体验不好;语音都是纯2D语音,跟普通的3D场景难以融入,缺乏代入感。
针对以上局限性,本申请提出了一种新的语音解决方案,它具备如下特征:去除传统语音房间的概念,没有最大人数限制,玩家交流自由度大大提高;去除同时说话最大人数限制,通过玩家相对位置动态转发语音数据,避免同时说话人数多造成了语音转发的卡顿的问题;用3D音频技术模拟真实语音传播,大大提高语音环境的真实感,解决了大规模玩家同时在线时的语音交互问题。
在本申请的技术方案中,不设置玩家上限,根据玩家位置动态确定语音对象,所见即所聊;没有语音房间概念,所有玩家在一个世界,每个人都可能相互交流;玩家的声音加入空间感,与玩家所处的3D环境相匹配,增加沉浸感。
此处需要说明的是,上述模块与对应的步骤所实现的示例和应用场景相同,但不限于上述实施例所公开的内容。需要说明的是,上述模块作为装置的一部分可以运行在如图1所示的硬件环境中,可以通过软件实现,也可以通过硬件实现,其中,硬件环境包括网络环境。
根据本申请实施例,还提供了一种用于实施上述语音的传输方法的服务器或终端。
图14是根据本申请实施例的一种终端的结构框图,如图14所示,该终端可以包括:一个或多个(图14中仅示出一个)处理器1401、存储器1403、以及传输装置1405(如上述实施例中的发送装置),如图14所示,该终端还可以包括输入输出设备1407。
其中,存储器1403可用于存储软件程序以及模块,如本申请实施例中的语音的传输方法和装置对应的程序指令/模块,处理器1401通过运行 存储在存储器1403内的软件程序以及模块,从而执行各种功能应用以及数据处理,即实现上述的语音的传输方法。存储器1403可包括高速随机存储器,还可以包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器1403可进一步包括相对于处理器1401远程设置的存储器,这些远程存储器可以通过网络连接至终端。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
上述的传输装置1405用于经由一个网络接收或者发送数据,还可以用于处理器与存储器之间的数据传输。上述的网络具体实例可包括有线网络及无线网络。在一个实例中,传输装置1405包括一个网络适配器(Network Interface Controller,简称为NIC),其可通过网线与其他网络设备与路由器相连从而可与互联网或局域网进行通讯。在一个实例中,传输装置1405为射频(Radio Frequency,简称为RF)模块,其用于通过无线方式与互联网进行通讯。
其中,具体地,存储器1403用于存储应用程序。
处理器1401可以通过传输装置1405调用存储器1403存储的应用程序,以执行下述步骤:
获取第一帐号的第一语音,第一帐号为目标应用中的帐号,第一帐号用于标识目标应用的场景地图中的第一对象,第一对象在场景地图中的位置为第一位置;获取目标应用中的第二帐号,第二帐号用于标识场景地图中允许听到第一对象的语音的第二对象,第二对象为场景地图的第一区域中的对象,第一区域由第一位置确定;将第一语音发送给第二帐号。
处理器1401还用于执行下述步骤:
在目标应用的第二客户端上登录目标应用的第二帐号,其中,第二帐号用于标识目标应用的场景地图中的第二对象;在第二客户端上接收第一帐号通过服务器转发的第一语音,其中,第一帐号用于标识位于场景地图 中第一位置的第一对象,服务器用于根据第一位置确定场景地图中允许听到第一对象的语音的第一区域,第二对象为第一区域中的对象。
采用本申请实施例,获取目标应用中的第一帐号的第一语音,第一帐号用于标识位于目标应用的场景地图中第一位置的第一对象,获取目标应用中的第二帐号,第二帐号用于标识场景地图中允许听到第一对象的语音的第二对象,第二对象为场景地图中由第一位置确定的第一区域内的对象,将第一语音发送给位于第一区域内的第二帐号,从而实现了基于位置的语音转发,可以解决相关技术中的语音解决方案容易造成语音服务器超过最大负荷的技术问题,进而达到了降低语音服务器的负载的技术效果。
可选地,本实施例中的具体示例可以参考上述实施例中所描述的示例,本实施例在此不再赘述。
本领域普通技术人员可以理解,图14所示的结构仅为示意,终端可以是智能手机(如Android手机、iOS手机等)、平板电脑、掌上电脑以及移动互联网设备(Mobile Internet Devices,简称为MID)、PAD等终端设备。图14其并不对上述电子装置的结构造成限定。例如,终端还可包括比图14中所示更多或者更少的组件(如网络接口、显示装置等),或者具有与图14所示不同的配置。
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令终端设备相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质可以包括:闪存盘、只读存储器(Read-Only Memory,简称为ROM)、随机存取器(Random Access Memory,简称为RAM)、磁盘或光盘等。
本申请的实施例还提供了一种存储介质。可选地,在本实施例中,上述存储介质可以用于执行语音的传输方法的程序代码。
可选地,在本实施例中,上述存储介质可以位于上述实施例所示的网络中的多个网络设备中的至少一个网络设备上。
可选地,在本实施例中,存储介质被设置为存储用于执行以下步骤的程序代码:
S71,获取第一帐号的第一语音,第一帐号为目标应用中的帐号,第一帐号用于标识目标应用的场景地图中的第一对象,第一对象在场景地图中的位置为第一位置;
S72,获取目标应用中的第二帐号,第二帐号用于标识场景地图中允许听到第一对象的语音的第二对象,第二对象为场景地图的第一区域中的对象,第一区域由第一位置确定;
S73,将第一语音发送给第二帐号。
可选地,存储介质还被设置为存储用于执行以下步骤的程序代码:
S81,在目标应用的第二客户端上登录目标应用的第二帐号,其中,第二帐号用于标识目标应用的场景地图中的第二对象;
S82,在第二客户端上接收第一帐号通过服务器转发的第一语音,其中,第一帐号用于标识位于场景地图中第一位置的第一对象,服务器用于根据第一位置确定场景地图中允许听到第一对象的语音的第一区域,第二对象为第一区域中的对象。
可选地,本实施例中的具体示例可以参考上述实施例中所描述的示例,本实施例在此不再赘述。
可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(Read-Only Memory,简称为ROM)、随机存取存储器(Random Access Memory,简称为RAM)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
上述实施例中的集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在上述计算机可读取的存储介质中。 基于这样的理解,本申请的技术方案本质上或者说对相关技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在存储介质中,包括若干指令用以使得一台或多台计算机设备(可为个人计算机、服务器或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。
在本申请的上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。
在本申请所提供的几个实施例中,应该理解到,所揭露的客户端,可通过其它的方式实现。其中,以上所描述的装置实施例仅仅是示意性的,例如所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,单元或模块的间接耦合或通信连接,可以是电性或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
以上所述仅是本申请的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本申请的保护范围。
本实施例服务器获取第一帐号的第一语音,其中,第一帐号为目标应用中的帐号,第一帐号用于标识目标应用的场景地图中的第一对象,第一对象在场景地图中的位置为第一位置;服务器获取目标应用中的第二帐号,其中,第二帐号用于标识场景地图中允许听到第一对象的语音的第二对象,第二对象为场景地图的第一区域中的对象,第一区域由第一位置确定;服务器将第一语音发送给第二帐号,通过基于帐号位置的语音转发,以达到降低语音服务器的负载的目的。
Claims (24)
- 一种语音的传输方法,包括:服务器获取第一帐号的第一语音,其中,所述第一帐号为目标应用中的帐号,所述第一帐号用于标识所述目标应用的场景地图中的第一对象,所述第一对象在所述场景地图中的位置为第一位置;所述服务器获取所述目标应用中的第二帐号,其中,所述第二帐号用于标识所述场景地图中允许听到所述第一对象的语音的第二对象,所述第二对象为所述场景地图的第一区域中的对象,所述第一区域由所述第一位置确定;所述服务器将所述第一语音发送给所述第二帐号。
- 根据权利要求1所述的方法,其中,所述服务器获取所述目标应用中的第二帐号包括:所述服务器在所述场景地图中的对象中查找位于所述第一区域中的所述第二对象,并获取用于标识所述第二对象的所述第二帐号,其中,所述第一区域是根据所述第一语音以所述第一位置为起点在所述场景地图中向目标方向传播的距离确定的区域。
- 根据权利要求2所述的方法,其中,所述方法还包括通过以下步骤确定所述第一区域:在所述场景地图中以所述第一位置为起点的所述目标方向上不存在障碍物的情况下,所述服务器使用第一衰减模型确定所述第一语音在所述目标方向上的第一传输距离,其中,所述第一衰减模型用于表示语音在第一介质中传播的距离与音强衰减之间的关系,所述第一介质为所述第一语音在所述目标方向上的传输介质;在所述场景地图中以所述第一位置为起点的所述目标方向上存在障碍物的情况下,所述服务器按照所述第一衰减模型和第二衰减模型确定所述第一语音在所述目标方向上的所述第一传输距离,其中, 所述第二衰减模型用于表示语音在所述障碍物中传播的距离与音强衰减之间的关系;所述服务器将以所述第一位置为起点向所述目标方向上传输所述第一传输距离后的位置作为所述第一区域的区域边界。
- 根据权利要求3所述的方法,其中,所述服务器按照所述第一衰减模型和第二衰减模型确定所述第一语音在所述目标方向上的所述第一传输距离包括:所述服务器通过使用所述第一衰减模型确定所述第一语音传输至所述障碍物时的第一音强;在所述第一音强大于目标音强的情况下,所述服务器通过使用所述第二衰减模型确定所述第一语音通过所述障碍物时的第二音强,其中,所述目标音强为允许被所述目标应用中的对象听见的最小音强;在所述第二音强大于目标音强的情况下,所述服务器通过使用所述第一衰减模型确定所述第一语音通过所述障碍物后、且衰减至所述目标音强时所传输的第二距离;所述服务器将所述第一位置与所述障碍物之间的距离、所述障碍物在所述目标方向上的长度以及所述第二距离之和作为所述第一传输距离。
- 根据权利要求2或3所述的方法,其中,所述服务器在所述场景地图中的对象中查找位于所述第一区域中的所述第二对象,并获取用于标识所述第二对象的所述第二帐号包括:所述服务器在所述场景地图中确定所述第一区域;所述服务器查找位于所述第一区域中的所述第二对象,并获取用于标识所述第二对象的所述第二帐号。
- 根据权利要求2或3所述的方法,其中,所述服务器在所述场景地图中的对象中查找位于所述第一区域中的所述第二对象,并获取用于标识所述第二对象的所述第二帐号包括:所述服务器从目标关系表中查找与所述第一帐号相关联的所述第二帐号,其中,在允许所述第二帐号标识的所述第二对象听到所述第一对象的语音的情况下,所述目标关系表中的所述第二帐号被设置为与所述第一帐号相关联。
- 根据权利要求6所述的方法,其中,在所述服务器获取用于标识所述第二对象的所述第二帐号之前,所述方法还包括:所述服务器创建所述目标关系表;在目标对象的位置发生变化的情况下,所述服务器对所述目标关系表进行更新,其中,所述目标对象为所述目标关系表中的帐号所标识的对象。
- 根据权利要求7所述的方法,其中,所述目标对象包括所述第一对象、所述第二对象以及第三对象中的至少之一,其中,所述服务器对所述目标关系表进行更新包括:所述服务器获取所述目标应用的第一客户端发送的更新信息,并根据所述更新信息对所述目标关系表进行更新,其中,所述第一帐号在所述第一客户端上使用,所述更新信息包括第一信息、第二信息以及第三信息中的至少之一,所述第一信息用于指示第三帐号,其中,所述第三帐号标识的第三对象为所述场景地图中发生位置变化的对象,在所述第三对象位于位置变化前的位置的情况下,允许所述第三对象听到所述第一对象的语音,在所述第三对象位于位置变化后的位置的情况下,不允许所述第三对象听到所述第一对象的语音;所述第二信息用于指示所述第二帐号,其中,所述第二帐号标识的所述第二对象为所述场景地图中发生位置变化的对象,在所述第二对象位于位置变化前的位置的情况下,不允许所述第二对象听到所述第一对象的语音,在所述第二对象位于位置变化后的位置的情况下,允许所述第二对象听到所述第一对象的语音;所述第三信息用于指示第四帐号,其中,所述第四帐号用于标识允许听到位于第二位置的所述第一对象的语音的对象,所述第二位置为所述第一对象发生位置变化后在所述场景地图中的位置,所述第一对象发生位置变化前位于所述场景地图中的所述第一位置。
- 根据权利要求8所述的方法,其中,所述服务器根据所述更新信息对所述目标关系表进行更新包括以下至少之一:在所述第三对象在所述场景地图中发生位置变化的情况下,所述服务器在所述目标关系表中解除所述第一信息指示的所述第三帐号与所述第一帐号的关联;在所述第二对象在所述场景地图中发生位置变化的情况下,所述服务器在所述目标关系表中将所述第二信息指示的所述第二帐号设置为与所述第一帐号相关联;在所述第一对象在所述场景地图中发生位置变化的情况下,所述服务器在所述目标关系表中将所述第三信息指示的所述第四帐号设置为与所述第一帐号相关联。
- 根据权利要求7所述的方法,其中,所述目标对象包括所述第一对象、所述第二对象以及第三对象中的至少之一,其中,所述服务器对所述目标关系表进行更新包括:所述服务器获取所述目标对象的位置变化信息,并根据所述位置变化信息对所述目标关系表进行更新,其中,所述位置变化信息用于指示第二位置、第三位置以及第四位置中的至少之一,所述第二位置为所述第一对象在所述场景地图中发生位置变化后所在的位置;所述第三位置为所述第二对象在所述场景地图中发生位置变化后所在的位置,在所述第二对象位于位置变化前的位置的情况下,不允许所述第二对象听到所述第一对象的语音,在所述第二对象位于位置变化后的所述第三位置的情况下,允许所述第二对象听到所述第一 对象的语音;所述第四位置为所述第三对象在所述场景地图中发生位置变化后所在的位置,其中,在所述第三对象位于位置变化前的位置的情况下,允许所述第三对象听到所述第一对象的语音,在所述第三对象位于位置变化后的所述第四位置的情况下,不允许所述第三对象听到所述第一对象的语音,所述第三对象为所述目标应用的第三帐号所标识的位于所述场景地图中的对象。
- 根据权利要求10所述的方法,其中,所述服务器根据所述位置变化信息对所述目标关系表进行更新包括以下至少之一:在所述第三对象的位置发生变化的情况下,所述服务器根据所述位置变化信息,在所述目标关系表中解除所述第三帐号与所述第一帐号的关联;在所述第二对象的位置发生变化的情况下,所述服务器根据所述位置变化信息,在所述目标关系表中将所述第二帐号设置为与所述第一帐号相关联;在所述第一对象的位置发生变化的情况下,所述服务器根据所述位置变化信息,在所述目标关系表中将第四帐号设置为与所述第一帐号相关联,其中,所述第一对象发生位置变化后位于所述场景地图中的第二位置,所述第四帐号用于标识允许听到位于所述第二位置的所述第一对象的语音的对象。
- 根据权利要求1所述的方法,其中,所述服务器将所述第一语音发送给所述第二帐号包括:所述服务器将为3D类型的所述第一语音发送至第二客户端,其中,所述第二帐号在所述目标应用的所述第二客户端上使用。
- 根据权利要求1所述的方法,其中,所述服务器获取第一帐号的第一语音包括:所述服务器获取多个所述第一帐号的多个所述第一语音,其中, 所述第一帐号用于标识虚拟现实中的所述第一对象,所述目标应用为所述虚拟现实的应用。
- 一种语音的传输方法,包括:终端在目标应用的第二客户端上登录所述目标应用的第二帐号,其中,所述第二帐号用于标识所述目标应用的场景地图中的第二对象;所述终端在所述第二客户端上接收第一帐号通过服务器转发的第一语音,其中,所述第一帐号用于标识位于所述场景地图中第一位置的第一对象,所述服务器用于根据所述第一位置确定所述场景地图中允许听到所述第一对象的语音的第一区域,所述第二对象为所述第一区域中的对象。
- 根据权利要求14所述的方法,其中,所述终端在所述第二客户端上接收第一帐号通过服务器转发的第一语音包括:所述终端在所述第二客户端上接收为3D类型的所述第一语音。
- 根据权利要求15所述的方法,其中,在所述终端在所述第二客户端上接收为3D类型的所述第一语音之后,所述方法还包括:所述终端通过所述第二客户端获取所述第一语音的第三音强,其中,所述第三音强是所述第一语音从所述第一位置传输至所述第二对象所在的第五位置时所衰减至的音强;所述终端在所述第二客户端上至少按照所述第三音强对所述第一语音进行播放。
- 根据权利要求16所述的方法,其中,所述终端在所述第二客户端上至少按照所述第三音强对所述第一语音进行播放包括:在所述第二客户端上按照所述第三音强和所述第一语音的声源信息对所述第一语音进行播放。
- 根据权利要求14所述的方法,其中,在所述终端在所述目标应用的第二客户端上登录所述目标应用的第二帐号之后,所述方法还包括:所述终端在所述第二客户端中获取所述第二帐号的第二语音,其中,所述第二语音被所述第二帐号指定发送给所述目标应用中的第五帐号;所述终端通过所述服务器将所述第二语音发送给所述第五帐号。
- 根据权利要求18所述的方法,其中,所述第五帐号为多个,其中,所述终端通过所述服务器将所述第二语音发送给所述第五帐号包括:所述终端通过所述服务器将所述第二语音分别发送给多个所述第五帐号,其中,每个所述第五帐号用于标识虚拟现实的所述场景地图中的一个第五对象,所述目标应用为所述虚拟现实的应用。
- 根据权利要求14所述的方法,其中,在所述终端在所述第二客户端上接收第一帐号通过服务器转发的第一语音之后,所述方法还包括:在所述第一帐号为指定类型的帐号的情况下,所述终端不在所述第二客户端中播放所述第一语音,其中,所述指定类型的帐号为所述第二帐号指定的禁言的帐号。
- 一种语音的传输装置,应用于服务器中,所述装置包括:第一获取单元,设置为获取第一帐号的第一语音,其中,所述第一帐号为目标应用中的帐号,所述第一帐号用于标识所述目标应用的场景地图中的第一对象,所述第一对象在所述场景地图中的位置为第一位置;第二获取单元,设置为获取所述目标应用中的第二帐号,其中,所述第二帐号用于标识所述场景地图中允许听到所述第一对象的语音的第二对象,所述第二对象为所述场景地图的第一区域中的对象,所述第一区域由所述第一位置确定;第一发送单元,设置为将所述第一语音发送给所述第二帐号。
- 一种语音的传输装置,应用于终端中,所述装置包括:登录单元,设置为在目标应用的第二客户端上登录所述目标应用 的第二帐号,其中,所述第二帐号用于标识所述目标应用的场景地图中的第二对象;接收单元,设置为在所述第二客户端上接收第一帐号通过服务器转发的第一语音,其中,所述第一帐号用于标识位于所述场景地图中第一位置的第一对象,所述服务器用于根据所述第一位置确定所述场景地图中允许听到所述第一对象的语音的第一区域,所述第二对象为所述第一区域中的对象。
- 一种存储介质,所述存储介质包括存储的程序,其中,所述程序运行时执行上述权利要求1至20中任一项所述的方法。
- 一种电子装置,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器通过所述计算机程序执行上述权利要求1至20中任一项所述的方法。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201711025125.XA CN109729109B (zh) | 2017-10-27 | 2017-10-27 | 语音的传输方法和装置、存储介质、电子装置 |
| CN201711025125.X | 2017-10-27 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2019080901A1 true WO2019080901A1 (zh) | 2019-05-02 |
Family
ID=66246224
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2018/111915 Ceased WO2019080901A1 (zh) | 2017-10-27 | 2018-10-25 | 交互界面的显示方法和装置、存储介质、电子装置 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN109729109B (zh) |
| WO (1) | WO2019080901A1 (zh) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110673810A (zh) * | 2019-09-27 | 2020-01-10 | 杭州鸿雁智能科技有限公司 | 显示设备及其显示方法、装置、存储介质和处理器 |
| CN110780598A (zh) * | 2019-10-24 | 2020-02-11 | 深圳传音控股股份有限公司 | 一种智能设备控制方法、装置、电子设备及可读存储介质 |
| CN114024954A (zh) * | 2021-10-27 | 2022-02-08 | 北京达佳互联信息技术有限公司 | 信息传输方法、装置及存储介质 |
Families Citing this family (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110827818B (zh) * | 2019-11-20 | 2024-04-09 | 腾讯科技(深圳)有限公司 | 一种智能语音设备的控制方法、装置、设备及存储介质 |
| CN111475022A (zh) * | 2020-04-03 | 2020-07-31 | 上海唯二网络科技有限公司 | 一种在多人vr场景中对交互式语音数据进行处理的方法 |
| CN114442028A (zh) * | 2021-12-30 | 2022-05-06 | 中航华东光电(上海)有限公司 | 一种虚拟场景交互语音hrtf定位方法 |
| CN115460510A (zh) * | 2022-09-08 | 2022-12-09 | 歌尔科技有限公司 | 设备的音量调节方法、智能设备以及计算机可读存储介质 |
| CN116170417A (zh) * | 2022-12-30 | 2023-05-26 | 北京齐乐无穷文化科技有限公司 | 一种语音通信方法、装置、设备和存储介质 |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101009577A (zh) * | 2006-12-28 | 2007-08-01 | 北京金山数字娱乐科技有限公司 | 实现音频播放的方法与装置 |
| WO2009077936A2 (en) * | 2007-12-17 | 2009-06-25 | Koninklijke Philips Electronics N.V. | Method of controlling communications between at least two users of a communication system |
| CN103874019A (zh) * | 2014-03-11 | 2014-06-18 | 腾讯科技(深圳)有限公司 | 语音交互方法和装置 |
| CN106774830A (zh) * | 2016-11-16 | 2017-05-31 | 网易(杭州)网络有限公司 | 虚拟现实系统、语音交互方法及装置 |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103335644B (zh) * | 2013-05-31 | 2016-03-16 | 王玉娇 | 街景地图的声音播放方法及相关设备 |
| CN106211017B (zh) * | 2016-06-20 | 2018-10-19 | 北京奇幻科技有限公司 | 一种3d声场构建方法 |
-
2017
- 2017-10-27 CN CN201711025125.XA patent/CN109729109B/zh active Active
-
2018
- 2018-10-25 WO PCT/CN2018/111915 patent/WO2019080901A1/zh not_active Ceased
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101009577A (zh) * | 2006-12-28 | 2007-08-01 | 北京金山数字娱乐科技有限公司 | 实现音频播放的方法与装置 |
| WO2009077936A2 (en) * | 2007-12-17 | 2009-06-25 | Koninklijke Philips Electronics N.V. | Method of controlling communications between at least two users of a communication system |
| CN103874019A (zh) * | 2014-03-11 | 2014-06-18 | 腾讯科技(深圳)有限公司 | 语音交互方法和装置 |
| CN106774830A (zh) * | 2016-11-16 | 2017-05-31 | 网易(杭州)网络有限公司 | 虚拟现实系统、语音交互方法及装置 |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110673810A (zh) * | 2019-09-27 | 2020-01-10 | 杭州鸿雁智能科技有限公司 | 显示设备及其显示方法、装置、存储介质和处理器 |
| CN110673810B (zh) * | 2019-09-27 | 2024-05-14 | 杭州鸿雁智能科技有限公司 | 显示设备及其显示方法、装置、存储介质和处理器 |
| CN110780598A (zh) * | 2019-10-24 | 2020-02-11 | 深圳传音控股股份有限公司 | 一种智能设备控制方法、装置、电子设备及可读存储介质 |
| CN114024954A (zh) * | 2021-10-27 | 2022-02-08 | 北京达佳互联信息技术有限公司 | 信息传输方法、装置及存储介质 |
| CN114024954B (zh) * | 2021-10-27 | 2024-02-06 | 北京达佳互联信息技术有限公司 | 信息传输方法、装置、服务器及存储介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN109729109B (zh) | 2020-11-10 |
| CN109729109A (zh) | 2019-05-07 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2019080901A1 (zh) | 交互界面的显示方法和装置、存储介质、电子装置 | |
| US12226691B2 (en) | Pre-set audio profiles for graphical user interface and parametric equalizer in gaming systems | |
| US10911882B2 (en) | Methods and systems for generating spatialized audio | |
| US10979842B2 (en) | Methods and systems for providing a composite audio stream for an extended reality world | |
| US9826331B2 (en) | Method and apparatus for sound processing in three-dimensional virtual scene | |
| RU2669510C1 (ru) | Способ и устройство для идентификации объекта при общении в виртуальной реальности, а также оборудование виртуальной реальности | |
| US9113034B2 (en) | Method and apparatus for processing audio in video communication | |
| US11109177B2 (en) | Methods and systems for simulating acoustics of an extended reality world | |
| US12383832B2 (en) | Audio processing method and apparatus | |
| US20160057557A1 (en) | Multidimensional virtual learning system and method | |
| JP2005322125A (ja) | 情報処理システム、情報処理方法、プログラム | |
| CN110580914A (zh) | 一种音频处理方法、设备及具有存储功能的装置 | |
| CN116390016A (zh) | 虚拟场景的音效控制方法、装置、计算机设备及存储介质 | |
| CN110072177B (zh) | 空间划分信息获取方法、装置及存储介质 | |
| CN119729331A (zh) | 音频渲染方法、存储介质及电子装置 | |
| CN115734148A (zh) | 音效调整方法以及相关装置 | |
| CN116939473A (zh) | 一种音频生成方法和相关装置 | |
| CN114038486A (zh) | 音频数据处理方法、装置、电子设备及计算机存储介质 | |
| US20230199421A1 (en) | Audio processing method and apparatus, and storage medium | |
| JP7685620B2 (ja) | 音声再生方法及び音声伝送方法、装置、電子機器及びプログラム | |
| CN118945587A (zh) | 音频数据的外放渲染方法、装置、设备及存储介质 | |
| CN116887174A (zh) | 一种虚拟空间中的声音混响方法、混响装置以及存储介质 | |
| CN115460510A (zh) | 设备的音量调节方法、智能设备以及计算机可读存储介质 | |
| WO2021196337A1 (zh) | 一种在多人vr场景中对交互式语音数据进行处理的方法 | |
| CN115705839A (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: 18869670 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 18869670 Country of ref document: EP Kind code of ref document: A1 |