Audio live broadcast and audio processing method and device, and storage medium
By deploying device files associated with live broadcast applications in the operating system of the live broadcast device, the problem that anchors cannot push the audio data of the live broadcast device to the expected live broadcast platform is solved, and cross-platform compatibility of audio live broadcast is achieved.
Patent Information
- Application Number
- CN202510269082.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-08
- Publication Date
- 2025-06-06
AI Technical Summary
In the prior art, anchors cannot push the push audio generated by the live broadcast device to the corresponding live broadcast platform through the desired live broadcast application.
By deploying a first device file in the operating system of the live broadcast device, the file corresponds to the first microphone device associated with the live broadcast application, and reading audio data from the first device file via the operating system, and transmitting it to the live broadcast platform.
It is realized that the anchor staff can push the push audio generated by the live broadcast device to the corresponding live broadcast platform through the desired live broadcast application, so that the live broadcast device can use the live broadcast device to perform audio live broadcast on the desired live broadcast platform.
Smart Images

Figure CN120111036A_ABST
Abstract
Description
[0001] This application is a divisional application with application number 2024101765146, publication number CN118101629A, application date February 8, 2024, and the invention name is "A method, device and storage medium for audio live broadcast and audio processing." Technical Field
[0002] The present application relates to the field of live broadcast technology, and in particular to an audio live broadcast and audio processing method, device and storage medium. Background Art
[0003] At present, with the advancement of network communication technology, network live broadcasting has been increasingly developed and applied. Live broadcasting equipment for network live broadcasting has been proposed to generate push audio to a live broadcasting platform based on audio data from different audio sources.
[0004] In reality, the users of live broadcast equipment, that is, anchors, are usually deeply bound to various live broadcast platforms. Therefore, it is inevitable that when using live broadcast equipment, anchors hope to use the desired live broadcast application (where the live broadcast application corresponds to the live broadcast platform) to broadcast live, so as to push the push audio to the desired live broadcast platform. However, since existing live broadcast applications (such as Douyin application and Kuaishou application, etc.) are all developed based on tablet devices such as mobile phones, the live broadcast application obtains audio from the microphone of the tablet device by default.
[0005] In this case, even if a live broadcast application corresponding to the live broadcast platform (such as the Douyin application and the Kuaishou application) is installed in the live broadcast device, the live broadcast application cannot push the push audio generated by the live broadcast device to the corresponding live broadcast platform. Therefore, the anchor cannot push the push audio generated by the live broadcast device to the desired live broadcast platform through the desired live broadcast application, and thus cannot use the live broadcast device to perform audio live broadcast on the desired live broadcast platform.
[0006] With respect to the technical problem in the above-mentioned prior art that the anchor personnel cannot push the push audio generated by the live broadcast device to the corresponding live broadcast platform through the desired live broadcast application, no effective solution has been proposed yet. Summary of the invention
[0007] The embodiments of the present disclosure provide an audio live broadcast and audio processing method, device and storage medium to at least solve the technical problem in the prior art that the anchor cannot push the push audio generated by the live broadcast device to the corresponding live broadcast platform through the desired live broadcast application.
[0008] According to one aspect of an embodiment of the present disclosure, a method for live audio broadcasting is provided, including: generating push audio for pushing to a live broadcasting platform; writing first audio data of the push audio into a first device file, wherein the first device file corresponds to a first microphone device associated with a live broadcasting application; and using the live broadcasting application to read the first audio data from the first device file via an operating system, and transmitting the first audio data to the live broadcasting platform, wherein the live broadcasting application corresponds to the live broadcasting platform.
[0009] According to another aspect of an embodiment of the present disclosure, an audio processing method is also provided, including: generating push audio for pushing to a live broadcast platform; and writing first audio data of the push audio into a first device file configured by an operating system, wherein the first device file corresponds to a first microphone device associated with a live broadcast application, and the live broadcast application corresponds to the live broadcast platform.
[0010] According to another aspect of an embodiment of the present disclosure, a storage medium is further provided, the storage medium including a stored program, wherein when the program is running, a processor executes any one of the methods described above.
[0011] According to another aspect of an embodiment of the present disclosure, an audio live broadcast device is also provided, including: a first push audio generation module, used to generate push audio for being pushed to a live broadcast platform; a first push audio writing module, used to write first audio data of the push audio into a first device file, wherein the first device file corresponds to a first microphone device associated with a live broadcast application; and a first audio data reading module, used to read the first audio data from the first device file via an operating system using a live broadcast application, and transmit the first audio data to the live broadcast platform, wherein the live broadcast application corresponds to the live broadcast platform.
[0012] According to another aspect of an embodiment of the present disclosure, an audio processing device is also provided, including: a second push audio generation module, used to write the first audio data of the push audio into a first device file configured by an operating system, wherein the first device file corresponds to a first microphone device associated with a live broadcast application, and the live broadcast application corresponds to a live broadcast platform.
[0013] According to another aspect of an embodiment of the present disclosure, there is also provided an audio live broadcast device, including: a first processor; and a first memory, connected to the first processor, for providing the first processor with instructions for processing the following processing steps: generating a push audio for pushing to a live broadcast platform; writing the first audio data of the push audio into a first device file, wherein the first device file corresponds to a first microphone device associated with a live broadcast application; and using the live broadcast application to read the first audio data from the first device file via the operating system, and transmitting the first audio data to the live broadcast platform, wherein the live broadcast application corresponds to the live broadcast platform.
[0014] According to another aspect of an embodiment of the present disclosure, an audio processing device is also provided, including: a second processor; and a second memory connected to the second processor, for providing the second processor with instructions for processing the following processing steps; generating push audio for pushing to a live broadcast platform; and writing the first audio data of the push audio into a first device file configured by an operating system, wherein the first device file corresponds to a first microphone device associated with a live broadcast application, and the live broadcast application corresponds to the live broadcast platform.
[0015] The present application provides an audio live broadcast method, which is applied to a live broadcast device. First, an audio processing application generates a push audio for pushing to a live broadcast platform. Then, the audio processing application writes the first audio data of the push audio into a first device file. The first device file corresponds to a first microphone device associated with the live broadcast application. Finally, the live broadcast application reads the first audio data from the first device file via an operating system and transmits the first audio data to the live broadcast platform. The live broadcast application corresponds to the live broadcast platform.
[0016] Since the first device file in the present application corresponds to the first microphone device associated with the live broadcast application, and the live broadcast application corresponds to the live broadcast platform, after the operating system receives the request sent by the live broadcast application to obtain data from the first microphone device, the operating system directly reads the corresponding data from the first device file and sends the read data to the live broadcast application.
[0017] Furthermore, since the present application writes the first audio data of the pushed audio into the first device file, the data read by the operating system from the first device file is the first audio data of the pushed audio. Thus, after the operating system sends the first audio data to the live broadcast application, the live broadcast application transmits the first audio data to the live broadcast platform. Thus, the audience user can listen to the live broadcast audio corresponding to the pushed audio from the corresponding live broadcast platform through the terminal device.
[0018] Thus, the technical effect of ensuring that the anchor can use the desired live broadcast platform for live broadcasting is achieved, thereby solving the technical problem in the prior art that the anchor cannot push the push audio generated by the live broadcast device to the corresponding live broadcast platform through the desired live broadcast application. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The drawings described herein are used to provide a further understanding of the present disclosure and constitute a part of the present application. The illustrative embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation on the present disclosure. In the drawings:
[0020] Figure 1It is a schematic diagram of the audio live broadcast system and multiple live broadcast platforms according to Example 1 of the present application;
[0021] Figure 2 It is a schematic diagram of the hardware modules of the audio live broadcast system and multiple live broadcast platforms according to Example 1 of the present application;
[0022] Figure 3 It is a schematic diagram of the hierarchical relationship structure of the audio live broadcast system according to Embodiment 1 of the present application;
[0023] Figure 4 is a flowchart of the audio live broadcast method according to Embodiment 1 of the present application;
[0024] Figure 5 is a flowchart of the audio processing method according to Embodiment 1 of the present application;
[0025] Figure 6 is a schematic diagram of an audio live broadcast device according to Embodiment 2 of the present application;
[0026] Figure 7 is a schematic diagram of an audio processing device according to Embodiment 2 of the present application;
[0027] Figure 8 is a schematic diagram of the audio live broadcast device according to Embodiment 3 of the present application; and
[0028] Fig. 9 It is a schematic diagram of the audio processing device according to Example 3 of the present application. DETAILED DESCRIPTION
[0029] In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only embodiments of a part of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative work should fall within the scope of protection of the present disclosure.
[0030] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.
[0031] First, some nouns or terms that appear in the process of describing the embodiments of the present disclosure are subject to the following explanations:
[0032] Push audio: The push audio described in the present invention refers to the audio generated by the live broadcast device and sent to the live broadcast platform for live broadcast.
[0033] Live audio: The live audio described in the present invention refers to the audio corresponding to the pushed audio sent by the live broadcast platform to the terminal devices of each audience user.
[0034] Live broadcast device: The live broadcast device described in the present invention refers to a device with a live broadcast function, and the live broadcast function refers to the function of sending the generated push audio to the live broadcast platform. Therefore, the live broadcast device of the present invention also includes a computer, mobile phone, tablet computer, etc. installed with a live broadcast application.
[0035] Example 1
[0036] According to this embodiment, an embodiment of a method for audio live broadcast and audio processing is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0037] Figure 1 Schematic diagram of the audio live broadcast system and multiple live broadcast platforms according to Embodiment 1 of the present application. Figure 1 As shown, the audio live broadcast system includes: a live broadcast device 100 and a plurality of different types of audio sources 201-204.
[0038] refer to Figure 1As shown, the audio sources 201-203 can be connected to the live broadcast device 100 through corresponding audio source input interfaces. The audio source 204 can also be connected to the live broadcast device 100 for communication (wherein the network used by the audio source 204 to communicate with the live broadcast device 100 includes but is not limited to a mobile communication network, a wireless network, etc.). Figure 1 It is not shown in the figure, but for example, an audio source 205 disposed inside the live broadcast device 100 may also be included. And the audio sources 201-205 may include, for example, a 3.5 microphone 201, a computer 202, a USB microphone 203, and a mobile phone 204. It is worth noting that those skilled in the art should be aware that the above are only examples of the types of audio sources and the connection methods of the audio sources and the live broadcast device 100, and the actual situation is not limited to this.
[0039] In addition, reference Figure 1 As shown, multiple live broadcast platforms 301-30n are also included. After generating the push audio, the processor in the live broadcast device 100 transmits the first audio data corresponding to the push audio to the live broadcast platform 301-30n. Thus, the audience user can listen to the live broadcast audio corresponding to the push audio from the corresponding live broadcast platform 301-30n through the terminal device. Among them, the live broadcast platform can be, for example, the Douyin live broadcast platform, the Kuaishou live broadcast platform, and the Huya live broadcast platform.
[0040] It is worth noting that although Figure 1 Not shown, the audio source may also be, for example, audio stored locally in the live broadcast device 100 or network audio accessed by a processor in the live broadcast device 100 through a link address, etc., and no specific limitation is made here.
[0041] Figure 2 Schematic diagram of the hardware modules of the audio live broadcast system and multiple live broadcast platforms according to Embodiment 1 of the present application. Figure 2 As shown, 3.5 microphone 201 is connected to the processor 110 in the live broadcast device 100 through the audio codec 111; the computer 202 is connected to the processor 110 in the live broadcast device 100 through the HDMI interface 112; the USB microphone 203 is connected to the processor 110 in the live broadcast device 100 through the USB interface 113; the mobile phone 204 is connected to the processor 110 in the live broadcast device 100 through the network communication circuit 114; the built-in microphone 115 is also connected to the processor 110 through the audio codec 111.
[0042] In addition, reference Figure 2 As shown, the processor 110 in the live broadcast device 100 is connected to the live broadcast platform 301-30n through the network communication circuit 114. Thus, the first audio data corresponding to the pushed audio can be sent to the live broadcast platform 301-30n. In addition, although Figure 2 Although not shown, the processor 110 may also be communicatively connected to the live broadcast platforms 301 to 30n via a mobile communication circuit, for example.
[0043] It is worth noting that the processor 110 may send the first audio data to one live broadcast platform, or may send the first audio data to a plurality of different live broadcast platforms respectively, which is not specifically limited here.
[0044] Figure 3 Schematic diagram of the hierarchical relationship of the audio live broadcast system according to the embodiment of the present application. Figure 3 As shown, the live broadcast device 100 is deployed with an operating system and a hardware layer under the operating system. In this embodiment, Android is used as an example of the operating system for explanation. Figure 3 As shown, the operating system includes a driver layer, a HAL layer, a service layer, a framework layer and an application layer.
[0045] Among them, an audio processing application is deployed at the application layer. The audio processing application is used to generate push audio during the live broadcast process. In addition, multiple live broadcast applications 1 to n are also deployed at the application layer. Live broadcast applications 1 to n are used to transmit push audio to the corresponding live broadcast platform. Among them, live broadcast applications 1 to n can be, for example, live broadcast applications developed by third parties based on the Android system (for example, Douyin application and Kuaishou application, etc.).
[0046] Furthermore, a first device file may be deployed in the operating system (for example, the first device file may be / dev / snd / pcmC0D0c deployed in the / dev directory of the operating system). And wherein, "C0" indicates that the sound card ID is 0, "D0" indicates that the device ID is 0, and "c" indicates that it is used for recording. And in the case where the operating system is deployed with the first device file, the first device file may be designated as the device file corresponding to the first microphone device associated with the live broadcast application 1 to n by using the corresponding function at the HAL layer. For example, the first microphone device associated with the live broadcast application 1 to n is the microphone of a tablet device such as a mobile phone, so that the first device file may be designated as the device file corresponding to the microphone associated with the live broadcast application 1 to n by using the corresponding function at the HAL layer. Thus, when the audio processing application writes the audio data to the first device file, the live broadcast application 1 to n may receive the audio data read from the first device file by the operating system.
[0047] In addition, a second device file may be deployed in the operating system of the live broadcast device 100 (for example, the second device file may be / dev / snd / pcmC0D0p deployed in the / dev directory of the operating system). And wherein, "C0" indicates that the sound card ID is 0, "D0" indicates that the device ID is 0, and "p" indicates that it is used for playback. Therefore, referring to the above, it can be known that the first device file and the second device file correspond to the same virtual sound card.
[0048] In addition, although Figure 3 Not shown, a virtual sound card driver is also deployed at the driver layer, so that the virtual sound card driver can generate a first device file corresponding to the second microphone device of the virtual sound card and a second device file corresponding to the virtual player device of the virtual sound card at the driver layer.
[0049] The operating system can also create a corresponding third device file in the driver layer according to the type of the audio source input interface of the hardware layer. For example, the hardware layer includes an audio codec 111, an HDMI interface 112, and a USB interface 113. For the audio codec 111, regardless of whether the audio codec 111 is connected to the 3.5 microphone 201 and the built-in microphone 115, the operating system will generate a corresponding third device file, and the third device file can be, for example, / dev / snd / pcmC1D0c in the / dev directory of the operating system; for the HDMI interface 112, regardless of whether the HDMI interface 112 is connected to the computer 202, the operating system will generate a corresponding third device file, and the third device file can be, for example, / dev / snd / pcmC2D0c in the / dev directory of the operating system; for the USB interface 113, only when the USB interface 113 is connected to the USB microphone 203, the operating system will generate a corresponding third device file, and the third device file can be, for example, / dev / snd / pcmC3D0c in the / dev directory of the operating system.
[0050] In addition, it is worth noting that in this embodiment, Android is used as an example of an operating system for description, but those skilled in the art should be aware that other types of operating systems are also within the scope of protection of this application.
[0051] In the above operating environment, according to the first aspect of this embodiment, a method for live audio broadcast and audio processing is provided. Figure 2 The processor 110 shown in FIG. Figure 4 A schematic diagram showing the process of the method is shown in FIG. Figure 4 As shown, the method includes:
[0052] S402: Generate push audio for pushing to the live broadcast platform;
[0053] S404: writing the first audio data of the pushed audio into a first device file, wherein the first device file corresponds to a first microphone device associated with the live broadcast application; and
[0054] S406: Using the live broadcast application to read the first audio data from the first device file via the operating system, and transmitting the first audio data to the live broadcast platform, wherein the live broadcast application corresponds to the live broadcast platform.
[0055] Specifically, first, when the host performs audio live broadcast, the host uses the live broadcast device 100 to generate push audio for pushing to the live broadcast platform (S402).
[0056] Further, the live broadcast device 100 writes the generated first audio data of the push audio to the first device file deployed in the operating system (S404). As described above, the first device file can be / dev / snd / pcmC0D0c deployed in the / dev directory of the operating system. Thus, the live broadcast device 100 writes the generated first audio data of the push audio into the device file. In addition, referring to the above, in this embodiment, the corresponding function can be used in the HAL layer in advance to specify the first device file as the device file corresponding to the first microphone device associated with the live broadcast application 1~n. Specifically, in this embodiment, the live broadcast application (for example, the vibrato application and the fast hand application, etc.) is a live broadcast application developed by a third party based on a tablet device such as a mobile phone, and the live broadcast application obtains audio data from the microphone of the tablet device by default. Therefore, in this embodiment, the first microphone device corresponds to the default microphone of the live broadcast application. Further in this embodiment, the corresponding function can be used in advance in the HAL layer to specify the first device file as the device file corresponding to the microphone of the tablet device, so that the live broadcast application can read audio data from the first device file through the operating system. The above content will be described in detail later, so it will not be repeated here.
[0057] Finally, the live broadcast application reads the first audio data from the first device file via the operating system, and transmits the first audio data to the live broadcast platform (S406). Referring to the above, since the first device file in this embodiment corresponds to the first microphone device associated with the live broadcast application, the live broadcast application can obtain the first audio data corresponding to the pushed audio from the first device file via the operating system, and send the first audio data as the pushed audio to the live broadcast platform.
[0058] Based on the content described in the background technology, it can be known that existing live broadcast applications (for example, vibrato applications and Kuaishou applications, etc.) are all developed based on tablet devices such as mobile phones, and the live broadcast application obtains audio data from the microphone of the tablet device by default. For example, when the anchor needs to broadcast audio live, the live broadcast application responds to the click operation of the live broadcast personnel and sends a request to the operating system in the tablet device to obtain audio from the microphone. Then, the operating system responds to the request and reads the audio data collected by the microphone from the device file corresponding to the microphone. After that, the operating system sends the read audio data to the live broadcast application, so that the live broadcast application can generate push audio based on the audio data collected by the microphone, and transmit the push audio to the broadcast platform.
[0059] Since existing live broadcast applications are all developed based on tablet devices, that is, the live broadcast applications obtain audio data from the microphone of the tablet device by default, even if a live broadcast application corresponding to the live broadcast platform (for example, the Douyin application and the Kuaishou application, etc.) is installed in the live broadcast device, the live broadcast application cannot push the push audio generated by the live broadcast device to the live broadcast platform desired by the anchor.
[0060] Therefore, in order to solve the above problem, the present embodiment deploys a first device file in the operating system of the live broadcast device. The first device file corresponds to the first microphone device associated with the live broadcast application. Among them, the first microphone device can be, for example, the microphone device used by the live broadcast application by default (for example, the first microphone device corresponds to the microphone of the tablet device). Thus, the live broadcast application can obtain the first audio data corresponding to the pushed audio from the first device file through the operating system, and send the first audio data as the pushed audio to the live broadcast platform.
[0061] Based on the above description, it can be seen that since the first device file corresponds to the first microphone device associated with the live broadcast application, no matter what the circumstances, as long as the operating system receives a request sent by the live broadcast application to obtain audio data from the first microphone device, the operating system will read the corresponding audio data from the pre-deployed first device file.
[0062] Thus, during the live broadcast process, the live broadcast device can, for example, write the first audio data of the push audio into the first device file. The live broadcast application can obtain the first audio data corresponding to the push audio from the first device file through the operating system, and send the first audio data as the push audio to the live broadcast platform. Then the anchor can send the push audio generated by the live broadcast device to the corresponding live broadcast platform through the desired live broadcast application, and the audience user can watch the live broadcast audio corresponding to the push audio from the corresponding live broadcast platform through the terminal device.
[0063] Thus, the technical effect of ensuring that the anchor can use the live broadcast device to broadcast live on the desired live broadcast platform is achieved, thereby solving the technical problem in the prior art that the anchor cannot send the push audio generated by the live broadcast device to the corresponding live broadcast platform through the desired live broadcast application.
[0064] Optionally, the first device file also corresponds to a second microphone device of a virtual sound card deployed on the live broadcast device, the second microphone device is a virtual microphone device, and the operation of writing the first audio data of the pushed audio into the first device file includes: writing the pushed audio into the second device file, wherein the second device file corresponds to the virtual player device of the virtual sound card; and calling the pushed audio from the second device file using the virtual sound card, and writing the pushed audio into the first device file.
[0065] Specifically, since the device file for recording and the device file for playing are actually two different device files, the same device file cannot be used for both playing and recording. Therefore, in this embodiment, the driver layer of the operating system is deployed with a virtual sound card driver, which can generate a first device file corresponding to the virtual microphone device and a second device file corresponding to the virtual player device. For example, the first device file can be / dev / snd / pcmC0D0c deployed in the / dev directory of the operating system. And wherein, "C0" indicates that the sound card ID is 0, "D0" indicates that the device ID is 0, and "c" indicates that it is used for recording. For another example, the second device file can be / dev / snd / pcmC0D0p deployed in the / dev directory of the operating system. And wherein, "C0" indicates that the sound card ID is 0, "D0" indicates that the device ID is 0, and "p" indicates that it is used for playing.
[0066] With reference to the above content, it can be known that the first device file and the second device file actually correspond to the same virtual sound card and are device files used for "recording" and "playing" respectively.
[0067] Thus, for example, a specific function can be used at the HAL layer to specify the first device file as the device file corresponding to the microphone of the tablet device, so that when the audio processing application writes the first audio data of the pushed audio into the second device file, the virtual sound card application calls the first audio data from the second device file and writes the first audio data into the first device file. Thus, when the operating system receives a request sent by the live broadcast application to obtain audio data from the first microphone device, the operating system reads the first audio data from the first device file and sends the first audio data to the corresponding live broadcast application.
[0068] Since the device file for recording and the device file for playing are actually two different device files, the same device file cannot be used for both playing and recording. Therefore, in this embodiment, two first device files for recording and a second device file for playing corresponding to the same virtual sound card are set in the driver layer. Thus, when the audio processing application writes the first audio data into the second device file, the operating system can read the first audio data from the first device file corresponding to the second device file, and send the first audio data to the live broadcast application associated with the live broadcast platform, thereby achieving the technical effect of ensuring that the anchor can use the live broadcast device to perform audio live broadcast normally.
[0069] Optionally, the operation of reading the first audio data from the first device file via the operating system using the live broadcast application includes: using the live broadcast application to send a request to the operating system to obtain data from the first microphone device; and using the live broadcast application to receive from the operating system the first audio data read by the operating system from the first device file.
[0070] Specifically, refer to Figure 3 As shown, for example, when the anchor uses the live broadcast device 100 to broadcast live via the live broadcast platform corresponding to the live broadcast applications 1-n, the live broadcast applications 1-n on the live broadcast device 100 respectively send requests to the operating system to obtain audio data from their respective associated first microphone devices (e.g., microphones of tablet devices). Then, in response to the data acquisition requests sent by the live broadcast applications 1-n, the operating system reads the first audio data from the first device file and sends the read first audio data to the live broadcast applications 1-n respectively.
[0071] Therefore, in the technical solution of the present application, the live broadcast device can be used to push the push audio to the corresponding live broadcast platform through any live broadcast application supported by the operating system. Therefore, for the anchor personnel, they only need to install the desired live broadcast application in the operating system of the live broadcast device, and then use the live broadcast device to broadcast on the live broadcast platform corresponding to the live broadcast application, which is convenient for the anchor personnel to use.
[0072] Optionally, the operation of generating push audio for pushing to the live broadcast platform includes: obtaining second audio data from at least one audio source, wherein at least one audio source includes a third microphone device different from the first microphone device and the second microphone device; and generating push audio based on the second audio data using an audio processing application.
[0073] Specifically, refer to Figure 3As shown, first, the audio processing application obtains second audio data from at least one audio source. The at least one audio source includes a third microphone device that is different from the first microphone device and the second microphone device associated with the live broadcast application. Furthermore, the second audio data can be, for example, audio data obtained by the live broadcast device 100 from the at least one audio source and not yet further processed by the audio processing application.
[0074] The at least one audio source mentioned above can be, for example, an external microphone of the live broadcast device 100, an external computer or a built-in microphone, audio locally stored in the live broadcast device 100, or network audio accessed by the live broadcast device 100 through a link address, etc. In short, the at least one audio source mentioned above is a different audio source relative to the first microphone device associated with the live broadcast application and the second microphone device of the virtual sound card, and no specific limitation is made here.
[0075] Thereafter, when the audio processing application obtains second audio data from at least one audio source, a push audio for pushing to the live broadcast platform is generated based on the second audio data.
[0076] Unlike existing anchors who can only generate push audio using live broadcast applications installed on mobile phones, tablets or computers, in the technical solution of the present application, at least one audio source including a mobile phone, tablet computer or computer can be connected to the live broadcast device, so that the audio processing application can receive the second audio data transmitted by at least one audio source and generate push audio based on the second audio data.
[0077] Therefore, in the technical solution of the present application, the push audio used to push to the live broadcast platform contains richer audio information compared to the push audio directly generated by the live broadcast application installed on the mobile phone, tablet computer or computer, thereby achieving the technical effect of attracting audience users to listen to the live broadcast.
[0078] Optionally, the operation of acquiring the second audio data from the at least one audio source includes: using the operating system to read the second audio data from a third device file corresponding to the third microphone device.
[0079] Specifically, refer to Figure 3 As shown, first, the operating system automatically creates a corresponding third device file at the driver layer according to the type of the audio source input interface at the hardware layer, and writes the second audio data into the corresponding third device file.
[0080] Wherein, when the audio source input interface is an audio codec and / or an HDMI interface, the operating system will pre-generate a corresponding third device file regardless of whether the audio codec and / or the HDMI interface is connected to a corresponding audio source. And when the audio codec and / or the HDMI interface is connected to a corresponding audio source, the operating system directly writes the received second audio data into the corresponding third device file.
[0081] For example, when the audio source input interface is the audio codec 111, and the audio codec 111 in the live broadcast device 100 is connected 305 to the microphone 201 and / or the built-in microphone 115, the operating system directly writes the received second audio data into the corresponding third device file 1.
[0082] For another example, when the audio source input interface is the HDMI interface 112, and the HDMI interface 112 of the live broadcast device 100 is connected to the computer 202, the operating system directly writes the received second audio data into the corresponding third device file 2.
[0083] And wherein, when the audio source input interface is the USB interface 113, the operating system dynamically generates the third device file 3. That is, when the USB interface 113 is connected to the USB microphone 203, the operating system generates the corresponding third device file 3; when the USB interface 113 is not connected to the USB microphone 203, the operating system does not generate the corresponding third device file 3.
[0084] In addition, it is worth noting that when the second audio data corresponding to the mobile phone 204 is received in the live broadcast device 100 through the network communication circuit 114, the operating system directly writes the second audio data into the memory without generating a third device file.
[0085] If the live broadcast device 100 has no external audio source, and the second audio data transmitted to the audio processing application is the audio locally stored in the live broadcast device 100 or the audio accessed by the live broadcast device 100 through the link address, the operating system does not need to deploy the third device file in the driver layer. The operating system directly sends the second audio data of the locally stored audio or the second audio data of the network audio accessed through the link address to the audio processing application in the application layer.
[0086] It is worth noting that there can be one or more third device files.
[0087] For example, when there is an audio codec 111 or an HDMI interface 112 in the live broadcast device 100, the operating system pregenerates a corresponding third device file 1 or a third device file 2. Then, the operating system writes the second audio data received through the audio codec 111 or the HDMI interface 112 into the corresponding third device file 1 or the third device file 2.
[0088] For another example, when there is both an audio codec 111 and / or an HDMI interface 112 and a USB interface 113 in the live broadcast device 100, the operating system pre-generates a third device file 1 and / or a third device file 2 corresponding to the audio codec 111 and / or the HDMI interface 112. Then, when the audio codec 111 is connected to the 3.5 microphone 201 and / or the HDMI interface 112 is connected to the computer 202, the operating system writes the corresponding second audio data into the pre-generated third device file 1 and / or the third device file 2. When the USB interface 113 is connected to the USB microphone 203, the operating system dynamically generates a corresponding third device file 3, and writes the second audio data received through the USB interface 113 into the corresponding third device file 3.
[0089] The operating system then reads the second audio data from the third device file corresponding to the third microphone device, and sends the second audio data to the audio processing application, thereby performing mixing and / or fusion processing on the second audio data through the audio processing application to generate push audio for pushing to the live broadcast platform.
[0090] In the technical solution of the present application, since a third device file is deployed in the driver layer, the operating system can write the second audio data of at least one audio source external to the live broadcast device into the third device file, so that the operating system can read the second audio data from the third device file and send the second audio data to the audio processing application. Therefore, when the anchor needs to use an external audio source for live broadcast, it can ensure that the audio processing application obtains the second audio data of the external audio source, thereby ensuring that the anchor can perform live broadcast normally.
[0091] Optionally, before generating the push audio for pushing to the live broadcast platform, it also includes: using a virtual sound card driver to deploy a first device file and a second device file associated with the first device file in the operating system; and associating the first device file with the first microphone device in the operating system.
[0092] Specifically, refer to Figure 3As shown, before the audio processing application generates the push audio for pushing to the live broadcast platform, a virtual sound card driver is deployed at the driver layer of the operating system (specifically, the virtual sound card driver is deployed at the driver layer).
[0093] Then, the virtual sound card driver generates a first device file and a second device file. The first device file is a device file for reading the first audio data, and the second device file is a device file for writing the first audio data. Thus, the first device file can be designated as the device file corresponding to the first microphone device associated with the live broadcast application by using the corresponding function at the HAL layer.
[0094] Therefore, in the technical solution of the present application, when the live broadcast application sends a request to the operating system to obtain data from the first microphone device, the operating system reads the first audio data in the first device file and sends the first audio data to the live broadcast application. Therefore, for the anchor, only the live broadcast instruction is sent to the live broadcast device 100 through the live broadcast application to perform live broadcast, thereby achieving the technical effect of facilitating the anchor to use the live broadcast device for live broadcast.
[0095] Therefore, according to the first aspect of this embodiment, the technical effect of ensuring that the anchor can use the desired live broadcast platform for audio live broadcast is achieved.
[0096] Thus, during the live broadcast process, the live broadcast device 100 obtains the second audio data from the external microphone device, and uses the operating system to write the second audio data into the third device file. Then, the operating system reads the second audio data from the third device file and sends the second audio data to the audio processing application. After that, the audio processing application generates a push audio based on the second audio data, and writes the first audio data of the push audio into the second device file. At the same time, the operating system writes the first audio data in the second device file into the first device file. Further, the live broadcast application sends a request to the operating system to obtain audio data from the first microphone device associated with each other. Then, in response to the request, the operating system reads the first audio data from the first device file and sends the first audio data to the live broadcast application. Finally, the live broadcast application sends the first audio data of the push audio to the corresponding live broadcast platform.
[0097] In addition, according to a second aspect of this embodiment, an audio processing method is provided, the method comprising: Figure 2 The processor 110 shown in FIG. Figure 5 A schematic diagram showing the process of the method is shown in FIG. Figure 5 As shown, the method includes:
[0098] S502: Generate push audio for pushing to the live broadcast platform; and
[0099] S504: Writing the first audio data of the pushed audio into a first device file configured by the operating system, wherein the first device file corresponds to a first microphone device associated with the live broadcast application, and the live broadcast application corresponds to the live broadcast platform.
[0100] It is worth noting that, as described in the first aspect of the embodiment of the present application, the live broadcast device 100 may be pre-installed with a live broadcast application, so that the operating system can send the first audio data read from the first device file to the pre-installed live broadcast application, and the live broadcast application transmits the first audio data to the live broadcast platform. It is also possible that, as described in the second aspect of the embodiment of the present application, the live broadcast device 100 does not have a live broadcast application pre-installed, and the live broadcast application is downloaded during the audio live broadcast. For example, the live broadcast application may be downloaded after the live broadcast device 100 is connected to an external audio source; or the live broadcast application may be downloaded after the live broadcast device 100 calls the audio stored locally or accesses the network audio through a link address. No specific limitation is made here.
[0101] Therefore, according to the second aspect of this embodiment, the technical effect of ensuring that the anchor can use the desired live broadcast platform for audio live broadcast is achieved.
[0102] In addition, reference Figure 1 As shown, according to the third aspect of this embodiment, a storage medium is provided, wherein the storage medium includes a stored program, wherein when the program is run, a processor executes any one of the above methods.
[0103] Therefore, according to this embodiment, the technical effect of ensuring that the anchor can use the desired live broadcast platform for audio live broadcast is achieved.
[0104] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0105] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0106] Example 2
[0107] Figure 6 The audio live broadcast device 600 according to the first aspect of this embodiment is shown, and the device 600 corresponds to the method according to the first aspect of embodiment 1. Figure 6 As shown, the device 600 includes: a first push audio generation module 610, used to generate push audio for pushing to a live broadcast platform; a first push audio writing module 620, used to write the first audio data of the push audio into a first device file, wherein the first device file corresponds to a first microphone device associated with a live broadcast application; and a first audio data reading module 630, used to read the first audio data from the first device file via the operating system using the live broadcast application, and transmit the first audio data to the live broadcast platform, wherein the live broadcast application corresponds to the live broadcast platform.
[0108] Optionally, the first device file also corresponds to a second microphone device of a virtual sound card deployed on the live broadcast device, the second microphone device is a virtual microphone device, and the first push audio write module 620 includes: a first push audio write submodule, used to write the push audio to the second device file, wherein the second device file corresponds to the virtual player device of the virtual sound card; and a second push audio write submodule, used to call the push audio from the second device file using the virtual sound card, and write the push audio to the first device file.
[0109] Optionally, the first audio data reading module 630 includes: a data request module, used to use the live broadcast application to send a request to the operating system to obtain data from the first microphone device; and a data receiving module, used to use the live broadcast application to receive the first audio data read by the operating system from the first device file from the operating system.
[0110] Optionally, the first push audio generation module 610 includes: a data acquisition module, used to acquire second audio data from at least one audio source, wherein at least one audio source includes a third microphone device different from the first microphone device and the second microphone device; and a first push audio generation submodule, used to generate push audio based on the second audio data using an audio processing application.
[0111] Optionally, the data acquisition module includes: a second audio data reading module, configured to read second audio data from a third device file corresponding to a third microphone device using an operating system.
[0112] Optionally, before generating push audio for pushing to the live broadcast platform, the device 600 also includes: a device file deployment module, which is used to deploy a first device file and a second device file associated with the first device file in the operating system using a virtual sound card driver; and a device file association module, which is used to associate the second device file with the first microphone device in the operating system.
[0113] also, Figure 7 FIG. 7 shows an audio processing device 700 according to the second aspect of this embodiment, and the device 700 corresponds to the method according to the second aspect of embodiment 1. Figure 7 As shown, the device 700 includes: a second push audio generation module 710, used to generate push audio for pushing to the live broadcast platform; and a second push audio writing module 720, used to write the first audio data of the push audio into a first device file configured by the operating system, wherein the first device file corresponds to the first microphone device associated with the live broadcast application, and the live broadcast application corresponds to the live broadcast platform.
[0114] Therefore, according to this embodiment, the technical effect of ensuring that the anchor can use the desired live broadcast platform for audio live broadcast is achieved.
[0115] Example 3
[0116] Figure 8 The audio live broadcast device 800 according to the first aspect of this embodiment is shown, and the device 800 corresponds to the method according to the first aspect of embodiment 1. Figure 8 As shown, the device 800 includes: generating push audio for pushing to a live broadcast platform; writing the first audio data of the push audio into a first device file, wherein the first device file corresponds to a first microphone device associated with a live broadcast application; and using the live broadcast application to read the first audio data from the first device file via the operating system, and transmitting the first audio data to the live broadcast platform, wherein the live broadcast application corresponds to the live broadcast platform.
[0117] Optionally, the first device file also corresponds to a second microphone device of a virtual sound card deployed on the live broadcast device, the second microphone device is a virtual microphone device, and the operation of writing the first audio data of the pushed audio into the first device file includes: writing the pushed audio into the second device file, wherein the second device file corresponds to the virtual player device of the virtual sound card; and calling the pushed audio from the second device file using the virtual sound card, and writing the pushed audio into the first device file.
[0118] Optionally, the operation of reading the first audio data from the first device file via the operating system using the live broadcast application includes: using the live broadcast application to send a request to the operating system to obtain data from the first microphone device; and using the live broadcast application to receive from the operating system the first audio data read by the operating system from the first device file.
[0119] Optionally, the operation of generating push audio for pushing to the live broadcast platform includes: obtaining second audio data from at least one audio source, wherein at least one audio source includes a third microphone device different from the first microphone device and the second microphone device; and generating push audio based on the second audio data using an audio processing application.
[0120] Optionally, the operation of acquiring the second audio data from the at least one audio source includes: using the operating system to read the second audio data from a third device file corresponding to the third microphone device.
[0121] Optionally, before generating the push audio for pushing to the live broadcast platform, it also includes: using a virtual sound card driver to deploy a first device file and a second device file associated with the first device file in the operating system; and associating the second device file with the first microphone device in the operating system.
[0122] also, Fig. 9 An audio processing device 900 according to the second aspect of this embodiment is shown, and the device 900 corresponds to the method according to the second aspect of embodiment 1. Fig. 9 As shown, the device 900 includes: generating push audio for pushing to a live broadcast platform; and writing the first audio data of the push audio into a first device file configured by an operating system, wherein the first device file corresponds to a first microphone device associated with a live broadcast application, and the live broadcast application corresponds to the live broadcast platform.
[0123] Therefore, according to this embodiment, the technical effect of ensuring that the anchor can use the desired live broadcast platform for audio live broadcast is achieved.
[0124] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0125] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0126] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0127] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0128] In addition, each functional unit in each embodiment of the present invention 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-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0129] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0130] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. An audio live broadcast method, used for a live broadcast device, characterized in that: include: Generate push audio for pushing to the live broadcast platform; Writing the first audio data of the pushed audio into a first device file, wherein the first device file corresponds to a first microphone device associated with the live broadcast application; as well as The live broadcast application is used to read the first audio data from the first device file via the operating system, and the first audio data is transmitted to the live broadcast platform, wherein the live broadcast application corresponds to the live broadcast platform.
2. The method according to claim 1, characterized in that The first device file also corresponds to a second microphone device of a virtual sound card deployed in the live broadcast device, the second microphone device is a virtual microphone device, and the operation of writing the first audio data of the pushed audio into the first device file includes: Writing the pushed audio into a second device file, wherein the second device file corresponds to a virtual player device of the virtual sound card; and The pushed audio is called from the second device file using the virtual sound card, and the pushed audio is written into the first device file.
3. The method according to claim 2, characterized in that The operation of using the live broadcast application to read the first audio data from the first device file via the operating system includes: Using the live broadcast application to send a request to the operating system to obtain data from the first microphone device; and The first audio data read from the first device file by the operating system is received from the operating system using the live broadcast application.
4. The method according to claim 3, characterized in that Generates the operation of pushing audio to the live broadcast platform, including: acquiring second audio data from at least one audio source, wherein the at least one audio source comprises a third microphone device different from the first microphone device and the second microphone device; and Based on the second audio data, the push audio is generated using an audio processing application.
5. The method according to claim 1 or 4, characterized in that: The operation of obtaining second audio data from at least one audio source includes: The operating system is used to read second audio data from a third device file corresponding to the third microphone device.
6. The method according to claim 1, characterized in that Before generating the push audio for pushing to the live broadcast platform, it also includes: Deploying the first device file and a second device file associated with the first device file in the operating system using a virtual sound card driver; and The second device file is associated with the first microphone device in the operating system.
7. An audio processing method for a live broadcast device, characterized in that: include: Generate push audio for pushing to the live broadcast platform; as well as The first audio data of the pushed audio is written into a first device file configured by the operating system, wherein the first device file corresponds to a first microphone device associated with a live broadcast application, and the live broadcast application corresponds to the live broadcast platform.
8. A storage medium, characterized in that: The storage medium includes a stored program, wherein when the program is run, the processor executes the method according to any one of claims 1 to 7.
9. An audio live broadcast device, characterized in that: include: A first push audio generation module, used to generate push audio for pushing to the live broadcast platform; A first push audio writing module, used for writing the first audio data of the push audio into a first device file, wherein the first device file corresponds to a first microphone device associated with the live broadcast application; as well as The first audio data reading module is used to use the live broadcast application to read the first audio data from the first device file via the operating system, and transmit the first audio data to the live broadcast platform, wherein the live broadcast application corresponds to the live broadcast platform.
10. An audio live broadcast device, characterized in that: include: a first processor; as well as A first memory is connected to the first processor and is used to provide the first processor with instructions for processing the following processing steps: Generate push audio for pushing to the live broadcast platform; Writing the first audio data of the pushed audio into a first device file, wherein the first device file corresponds to a first microphone device associated with the live broadcast application; as well as The live broadcast application is used to read the first audio data from the first device file via the operating system, and the first audio data is transmitted to the live broadcast platform, wherein the live broadcast application corresponds to the live broadcast platform.