CN118342780A - Audio track playing control method and device, electronic equipment and readable storage medium - Google Patents

Audio track playing control method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN118342780A
CN118342780A CN202310074800.7A CN202310074800A CN118342780A CN 118342780 A CN118342780 A CN 118342780A CN 202310074800 A CN202310074800 A CN 202310074800A CN 118342780 A CN118342780 A CN 118342780A
Authority
CN
China
Prior art keywords
audio
sound
client
information
track
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.)
Pending
Application number
CN202310074800.7A
Other languages
Chinese (zh)
Inventor
姜俊厚
郭威
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Rockrobo Technology Co Ltd
Shenzhen Luoke Innovation Technology Co Ltd
Original Assignee
Beijing Rockrobo Technology Co Ltd
Shenzhen Luoke Innovation Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Rockrobo Technology Co Ltd, Shenzhen Luoke Innovation Technology Co Ltd filed Critical Beijing Rockrobo Technology Co Ltd
Priority to CN202310074800.7A priority Critical patent/CN118342780A/en
Publication of CN118342780A publication Critical patent/CN118342780A/en
Pending legal-status Critical Current

Links

Landscapes

  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The application discloses a method, a device, electronic equipment and a readable storage medium for controlling audio track playing, which relate to the field of intelligent home and voice broadcasting. The method comprises the following steps: when the trusted application is detected to start a single-sound playing mode, a play list is obtained, wherein the play list comprises at least one target identifier, and each target identifier in the at least one target identifier is an identity identifier of a client which is designated by the trusted application and has playing authority; controlling silence of all audio tracks currently being played; and acquiring at least one target client information corresponding to the at least one target identifier in an information table, and controlling the audio track playing sound associated with the at least one target client information, wherein the information table records the client information in operation.

Description

Audio track playing control method and device, electronic equipment and readable storage medium
Technical Field
The application relates to the field of smart home and voice broadcasting, in particular to a method and a device for controlling audio track playing, electronic equipment and a readable storage medium.
Background
With the increasing availability of functionality of computer intelligent devices, the great progress of memory technology, speech algorithm technology and signal processing technology, and the improvement of software programming level. Making possible a wide range of applications of speech recognition technology. With the continuous development of terminal technology, terminal devices are increasingly widely used. The terminal device can be provided with a plurality of application programs with audio playing functions, and the terminal device can simultaneously run a plurality of application programs with audio playing functions.
In the related art, an application program for AudioFocus (audio focus) mechanism playing audio functions is adopted. The application program can play the audio only after AudioFocus is obtained, if a second application program needs to play the audio, the second application program can apply AudioFocus to the terminal device, the terminal device can control the first application program to pause playing the audio and release AudioFocus, the terminal device can allocate AudioFocus to the second application program, and the second application program starts playing the audio after AudioFocus is obtained.
In carrying out the present application, the applicant has found that the related art has at least the following problems:
the application may play the audio only after AudioFocus is obtained, such that control of the audio play is dependent on the third party application. In addition, since a plurality of application programs which have audio playing functions and have all obtained AudioFocus may be running at the same time, a certain application program may suddenly play audio, so that audio track playing switching is not flexible and accurate.
Disclosure of Invention
In view of this, the present application provides a method, apparatus, electronic device and readable storage medium for controlling audio playback, which mainly aims to solve the problems that the current application program can play audio only after AudioFocus is obtained, so that the control of audio playback depends on a third party application, and because a plurality of application programs with audio playback functions and having all obtained AudioFocus may be operated at the same time, a certain application program may suddenly play audio, so that the audio playback switching is not flexible and accurate.
According to a first aspect of the present application, there is provided an audio track play control method, the method comprising:
When a trusted application is detected to start a single-sound playing mode, a play list is obtained, wherein the play list comprises at least one target identifier, and each target identifier in the at least one target identifier is an identity identifier of a client which is designated by the trusted application and has playing authority;
controlling silence of all audio tracks currently being played;
And acquiring at least one target client information corresponding to the at least one target identifier in an information table, and controlling the audio track playing sound associated with the at least one target client information, wherein the information table records the client information in operation.
Optionally, before the playlist is acquired when the trusted application is detected to start the single sound playing mode, the method further includes:
Responding to a play request of a user, determining a designated client, wherein the designated client is a client to be subjected to sound play indicated by the play request;
creating an audio track, associating the audio track with the appointed client, and controlling the created audio track to play the audio sent by the appointed client;
And reading the client information of the appointed client, and recording the client information of the appointed client in the information table.
Optionally, the controlling the newly-built audio track to play the audio sent by the designated client includes:
If the appointed client is a trusted application which passes the trust authentication, acquiring voice feedback audio or voice dialogue audio appointed by the trusted application as appointed audio, and controlling the newly-built audio track to play the appointed audio, wherein the voice feedback audio or the voice dialogue audio is identified and determined by the trusted application through acquiring voice information of a user;
If the appointed client is a third party application which does not pass the trust authentication, acquiring playing audio appointed by the third party application as the appointed audio, and controlling the newly-built audio track to play the appointed audio, wherein the playing audio is identified and determined by the third party application through acquiring operation information of a user.
Optionally, the controlling muting of all audio tracks currently being played includes:
Reading the sound volume of the sound track corresponding to each sound track in all sound tracks, and determining at least one appointed sound track with the sound volume greater than a sound volume threshold value in all sound tracks, wherein the sound volume threshold value is used for indicating the sound volume of the sound track corresponding to a mute state;
Controlling the sound volume of the at least one designated sound track to be reduced to the sound volume threshold value, or controlling the at least one designated sound track to pause playing sound so as to mute all sound tracks.
Optionally, the obtaining at least one target client information corresponding to the at least one target identifier in the information table, and controlling the audio track playing sound associated with the at least one target client information include:
traversing all client information stored in the information table, and comparing the at least one target identifier with information identifiers included in each piece of client information in all pieces of client information to obtain a comparison result corresponding to each piece of client information;
extracting at least one piece of client information, of which the comparison result indicates that the playlist is hit, from the all pieces of client information as the at least one piece of target client information;
The method comprises the steps of identifying the state of a sound track associated with each piece of target client information in at least one piece of target client information, controlling the sound track to start and continue playing when the state of the sound track is identified to indicate that the sound track is in a pause playing state, and controlling the sound track volume to be increased to be larger than a volume threshold when the state of the sound track is identified to indicate that the sound track volume of the sound track is in a mute playing state, so that the sound is played by the sound track.
Optionally, traversing all client information stored in the information table, and comparing the at least one target identifier with an information identifier included in each piece of client information in the all client information, including:
For each piece of client information in all pieces of client information, reading an information identifier of the client information, and comparing the information identifier with at least one target identifier;
If the at least one target identifier comprises a target identifier which is the same as the information identifier, generating a comparison result for indicating that the client information hits the play list;
And if the at least one target identifier does not comprise the target identifier which is the same as the information identifier, generating a comparison result for indicating that the client information does not hit the play list.
Optionally, after traversing all client information stored in the information table and comparing the at least one target identifier with an information identifier included in each piece of client information in the all client information, the method further includes:
and extracting the client information of which the comparison result indicates that the playlist is not hit from all the client information, and controlling the audio track associated with the client information to keep the current playing state.
According to a second aspect of the present application, there is provided an audio track play control apparatus comprising:
the device comprises an acquisition module, a play list and a control module, wherein the acquisition module is used for acquiring the play list when the trusted application starts a single-sound play mode, and the play list comprises at least one target identifier, wherein each target identifier in the at least one target identifier is an identity identifier of a client which is appointed by the trusted application to have play permission;
the mute module is used for controlling the mute of all the audio tracks currently being played;
And the playing module is used for acquiring at least one target client information corresponding to the at least one target identifier from an information table, controlling the audio track associated with the at least one target client information to play sound, and recording the client information in operation in the information table.
Optionally, the apparatus further comprises:
The determining module is used for responding to a playing request of a user and determining a designated client, wherein the designated client is a client to be played in sound indicated by the playing request;
The control module is used for creating an audio track, associating the audio track with the appointed client and controlling the created audio track to play the audio sent by the appointed client;
And the recording module is used for reading the client information of the appointed client and recording the client information of the appointed client in the information table.
Optionally, the control module is configured to, if the specified client is a trusted application that has passed the trust authentication, obtain a voice feedback audio or a voice dialogue audio specified by the trusted application as a specified audio, and control the newly-built audio track to play the specified audio, where the voice feedback audio or the voice dialogue audio is identified and determined by the trusted application by obtaining voice information of a user; if the appointed client is a third party application which does not pass the trust authentication, acquiring playing audio appointed by the third party application as the appointed audio, and controlling the newly-built audio track to play the appointed audio, wherein the playing audio is identified and determined by the third party application through acquiring operation information of a user.
Optionally, the mute module is configured to read a track volume corresponding to each track in the all tracks, and determine at least one designated track with a track volume greater than a volume threshold in the all tracks, where the volume threshold is used to indicate a track volume corresponding to a mute state; controlling the sound volume of the at least one designated sound track to be reduced to the sound volume threshold value, or controlling the at least one designated sound track to pause playing sound so as to mute all sound tracks.
Optionally, the playing module is configured to traverse all client information stored in the information table, compare the at least one target identifier with an information identifier included in each piece of client information in the all pieces of client information, and obtain a comparison result corresponding to each piece of client information; extracting at least one piece of client information, of which the comparison result indicates that the playlist is hit, from the all pieces of client information as the at least one piece of target client information; the method comprises the steps of identifying the state of a sound track associated with each piece of target client information in at least one piece of target client information, controlling the sound track to start and continue playing when the state of the sound track is identified to indicate that the sound track is in a pause playing state, and controlling the sound track volume to be increased to be larger than a volume threshold when the state of the sound track is identified to indicate that the sound track volume of the sound track is in a mute playing state, so that the sound is played by the sound track.
Optionally, the playing module is configured to, for each piece of client information in the all pieces of client information, read an information identifier of the client information, and compare the information identifier with at least one target identifier; if the at least one target identifier comprises a target identifier which is the same as the information identifier, generating a comparison result for indicating that the client information hits the play list; and if the at least one target identifier does not comprise the target identifier which is the same as the information identifier, generating a comparison result for indicating that the client information does not hit the play list.
Optionally, the playing module is further configured to extract, from the all client information, the client information indicating that the playlist is missed by the comparison result, and control the audio track associated with the client information to maintain the current playing state.
According to a third aspect of the present application there is provided an electronic device comprising a memory storing a computer program and a processor implementing the steps of any of the methods of the first aspect described above when the computer program is executed by the processor.
According to a fourth aspect of the present application there is provided a readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the method of any of the first aspects described above.
By means of the technical scheme, the audio track playing control method, the audio track playing control device, the electronic equipment and the readable storage medium, when the trusted application is detected to start the single-sound playing mode, a playlist which is allowed to be played by the trusted application is obtained, wherein each target identifier stored in the playlist is an identity identifier of a client which is specified by the trusted application and has playing authority. Further, the silence of all tracks currently being played is controlled. And finally, acquiring at least one target client information corresponding to the at least one target identifier from an information table recorded with the client information in operation, and controlling the audio track playing sound associated with the at least one target client information. The trusted application controls to enter a single sound broadcasting mode, under the condition that the mode is opened, a single specific application or a plurality of appointed applications are controlled to play voice according to recorded client information, other applications play voice in a mute mode, after the single sound broadcasting mode is exited, other applications can normally play voice, the audio switching is carried out independent of a third party application, and the fine granularity control is carried out on the appointed audio track so as to improve the accuracy of the audio switching playing.
The foregoing description is only an overview of the present application, and is intended to be implemented in accordance with the teachings of the present application in order that the same may be more clearly understood and to make the same and other objects, features and advantages of the present application more readily apparent.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the application. Also, like reference numerals are used to designate like parts throughout the figures. In the drawings:
fig. 1 is a schematic flow chart of an audio track playing control method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of an audio track playing control method according to an embodiment of the present application;
FIG. 3 is a schematic diagram of an audio track structure of an audio track playing control method according to an embodiment of the present application;
fig. 4 is a schematic flowchart of an audio track playing control method according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an audio track playing control device according to an embodiment of the present application;
Fig. 6 is a schematic structural diagram of an audio track playing control device according to an embodiment of the present application;
fig. 7 is a schematic diagram of a device structure of an electronic device according to an embodiment of the present application.
Detailed Description
Exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the application to those skilled in the art.
During the process of playing audio by the application program, the application program can play audio only after AudioFocus is obtained, so that the control of audio playing depends on the third party application. In addition, since a plurality of application programs which have audio playing functions and have all obtained AudioFocus may be running at the same time, a certain application program may suddenly play audio, so that audio track playing switching is not flexible and accurate. Therefore, in order to realize that the audio switching does not depend on a third party application and fine granularity control of specific audio playing, the embodiment of the application provides an audio track playing control method, an audio track playing control device, an electronic device and a readable storage medium. Further, the silence of all tracks currently being played is controlled. And finally, acquiring at least one target client information corresponding to the at least one target identifier from an information table recorded with the client information in operation, and controlling the audio track playing sound associated with the at least one target client information. The trusted application controls to enter a single sound broadcasting mode, under the condition that the mode is opened, a single specific application or a plurality of appointed applications are controlled to play voice according to recorded client information, other applications play voice in a mute mode, after the single sound broadcasting mode is exited, other applications can normally play voice, the audio switching is carried out independent of a third party application, and the fine granularity control is carried out on the appointed audio track so as to improve the accuracy of the audio switching playing.
The embodiment of the application provides a method for controlling audio track playing, as shown in fig. 1, which comprises the following steps:
101. When the trusted application is detected to start a single-sound playing mode, a play list is obtained, wherein the play list comprises at least one target identifier, and each target identifier in the at least one target identifier is an identity identifier of a client which is specified by the trusted application and has playing authority.
The trusted application refers to an application program with application control authority developed by a factory, and specifically can be a voice assistant application program. And the audio playing control system acquires a play list set by the trusted application when detecting that the trusted application starts a single-sound playing mode. It should be noted that at least one target identifier is stored in the playlist, where each target identifier is used to indicate an identity of a client specified by the trusted application and having playing rights. That is, the target identifier recorded in the playlist is an identifier of the application client capable of playing sound in the single-sound playing mode. In the embodiment of the application, the client can be a music playing application, a video playing application, an audio-video call application, a voice dialogue application and the like. In the case where the single-sound broadcasting mode is on, the audio broadcasting control system controls a single specific application or a specified plurality of applications to broadcast voices according to the fine granularity of the playlist, and even if the application not in the playlist is broadcast, the application is broadcast in a silent broadcasting mode without sound.
102. And controlling the mute of all the audio tracks currently being played.
In the embodiment of the application, in order to ensure that when the single-sound broadcasting mode is on, other applications which are not allowed to play sound are in a non-playing state, or even if the application is played, the application is played in a mute playing mode without sound. Therefore, the audio playback control system needs to control silence of all tracks currently being played (pause of track playback or play of a track in a silent playback mode) in the case where the mono playback mode is on. For example, when a music client plays music, a user starts a trusted application (e.g., wakes up a voice assistant), and the trusted application such as the voice assistant starts a single sound play mode according to the current running scenario. When the trusted application starts a single-sound playing mode, the audio playing control system controls the audio track currently being played to be mute, and audio data of the trusted application such as a voice assistant is played through the newly-built audio track. Meanwhile, the audio playing control system finds out the client information which is allowed to be played in the single-sound playing mode in the running client according to the play list, and plays the sound of the audio track associated with the client information.
103. And acquiring at least one target client information corresponding to the at least one target identifier in an information table, and controlling the audio track playing sound associated with the at least one target client information, wherein the information table records the client information in operation.
Wherein, the information table records the client information in operation. Specifically, after a user starts an application client, the client may appear in the running process. At this time, the audio playback control system creates an audio track to play the audio sound of the audio track associated with the application client. At the same time, the audio playing control system needs to actively record the relevant information of the audio track associated with the client, such as audio track volume, application package name (i.e. application package name), application process, client identifier (information identifier), and the like, and record the relevant information as client information in an information table. Further, if the application client stops running, the client information corresponding to the application client is deleted from the information table. In the embodiment of the application, in order to accurately determine at least one target client permitted to play by the trusted application from a plurality of clients in operation, the audio play control system needs to compare the information identifier in each client information in the information table with the target identifier recorded in the play list. And further, according to the comparison result, determining at least one target client information hit in the playlist in the information table, and controlling the audio track playing sound associated with the at least one target client information.
The method provided by the embodiment of the application can acquire the play list which is appointed by the trusted application and allowed to be played when the trusted application is detected to start the single-sound play mode, wherein each target identifier stored in the play list is the identity identifier of the client which is appointed by the trusted application and has play authority. Further, the silence of all tracks currently being played is controlled. And finally, acquiring at least one target client information corresponding to the at least one target identifier from an information table recorded with the client information in operation, and controlling the audio track playing sound associated with the at least one target client information. The trusted application controls to enter a single sound broadcasting mode, under the condition that the mode is opened, a single specific application or a plurality of appointed applications are controlled to play voice according to recorded client information, other applications play voice in a mute mode, after the single sound broadcasting mode is exited, other applications can normally play voice, the audio switching is carried out independent of a third party application, and the fine granularity control is carried out on the appointed audio track so as to improve the accuracy of the audio switching playing.
The embodiment of the application provides a method for controlling audio track playing, as shown in fig. 2, which comprises the following steps:
201. In response to a user's play request, determining a designated client, creating an audio track, associating the audio track with the designated client, and controlling the created audio track to play audio from the designated client.
In the embodiment of the application, the trusted device is taken as a voice assistant, and the user wakes up the voice assistant to perform a dialogue with the voice assistant so as to enable the voice assistant to start an application scene of a single-sound playing mode. The audio playback control system may simultaneously control the plurality of clients that are running to associate a plurality of track playback sounds before the voice assistant does not turn on the single sound playback mode. As shown in fig. 3, there are a plurality of stages of audio playback, including track preparation, mixing, writing pcm, etc., and the control of the audio playback can be performed at different stages of audio playback. When the application client tries to play the audio, the audio playing control system creates an audio track for the application client, associates the audio track with the audio corresponding to the application client, and enters various stages of sound playing to realize playing of audio sounds. Before the voice assistant does not start the single-sound playing mode, the audio of the music application, the voice broadcast, the video application and the like can be selected to be played simultaneously. For example, when a music client is running, its associated track a is playing music 01, the user next turns on the game client, creates track B to play music 02, and before the single sound play mode is not turned on, the audio play control system may control track a and track B to play music 01 and music 02 simultaneously so that the user may hear the sounds of music 01 and music 02 simultaneously.
In the actual running process, after the user enters the appointed client, a playing request can be initiated to play the playing audio appointed by the appointed client. Specifically, the audio playing control system responds to a playing request of a user, determines a designated client to be subjected to sound playing indicated by the playing request, and then creates an audio track to play the audio of the client designated by the user. That is, each time a user opens an application client, the audio playing control system needs to create an audio track to associate with the application client, so as to play the audio sound corresponding to the application client.
It should be noted that, considering that some application clients are trusted applications through trust authentication, they need to perform a dialogue with the user to obtain the user intention, so if the specified client is a trusted application through trust authentication, the trusted application will identify and determine the voice feedback audio or voice dialogue audio required by the responding user by obtaining the voice information of the user, and use the voice feedback audio or voice dialogue audio as the specified audio, and the audio playing control system controls the newly-built audio track to play the specified audio. For example, the user initiates a voice instruction with a voice keyword to wake up a voice assistant, which determines the audio associated with the keyword from the keyword (e.g., "I am asking what is needed for help. And the third party application which does not pass the trust authentication does not need to be in dialogue with the user to determine the user intention, so if the appointed client is the third party application which does not pass the trust authentication, the third party application identifies the appointed audio by acquiring the operation information of the user, and the appointed audio is determined according to the operation information of the user, so that the audio playing control system controls the newly-built audio track to play the appointed audio. For example, the user enters a certain music client a, which takes music 03 as specified audio by clicking on a link of music 03 to enter a play entry for music 03.
202. The information identification, audio volume, application package name, application process information, etc. of the specified client are read as the client information of the specified client, and the client information of the specified client is recorded in an information table.
In order to determine the client corresponding to each track and the playing process of each track, the audio playing control system records the relevant information of the recording track as corresponding client information and stores the relevant information in an information table. The relevant information of the audio track, namely the client information, includes audio track volume, application package name (namely application package name), application process, information identification (client identification) and the like. In the actual running process, each time a user starts an application client, the client will appear in the application process, if the client needs to play sound, the audio play control system will create an audio track to associate with the client, and use the created audio track to play the audio sound indicated by the application client. Meanwhile, the audio playing control system needs to actively record relevant information of the newly-built audio track, and records the information as client information in the information table, so that the audio playing control system can restore or maintain the playing state of the audio track associated with the client information stored in the information table according to the information table.
203. When the trusted application is detected to initiate a single sound play mode, a playlist is obtained and all tracks currently being played are controlled to be muted.
In a scenario where a user wakes up a voice assistant to talk with the voice assistant, the voice assistant may turn on a single-sound play mode. When the audio playing control system detects that the trusted application starts a single-sound playing mode, all audio tracks currently being played are controlled to be mute, and simultaneously, in response to an instruction of a new audio track initiated by the trusted application, a new audio track is associated with the voice assistant, so that the voice assistant can communicate with a user through playing of the new audio track and voice feedback audio or voice dialogue audio, and user intention is obtained. Next, the audio playback control system needs to obtain a playlist set by the trusted device in order to determine which clients are clients that the trusted device is allowed to play. It should be noted that at least one target identifier is stored in the playlist, where each target identifier is used to indicate an identity of a client specified by the trusted application and having playing rights. That is, the target identifier recorded in the playlist is an identifier of the application client capable of playing sound in the single-sound playing mode. The subsequent audio playing control system can determine the target client information which is allowed to be played in the single-sound playing mode in the information table according to the play list, and then play the sound of the audio track associated with the target client information.
Specifically, the audio playback control system may send an instruction to the trusted application to obtain the playlist, the trusted application reading the playlist in the storage location in response to the instruction to obtain the playlist, sending the playlist to the audio playback control system to cause the audio playback control system to obtain the playlist. Further, the audio playback control system may control the muting of all tracks currently being played in a manner that pauses the playback of the tracks, as well as modulating the volume of the tracks. In the actual operation process, for all the tracks being played, the audio playing control system needs to read the volume of the tracks corresponding to each track in all the tracks, and at least one designated track with the volume greater than the volume threshold is determined in all the tracks. It should be noted that, the volume threshold is used to indicate the volume 0 of the audio track corresponding to the mute state, that is, the audio play control system needs to determine the designated audio track that is playing the sound from all audio tracks. Further, the audio track volume of at least one designated audio track is controlled to be reduced to a volume threshold value of 0, or the playing state of at least one designated audio track is controlled to be in a pause playing state, so that the mute of all audio tracks currently being played is realized.
204. Traversing all the client information stored in the information table, and comparing at least one target identifier with the information identifier included in each piece of client information in all the client information to obtain a comparison result corresponding to each piece of client information.
In the embodiment of the application, the information table stores the client information of all the currently running applications, wherein the tracks corresponding to some client information are tracks which are allowed to be played in the single-sound playing mode by the trusted application, and the tracks corresponding to some client information are tracks which are not allowed to be played in the single-sound playing mode by the trusted application. Therefore, in order to accurately play the sound of the audio track allowed to be played by the trusted application from the existing audio track, the audio play control system needs to read the information identifier corresponding to each piece of client information in the information table and compare the information identifier with at least one target identifier stored in the play list. For example, the information table stores client information corresponding to three audio tracks, and the information identifier corresponding to each client information is respectively [ a music ], [ B game ], [ C text input application ]. The target identifications stored in the playlist set by the trusted application are [ a music ] and [ C text entry application ]. And comparing the information identifier (A music), the game (B) and the text input application (C) with the target identifiers (A music) and the text input application (C) to determine whether the target identifiers comprise the same target identifier as the information identifier. If the comparison result corresponding to the client information shows that at least one target identifier in the playlist comprises the same target identifier as the information identifier, the track associated with the client information is the track which is allowed to be played by the trusted application, and a comparison result for indicating that the client information hits the playlist is correspondingly generated. If the comparison result shows that at least one target identifier in the playlist does not comprise the target identifier identical to the information identifier, the audio track associated with the client information is not the audio track allowed to be played by the trusted application, and a comparison result for indicating that the client information does not hit the playlist is correspondingly generated.
205. And extracting at least one piece of client information of which the comparison result indicates that the playlist is hit from all pieces of client information as at least one piece of target client information, and controlling the audio track associated with the at least one piece of target client information to play sound.
In the embodiment of the application, for each piece of client information in all pieces of client information recorded in the information table, if the comparison result indicates that the piece of client information hits the play list, the audio play control system controls the associated audio track play sound. In particular, it is contemplated that when muting is an audio playback control system may mute in both a pause state that controls the playback state of the audio track or a decrease in the audio track volume of the control audio track to a volume threshold. Therefore, when the mute is released, the audio playing control system firstly identifies the state of the audio track associated with each piece of target client information in at least one piece of target client information, and when the state of the audio track is identified to indicate that the audio track is in a pause playing state, the audio track is controlled to start and play is continued. When the state of the sound track is recognized to indicate that the sound track volume of the sound track is in a mute playing state, the sound track volume is controlled to be increased to be larger than a sound volume threshold value so that the sound track plays sound.
206. And extracting the client information of which the comparison result indicates that the playlist is not hit from all the client information, and controlling the audio track associated with the client information to keep the current playing state.
Further, for each piece of client information in all pieces of client information recorded in the information table, if the comparison result indicates that the piece of client information does not hit the playlist, the audio playing control system will control the audio track associated with the piece of client information to keep the current playing state, that is, continue to make it not play or mute playing.
207. When the trusted application is detected to close the single sound playing mode, all audio track playing sounds associated with all client information recorded in the information table are controlled.
Finally, when the audio playing control system detects that the trusted application closes the single sound playing mode, controlling all audio track playing sounds associated with all client information recorded in the information table. Taking the scenario in which the user stops talking with the voice assistant and the voice assistant is turned off as an example, the trusted application turns off the single-sound play mode after the voice assistant is turned off. All tracks being played before the single sound play mode is started are restored, and the sound can be played simultaneously. In the actual running process, the track information of all the clients in operation is recorded in the information table, so that the audio playing control system can play sound through all the tracks associated with all the client information recorded in the control information table, and the tracks associated with all the clients in operation before the single sound playing mode is started can be completely restored to play.
In summary, as shown in fig. 4, before the single-sound playing mode is started, when the application client runs and requests to play sound, the audio playing control system plays the corresponding sound for the newly-built audio track, and records the client information corresponding to the client. When the trusted application plays sound, the audio playing control system also creates an audio track to play the audio of the trusted application, and records the client information corresponding to the voice assistant. After the trusted application starts the single sound playing mode, the audio playing control system can only play the audio track specified by the trusted application.
The method provided by the embodiment of the application can acquire the play list which is appointed by the trusted application and allowed to be played when the trusted application is detected to start the single-sound play mode, wherein each target identifier stored in the play list is the identity identifier of the client which is appointed by the trusted application and has play authority. Further, the silence of all tracks currently being played is controlled. And finally, acquiring at least one target client information corresponding to the at least one target identifier from an information table recorded with the client information in operation, and controlling the audio track playing sound associated with the at least one target client information. The trusted application controls to enter a single sound broadcasting mode, under the condition that the mode is opened, a single specific application or a plurality of appointed applications are controlled to play voice according to recorded client information, other applications play voice in a mute mode, after the single sound broadcasting mode is exited, other applications can normally play voice, the audio switching is carried out independent of a third party application, and the fine granularity control is carried out on the appointed audio track so as to improve the accuracy of the audio switching playing.
Further, as a specific implementation of the method shown in fig. 1, an embodiment of the present application provides an audio track playing control device, as shown in fig. 5, where the device includes: an acquisition module 501, a mute module 502 and a play module 503.
The obtaining module 501 is configured to obtain a playlist when it is detected that the trusted application starts a single-sound playing mode, where the playlist includes at least one target identifier, and each target identifier in the at least one target identifier is an identity identifier of a client that is specified by the trusted application to have playing rights;
the mute module 502 is configured to mute all audio tracks currently being played;
The playing module 503 is configured to obtain at least one target client information corresponding to the at least one target identifier from an information table, and control audio track playing sound associated with the at least one target client information, where the information table records the client information in operation.
In a specific application scenario, as shown in fig. 6, the apparatus further includes: a determining module 601, a control module 602 and a recording module 603.
The determining module 601 is configured to determine, in response to a play request of a user, a specified client, where the specified client is a client to be played by sound indicated by the play request;
The control module 602 is configured to create an audio track, associate the audio track with the specified client, and control the created audio track to play audio sent by the specified client;
The recording module 603 is configured to read the information identifier, the audio volume, the application package name, and the application process information of the specified client as the client information of the specified client, and record the client information of the specified client in the information table.
In a specific application scenario, the control module 602 is configured to, if the specified client is a trusted application that has passed the trust authentication, obtain a voice feedback audio or a voice dialogue audio specified by the trusted application as a specified audio, and control the newly-built audio track to play the specified audio, where the voice feedback audio or the voice dialogue audio is determined by the trusted application by obtaining voice information of a user; if the appointed client is a third party application which does not pass the trust authentication, acquiring playing audio appointed by the third party application as the appointed audio, and controlling the newly-built audio track to play the appointed audio, wherein the playing audio is identified and determined by the third party application through acquiring operation information of a user.
In a specific application scenario, the mute module 502 is configured to read a track volume corresponding to each track in the all tracks, and determine, in the all tracks, at least one specified track with a track volume greater than a volume threshold, where the volume threshold is used to indicate a track volume corresponding to a mute state; controlling the sound volume of the at least one designated sound track to be reduced to the sound volume threshold value, or controlling the at least one designated sound track to pause playing sound so as to mute all sound tracks.
In a specific application scenario, the playing module 503 is configured to traverse all client information stored in the information table, compare the at least one target identifier with an information identifier included in each piece of client information in the all pieces of client information, and obtain a comparison result corresponding to each piece of client information; extracting at least one piece of client information, of which the comparison result indicates that the playlist is hit, from the all pieces of client information as the at least one piece of target client information; the method comprises the steps of identifying the state of a sound track associated with each piece of target client information in at least one piece of target client information, controlling the sound track to start and continue playing when the state of the sound track is identified to indicate that the sound track is in a pause playing state, and controlling the sound track volume to be increased to be larger than a volume threshold when the state of the sound track is identified to indicate that the sound track volume of the sound track is in a mute playing state, so that the sound is played by the sound track.
In a specific application scenario, the playing module 503 is configured to, for each piece of client information in the all pieces of client information, read an information identifier of the client information, and compare the information identifier with at least one target identifier; if the at least one target identifier comprises a target identifier which is the same as the information identifier, generating a comparison result for indicating that the client information hits the play list; and if the at least one target identifier does not comprise the target identifier which is the same as the information identifier, generating a comparison result for indicating that the client information does not hit the play list.
In a specific application scenario, the playing module 503 is further configured to extract, from all the client information, the client information indicating that the playlist is missed, and control an audio track associated with the client information to maintain a current playing state.
The device provided by the embodiment of the application can acquire the play list which is appointed by the trusted application and allowed to be played when the trusted application is detected to start the single-sound play mode, wherein each target identifier stored in the play list is the identity identifier of the client which is appointed by the trusted application and has the play authority. Further, the silence of all tracks currently being played is controlled. And finally, acquiring at least one target client information corresponding to the at least one target identifier from an information table recorded with the client information in operation, and controlling the audio track playing sound associated with the at least one target client information. The trusted application controls to enter a single sound broadcasting mode, under the condition that the mode is opened, a single specific application or a plurality of appointed applications are controlled to play voice according to recorded client information, other applications play voice in a mute mode, after the single sound broadcasting mode is exited, other applications can normally play voice, the audio switching is carried out independent of a third party application, and the fine granularity control is carried out on the appointed audio track so as to improve the accuracy of the audio switching playing.
It should be noted that, for other corresponding descriptions of each functional unit related to the audio track playing control device provided by the embodiment of the present application, reference may be made to corresponding descriptions in fig. 1 and fig. 2 to fig. 4, and no further description is given here.
In an exemplary embodiment, referring to fig. 7, there is further provided an electronic device, which includes a communication bus, a processor, a memory, and a communication interface, and may further include an input-output interface and a display device, where each functional unit may perform communication with each other through the bus. The memory stores a computer program, and the processor is configured to execute the program stored in the memory and execute the track playback control method in the above embodiment.
A readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the method of controlling an audio track playback.
From the above description of the embodiments, it will be clear to those skilled in the art that the present application may be implemented in hardware, or may be implemented by means of software plus necessary general hardware platforms. Based on such understanding, the technical solution of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.), and includes several instructions for causing a computer device (may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective implementation scenario of the present application.
Those skilled in the art will appreciate that the drawing is merely a schematic illustration of a preferred implementation scenario and that the modules or flows in the drawing are not necessarily required to practice the application.
Those skilled in the art will appreciate that modules in an apparatus in an implementation scenario may be distributed in an apparatus in an implementation scenario according to an implementation scenario description, or that corresponding changes may be located in one or more apparatuses different from the implementation scenario. The modules of the implementation scenario may be combined into one module, or may be further split into a plurality of sub-modules.
The above-mentioned inventive sequence numbers are merely for description and do not represent advantages or disadvantages of the implementation scenario.
The foregoing disclosure is merely illustrative of some embodiments of the application, and the application is not limited thereto, as modifications may be made by those skilled in the art without departing from the scope of the application.

Claims (10)

1. A method of controlling playback of a soundtrack, comprising:
When a trusted application is detected to start a single-sound playing mode, a play list is obtained, wherein the play list comprises at least one target identifier, and each target identifier in the at least one target identifier is an identity identifier of a client which is designated by the trusted application and has playing authority;
controlling silence of all audio tracks currently being played;
And acquiring at least one target client information corresponding to the at least one target identifier in an information table, and controlling the audio track playing sound associated with the at least one target client information, wherein the information table records the client information in operation.
2. The method of claim 1, wherein when the trusted application is detected to initiate a single sound play mode, the method further comprises, prior to obtaining the playlist:
Responding to a play request of a user, determining a designated client, wherein the designated client is a client to be subjected to sound play indicated by the play request;
creating an audio track, associating the audio track with the appointed client, and controlling the created audio track to play the audio sent by the appointed client;
And reading the client information of the appointed client, and recording the client information of the appointed client in the information table.
3. The method of claim 2, wherein said controlling the newly created track to play the audio from the specified client comprises:
If the appointed client is a trusted application which passes the trust authentication, acquiring voice feedback audio or voice dialogue audio appointed by the trusted application as appointed audio, and controlling the newly-built audio track to play the appointed audio, wherein the voice feedback audio or the voice dialogue audio is identified and determined by the trusted application through acquiring voice information of a user;
If the appointed client is a third party application which does not pass the trust authentication, acquiring playing audio appointed by the third party application as the appointed audio, and controlling the newly-built audio track to play the appointed audio, wherein the playing audio is identified and determined by the third party application through acquiring operation information of a user.
4. The method of claim 1, wherein said controlling muting of all tracks currently being played comprises:
Reading the sound volume of the sound track corresponding to each sound track in all sound tracks, and determining at least one appointed sound track with the sound volume greater than a sound volume threshold value in all sound tracks, wherein the sound volume threshold value is used for indicating the sound volume of the sound track corresponding to a mute state;
Controlling the sound volume of the at least one designated sound track to be reduced to the sound volume threshold value, or controlling the at least one designated sound track to pause playing sound so as to mute all sound tracks.
5. The method according to claim 1, wherein the obtaining at least one target client information corresponding to the at least one target identifier in the information table, and controlling the track playing sound associated with the at least one target client information, includes:
traversing all client information stored in the information table, and comparing the at least one target identifier with information identifiers included in each piece of client information in all pieces of client information to obtain a comparison result corresponding to each piece of client information;
extracting at least one piece of client information, of which the comparison result indicates that the playlist is hit, from the all pieces of client information as the at least one piece of target client information;
The method comprises the steps of identifying the state of a sound track associated with each piece of target client information in at least one piece of target client information, controlling the sound track to start and continue playing when the state of the sound track is identified to indicate that the sound track is in a pause playing state, and controlling the sound track volume to be increased to be larger than a volume threshold when the state of the sound track is identified to indicate that the sound track volume of the sound track is in a mute playing state, so that the sound is played by the sound track.
6. The method of claim 5, wherein traversing all client information stored in the information table compares the at least one target identifier with an information identifier included in each of the all client information, comprising:
For each piece of client information in all pieces of client information, reading an information identifier of the client information, and comparing the information identifier with at least one target identifier;
If the at least one target identifier comprises a target identifier which is the same as the information identifier, generating a comparison result for indicating that the client information hits the play list;
And if the at least one target identifier does not comprise the target identifier which is the same as the information identifier, generating a comparison result for indicating that the client information does not hit the play list.
7. The method of claim 5, wherein after traversing all client information stored in the information table and comparing the at least one target identifier with an information identifier included in each of the all client information, the method further comprises:
and extracting the client information of which the comparison result indicates that the playlist is not hit from all the client information, and controlling the audio track associated with the client information to keep the current playing state.
8. An audio track playback control device, comprising:
the device comprises an acquisition module, a play list and a control module, wherein the acquisition module is used for acquiring the play list when the trusted application starts a single-sound play mode, and the play list comprises at least one target identifier, wherein each target identifier in the at least one target identifier is an identity identifier of a client which is appointed by the trusted application to have play permission;
the mute module is used for controlling the mute of all the audio tracks currently being played;
And the playing module is used for acquiring at least one target client information corresponding to the at least one target identifier from an information table, controlling the audio track associated with the at least one target client information to play sound, and recording the client information in operation in the information table.
9. An electronic device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any one of claims 1 to 7 when the computer program is executed.
10. A readable storage medium having stored thereon a computer program, which when executed by a processor realizes the steps of the method according to any of claims 1 to 7.
CN202310074800.7A 2023-01-12 2023-01-12 Audio track playing control method and device, electronic equipment and readable storage medium Pending CN118342780A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310074800.7A CN118342780A (en) 2023-01-12 2023-01-12 Audio track playing control method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310074800.7A CN118342780A (en) 2023-01-12 2023-01-12 Audio track playing control method and device, electronic equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN118342780A true CN118342780A (en) 2024-07-16

Family

ID=91812518

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310074800.7A Pending CN118342780A (en) 2023-01-12 2023-01-12 Audio track playing control method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN118342780A (en)

Similar Documents

Publication Publication Date Title
US11011178B2 (en) Detecting replay attacks in voice-based authentication
CN101313483B (en) Configuration of echo cancellation
EP3017589B1 (en) System for improving audio conferencing services
CN101438348B (en) Method for recovering content reproduction of spanning equipment
EP3703404B1 (en) Using audio to associate a target device with credentials of an account associated with a user of a source device
US11899762B2 (en) Association via audio
CN105828254A (en) Audio adjusting method and device
KR20010095714A (en) Compact disc recordable player having means of copy protection and copying method thereof
CN112053699B (en) Method and device for processing sound changing of game card
CN118342780A (en) Audio track playing control method and device, electronic equipment and readable storage medium
CN114333827B (en) Breakpoint continuous playing method and device, electronic equipment and storage medium
KR100242337B1 (en) Language studying apparatus using a recording media and reproducing method thereof
CN114745213A (en) Conference record generation method and device, electronic equipment and storage medium
CN110502207B (en) Background sound silencing method, system, equipment and storage medium
TWI691893B (en) A method and an apparatus for continuously broadcasting audio data
CN108196817B (en) Audio recognition method, device and storage medium
US20090313010A1 (en) Automatic playback of a speech segment for media devices capable of pausing a media stream in response to environmental cues
JP2021009350A (en) Method for exiting audio skill, apparatus, device, and storage medium
JP7178537B2 (en) Playback update method, device and storage medium
KR102171479B1 (en) Method and system for digital audio co-play service
CN108429929B (en) Audio track playing method, device and storage medium
EP4140553A1 (en) Audio analytics and accessibility across applications and platforms
CN113963722A (en) Method and device for controlling multiple devices to play different audios simultaneously and terminal device
JP2799084B2 (en) Muting method of CD player
CN114925189A (en) Content recommendation method and device based on vehicle-mounted conversation and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination