Method and apparatus for transmitting audio
By identifying the device type of the target microphone in a large conference room and transmitting audio through the channel of the protocol controller, the problem of inconsistent audio acquisition and playback time among multiple microphone devices was solved, achieving synchronous audio transmission and playback and reducing duplication and echo phenomena.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-29
- Publication Date
- 2026-04-10
AI Technical Summary
In large conference rooms, the asynchronous audio acquisition and playback processing of multiple microphones leads to problems such as duplicate sounds, echoes, and feedback, and existing technologies lack effective solutions.
By determining the device type of the target microphone among N+1 microphones and identifying the target channel among the N+1 channels of the protocol controller, synchronous audio transmission is achieved. The audio acquisition and playback of each microphone are transmitted separately using multiple channels in the protocol controller.
It achieves time synchronization between audio acquisition and playback, solves the problem of inconsistent audio processing time in multiple microphone devices, and reduces duplication and echo phenomena.
Smart Images

Figure CN116320858B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the field of communication, and in particular, to a method and apparatus for transmitting audio. BACKGROUND
[0002] In the field of video conference, microphones (desktop or ceiling) are often used for voice collection and playing (built-in speaker). Generally, the collection and playing radius of the microphone is about 5 meters, but if in a large conference room (more than 30 square meters), the collection and playing distance of a single microphone is not enough to support the conference effect. In this case, multiple microphones are needed for the arrangement of the conference room. Because multiple microphones use more cables, large mixing console equipment may be needed to increase the cost, and the sound collection and playing processing time is not synchronous, which leads to problems such as heavy sound or echo and howling cannot be solved.
[0003] At present, there is no effective solution to the above problems. SUMMARY
[0004] Embodiments of the present application provide a method and apparatus for transmitting audio, to at least solve the problem of non-synchronous processing time of audio collection and playing in the related art.
[0005] According to an embodiment of the present application, a method for transmitting audio is provided, comprising: determining a device type of a target microphone in N+1 microphones, wherein N is greater than or equal to 0; determining a target channel in N+1 channels of a protocol controller according to the device type, wherein each microphone in the N+1 microphones comprises the protocol controller, each channel in the N+1 channels corresponds to one microphone in the N+1 microphones, and each channel is used for transmitting audio collected and played by the corresponding microphone; and transmitting target audio collected and played by the target microphone through the target channel.
[0006] In an exemplary embodiment, determining the device type of the target microphone in the N+1 microphones comprises: determining a first device type of the target microphone according to detection signals of an upstream interface and a downstream interface of the target microphone; and determining a second device type of the target microphone according to a state of a master-slave selection button of the target microphone; wherein the device type comprises the first device type and the second device type.
[0007] In an example embodiment, the determining the first device type of the target microphone according to the detection signals of the upstream interface and the downstream interface of the target microphone comprises: determining the target microphone as a single microphone when the detection signals of the upstream interface and the downstream interface are both high; determining the target microphone as an intermediate cascade microphone when the detection signals of the upstream interface and the downstream interface are both low; determining the target microphone as a last stage microphone when the upstream interface is low and the downstream interface is high; and determining the target microphone as a first stage microphone when the upstream interface is high and the downstream interface is low.
[0008] In an example embodiment, the determining the second device type of the target microphone according to the state of the master-slave selection button of the target microphone comprises: determining the target microphone as a master microphone when the master-slave selection button of the target microphone is in an open state; and determining the target microphone as a non-master microphone when the master-slave selection button of the target microphone is in a closed state.
[0009] In an example embodiment, the determining the target channel according to the device type in the N+1 channels of the protocol controller comprises: determining a first channel in the N+1 channels as the target channel when the target microphone is a master microphone; and determining an Mth channel in the N+1 channels as the target channel when the target microphone is a non-master microphone, wherein the M is greater than 1 and less than or equal to N+1, and the Mth channel is a channel without assigned microphone in the N+1 channels.
[0010] In an example embodiment, the method further comprises: assigning a first device number to the target microphone and sequentially assigning device numbers to other microphones in the N+1 microphones in order when the target microphone is a master microphone, wherein the first device number corresponds to the first channel; and applying an Mth device number to a master microphone in the N+1 microphones when the target microphone is a non-master microphone, wherein the Mth device number corresponds to the Mth channel.
[0011] In an example embodiment, in a case that the target microphone is a primary microphone, the other microphones in the N+1 microphones are sequentially assigned with device numbers, including: in a case that the target microphone is a first-level microphone, the lower-level microphones of the target microphone in the N+1 microphones are sequentially assigned with device numbers; in a case that the target microphone is a last-level microphone, the upper-level microphone of the target microphone in the N+1 microphones is sequentially assigned with a device number; in a case that the target microphone is an intermediate-level microphone, the upper-level microphone and the lower-level microphone of the target microphone in the N+1 microphones are sequentially assigned with device numbers.
[0012] In an example embodiment, the method further includes: in a case that the target microphone is a primary microphone, sending a synchronization clock signal by the target microphone to the other microphones in the N+1 microphones; in a case that the target microphone is a non-primary microphone, receiving the synchronization clock signal by the target microphone.
[0013] According to another embodiment of the present application, there is provided an apparatus for transmitting audio, comprising: a first determining module configured to determine a device type of a target microphone in N+1 microphones, wherein N is greater than or equal to 0; a second determining module configured to determine a target channel in N+1 channels of a protocol controller according to the device type, wherein each of the N+1 microphones comprises the protocol controller, each of the N+1 channels corresponds to one of the N+1 microphones, and each of the channels is configured to transmit audio collected and played by the corresponding microphone; and a transmitting module configured to transmit target audio collected and played by the target microphone through the target channel.
[0014] According to yet another embodiment of the present application, there is also provided a computer readable storage medium having a computer program stored therein, wherein the computer program, when executed by a processor, implements the steps of the method described in any of the above embodiments.
[0015] According to yet another embodiment of the present application, there is also provided an electronic device comprising a memory and a processor, wherein the memory has a computer program stored therein, and the processor is configured to run the computer program to perform the steps of any of the above method embodiments.
[0016] Through the application, since each microphone in the N+1 microphones comprises a protocol controller, N+1 channels are included in the protocol controller, each channel in the N+1 channels corresponds to one microphone, and each channel is used to transmit the audio collected and played by the corresponding microphone. In this way, the N+1 microphone devices can simultaneously collect and play the audio collected and played by the target microphone, achieving the effect of time synchronization of audio collection and playing. Therefore, the problem of non-synchronization of audio collection and playing processing time can be solved. BRIEF DESCRIPTION OF DRAWINGS
[0017] Figure 1 is a hardware structure block diagram of a mobile terminal of a method for transmitting audio according to an embodiment of the application;
[0018] Figure 2 is a flowchart of a method for transmitting audio according to an embodiment of the application;
[0019] Figure 3 is a structural schematic diagram of a microphone speaker device according to an embodiment of the application;
[0020] Figure 4 is a channel schematic diagram of a microphone speaker device according to an embodiment of the application;
[0021] Figure 5 is an application scenario schematic diagram according to an embodiment of the application;
[0022] Figure 6 is another application scenario schematic diagram according to an embodiment of the application;
[0023] Figure 7 is a microphone cascade connection and detection signal schematic diagram according to an embodiment of the application;
[0024] Figure 8 is a working level logic schematic diagram according to an embodiment of the application;
[0025] Figure 9 is a specific implementation flowchart schematic diagram according to an embodiment of the application;
[0026] Figure 10 is a structural block diagram of an apparatus for transmitting audio according to an embodiment of the application. DETAILED DESCRIPTION
[0027] Hereinafter, embodiments of the application will be described in detail with reference to the accompanying drawings and in conjunction with embodiments.
[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily describe a specific order or sequence.
[0029] The methods and embodiments provided in this application can be executed on a mobile terminal, computer terminal, or similar computing device. Taking running on a mobile terminal as an example, Figure 1 This is a hardware structure block diagram of a mobile terminal for a method of transmitting audio according to an embodiment of the present invention. Figure 1 As shown, a mobile terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The mobile terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the mobile terminal described above. For example, the mobile terminal may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0030] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the audio transmission method in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0031] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the mobile terminal's communication provider. In one example, the transmission device 106 includes a network adapter (N+1 IC) that can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a radio frequency (RF) module used for wireless communication with the Internet.
[0032] This embodiment provides a method for transmitting audio on the aforementioned mobile terminal. Figure 2 This is a flowchart of a method for transmitting audio according to an embodiment of the present invention, such as...Figure 2 As shown, the flow includes the following steps:
[0033] Step S202, determining the device type of a target microphone in N+1 microphones, where N is greater than or equal to 0;
[0034] Step S204, determining a target channel in N+1 channels of a protocol controller according to the device type, where each of the N+1 microphones includes the protocol controller, each of the N+1 channels corresponds to one of the N+1 microphones, and each of the channels is used to transmit audio collected and played by the corresponding microphone.
[0035] Step S206, transmitting target audio collected and played by the target microphone through the target channel.
[0036] Optionally, the execution subject of the above steps can be a background processor or other device with similar processing capability, and can also be a machine integrated with at least an image acquisition device and a data processing device, where the image acquisition device can include a camera and other graphic acquisition modules, and the data processing device can include a computer, a mobile phone and other terminals, but is not limited thereto.
[0037] Through the above steps, since each of the N+1 microphones includes a protocol controller, the protocol controller includes N+1 channels, each of the N+1 channels corresponds to one microphone, and each channel is used to transmit audio collected and played by the corresponding microphone. In this way, the N+1 microphone devices can simultaneously collect and play the audio collected and played by the target microphone, achieving the effect of synchronization of audio collection and playback time. Therefore, the problem of non-synchronization of audio collection and playback processing time can be solved.
[0038] As an optional embodiment, as shown in Figure 3 The structure of the microphone speaker device is shown in the schematic diagram. Multiple microphones can be cascaded together through twisted pair wires. The entire scheme is transmitted through twisted pair wires, and is not limited to the form of wires. Double twisted wires, network cables or USB type C cables can be selected according to the signal form.
[0039] Each microphone device in the N+1 microphone devices is the same, including a protocol transmission controller and an audio processing controller. The protocol transmission controller completes A / D and D / A conversion of audio data and transmission of audio and control with the audio processing controller DSP; A / D and D / A are only used for data conversion and do not perform encoding processing, to ensure real-time and low-latency of raw data transmission. At the same time, the protocol transmission controller includes a control data segment, which can be used to control clock synchronization and device number allocation of other microphones as a master microphone.
[0040] The protocol controller can be designed to contain N+1 channels (CH), each corresponding to a microphone device. Therefore, one protocol controller can contain N+1 microphone devices, that is, audio acquisition and playback data of all devices, that is, audio data of all devices is visible to other microphone devices.
[0041] As shown in Figure 4 , each channel contains the device number of the microphone, the sound acquisition data segment, and the sound playback data segment. The device number of the microphone is used to distinguish different microphone devices and can be assigned by the master microphone. The audio acquisition data segment is the optimized data after the microphone device is collected and processed by the 3A algorithm of the audio processing controller DSP. Similarly, the audio playback data segment is the playback data obtained from the CH to control the loudspeaker to play by the audio processing controller DSP. Each channel can be designed according to the I2S or PCM audio format standard.
[0042] The protocol controller and the audio processing controller DSP transmit multi-channel audio data through the TDM channel, transmit some control signals (such as microphone beam positioning data) through the USB, or select to encode multi-channel audio data and transmit through the UAC protocol.
[0043] The audio processing controller can perform UAC audio data transmission, microphone array audio data acquisition, loudspeaker audio data playback, and master-slave microphone selection through the USB interface to the computer (PC). Among them, only one master microphone provides the synchronization clock of the entire system in the entire system, and each device can apply for a device number and obtain a synchronization clock from the master microphone. The synchronization clock is used to synchronize the DSP audio acquisition and playback clock of each device, which is convenient for audio 3A algorithm. The master microphone design logic is that the first time a button is pressed in the entire system, the device of the master microphone will always be the master microphone. If this microphone is disconnected, the right side of the loop logic will continue to find which microphone has pressed the master microphone button. When multiple microphones press the master microphone button at the same time, the microphone that first presses the button is determined as the master microphone.
[0044] When one of the microphone devices performs microphone acquisition and loudspeaker playback, the microphones of other devices may also collect the same sound and play the same data. The audio data of other devices can be obtained to perform audio 3A algorithm, local voice enhancement, and effect improvement.
[0045] The microphone can be designed separately as a desktop microphone loudspeaker, or this technical solution can be designed in a terminal device, such as Figure 5The application scenario shown can realize microphone cascading, data operability between cascaded microphones (audio data can be acquired and processed), support for multiple PC access to each microphone for voice communication and playback, microphone twisted-pair low-coding low-delay synchronous transmission, and the audio processor can implement 3A algorithm for voice and other algorithms such as beamforming and deep learning. Figure 6 The application scenario shown designs one of the microphones in the terminal device, has all the advantages of the first application scenario, is compatible with audio acquisition and playback of the terminal device, has increased complexity, and enables the terminal device to have an audio cascading function. The transmission of the twisted-pair signal is a loop, and the first and last ends need to be connected.
[0046] In one example embodiment, determining the device type of a target microphone in N+1 microphones includes: determining a first device type of the target microphone according to detection signals of upstream and downstream interfaces of the target microphone; and determining a second device type of the target microphone according to a state of a master-slave selection button of the target microphone; wherein the device type includes the first device type and the second device type.
[0047] Since this scheme needs to distinguish between upstream and downstream cascading interfaces, the microphone devices in the application scenario are divided into four device types: first-level microphone devices that only use downstream interfaces, last-level microphone devices that only use upstream interfaces, microphone devices that use both upstream and downstream interfaces, and microphone devices that do not use both upstream and downstream interfaces. Therefore, detection signals need to be inserted in the upstream and downstream interfaces, as shown in Figure 7 The detection signal inserted in the upstream interface is UP_PLUG_DET, and the detection signal inserted in the downstream interface is DOWN_PLUG_DET, and the level logic of their work is as shown in Figure 8 By default, DOWN_PLUG_DET” and “UP_PLUG_DET” are not inserted and are high, and when an interface is inserted, they are detected as low. The “upper TX” of the upstream interface is always connected to the “lower RX” of the downstream interface. Signal detection can be detected by an audio processing controller DSP, and the TX / RX in the upstream and downstream interfaces and the TX / RX in the protocol controller can also be switched and controlled by the audio processing controller DSP.
[0048] The power supply mode of the microphone device can support the POE power supply mode of multiple microphone cascading, or can use the DC cascading power supply mode or the single DC power supply mode.
[0049] In one example embodiment, determining the first device type of the target microphone according to the detection signals of the upstream interface and the downstream interface of the target microphone comprises: determining the target microphone as a single microphone when the detection signals of the upstream interface and the downstream interface are both high; determining the target microphone as an intermediate cascade microphone when the detection signals of the upstream interface and the downstream interface are both low; determining the target microphone as a last-stage microphone when the upstream interface is low and the downstream interface is high; and determining the target microphone as a first-stage microphone when the upstream interface is high and the downstream interface is low.
[0050] The microphone device has a USB interface to access a computer (PC). However, it should be noted that not every microphone device needs to access the PC through the USB interface. The PC is only optional for a user to obtain audio data.
[0051] If the DOWN_PLUG_DET is high, the downstream interface is not plugged into the next-stage microphone. Then, the level state of the UP_PLUG_DET is continuously determined. If the UP_PLUG_DET is high, the upstream and downstream interfaces are not plugged in, the microphone device is not used in cascade, and is only used as a single microphone device. The audio acquisition and playing do not go through the protocol controller. The acquired audio data is directly processed by the DSP and transmitted to the computer through the USB for use. If the UP_PLUG_DET is low, the upstream interface is plugged in, and the downstream interface is not plugged in. The microphone is a last-stage microphone device.
[0052] If the DOWN_PLUG_DET is low, the downstream interface is plugged into the next-stage microphone. Then, the level state of the UP_PLUG_DET is continuously determined. If the UP_PLUG_DET is high, the microphone is a first-stage microphone. If the UP_PLUG_DET is low, the microphone device is an intermediate cascade microphone.
[0053] In one example embodiment, determining the second device type of the target microphone according to the state of the master-slave selection button of the target microphone comprises: determining the target microphone as a master microphone when the master-slave selection button of the target microphone is in an open state; and determining the target microphone as a non-master microphone when the master-slave selection button of the target microphone is in a closed state.
[0054] As an optional implementation, as shown in a structural diagram of a microphone speaker device, the master-slave selection button is pressed as a master microphone, and otherwise as a slave microphone. Figure 3
[0055] In one exemplary embodiment, determining the target channel among the N+1 channels of the protocol controller according to the device type includes: if the target microphone is the main microphone, determining the first channel among the N+1 channels as the target channel; if the target microphone is the non-main microphone, determining the Mth channel among the N+1 channels as the target channel, wherein M is greater than 1 and less than or equal to N+1, and the Mth channel is a channel among the N+1 channels that has not been assigned a microphone.
[0056] If the target microphone is the primary microphone, audio acquisition and playback follow protocol control, and the acquired and played audio is placed in CH0 (the first channel) and then sent to the twisted-pair loop circuit. If the target microphone is not the primary microphone, audio acquisition and playback follow protocol controller, and the acquired and played audio is placed in CHM (the Mth channel) and then sent to the twisted-pair loop circuit.
[0057] In one exemplary embodiment, the method further includes: when the target microphone is the main microphone, assigning a first device number to the target microphone and sequentially assigning device numbers to the other microphones among the N+1 microphones, wherein the first device number corresponds to the first channel; and when the target microphone is the non-main microphone, requesting an Mth device number from the main microphone among the N+1 microphones, wherein the Mth device number corresponds to the Mth channel.
[0058] In one exemplary embodiment, when the target microphone is the main microphone, assigning device numbers to the other microphones among the N+1 microphones in sequence includes: when the target microphone is a first-level microphone, assigning device numbers to the lower-level microphones of the target microphone among the N+1 microphones in sequence; when the target microphone is the last-level microphone, assigning device numbers to the upper-level microphones of the target microphone among the N+1 microphones in sequence; and when the target microphone is an intermediate-level microphone, assigning device numbers to the upper-level and lower-level microphones of the target microphone among the N+1 microphones in sequence.
[0059] In one exemplary embodiment, the method further includes: when the target microphone is a main microphone, sending a synchronization clock signal through the target microphone to the other microphones among the N+1 microphones; and when the target microphone is not a main microphone, receiving the synchronization clock signal through the target microphone.
[0060] like Figure 9 As shown, the specific implementation process is as follows:
[0061] Firstly, the microphone device has a USB interface to access the PC. But it should be noted that not every microphone device needs to access the PC through the USB interface. The PC is only used for the user to obtain audio data, which is optional.
[0062] Firstly, determine the level state of "DOWN_PLUG_DET":
[0063] If "DOWN_PLUG_DET" is high, the downstream interface does not insert the next level microphone.
[0064] Then continue to determine the level state of "UP_PLUG_DET":
[0065] If "UP_PLUG_DET" is high, neither the upstream interface nor the downstream interface is inserted, and the microphone device does not use the cascading function, but only as a single microphone device. The audio acquisition and playback do not go through the protocol controller. The collected audio data is directly processed by the DSP and transmitted to the computer through the USB for use.
[0066] If "UP_PLUG_DET" is low, the upstream interface is inserted, and the downstream interface is not inserted. The microphone is the last level microphone device. Then continue to determine whether this microphone is the master microphone:
[0067] If this microphone is the master microphone, set the device number to 0, send the synchronization clock to the twisted pair loop circuit, and start assigning device numbers to the upper level microphone from the left side as 1, 2, …, M, etc. The audio acquisition and playback go through the protocol control, and the collected and played audio is placed in CH0 and then sent to the twisted pair loop circuit.
[0068] If this microphone is not the master microphone, apply for a device number from the master microphone in the twisted pair loop circuit, assuming M. At the same time, receive the synchronization clock as the audio system sampling clock. The audio acquisition and playback go through the protocol controller, and the collected and played audio is placed in CHM and then sent to the twisted pair loop circuit.
[0069] If "DOWN_PLUG_DET" is low, the downstream interface has inserted the next level microphone. Then continue to determine the level state of "UP_PLUG_DET":
[0070] If "UP_PLUG_DET" is high, the microphone is the first level microphone. Then continue to determine whether the microphone is the master microphone:
[0071] If this microphone is the master microphone, set the device number to 0, send the synchronization clock to the twisted pair loop circuit, and start assigning device numbers to the upper level microphone from the right side as 1, 2, …, M, etc. The audio acquisition and playback go through the protocol control, and the collected and played audio is placed in CH0 and then sent to the twisted pair loop circuit.
[0072] If the microphone is a non-master microphone, the device number is applied from the master microphone in the twisted pair loop line, assuming M. And at the same time, the synchronous clock is received as the audio system sampling clock. The audio acquisition and playback go through the protocol controller, and the acquired and played audio is placed in CHM, and then sent to the twisted pair loop line.
[0073] If UP_PLUG_DET is low, the microphone device is an intermediate cascade microphone, then continue to determine whether the microphone is a master microphone:
[0074] If the microphone is a master microphone, the device number is set to 0, and the synchronous clock is sent to the twisted pair loop line, and the device number is assigned to the upper microphone in turn from the right side as 1, 2…M, etc. The audio acquisition and playback go through the protocol control, and the acquired and played audio is placed in CH0, and then sent to the twisted pair loop line.
[0075] If the microphone is a non-master microphone, the device number is applied from the master microphone in the twisted pair loop line, assuming M. And at the same time, the synchronous clock is received as the audio system sampling clock. The audio acquisition and playback go through the protocol controller, and the acquired and played audio is placed in CHM, and then sent to the twisted pair loop line.
[0076] The above logical judgment is completed, and the cascade is completed. The audio data of each device is circulated in the twisted pair loop line for use by each device. It should be noted that in a video conference scenario, all microphone playback can be required to be the same audio playback data.
[0077] The application realizes audio acquisition and playback data sharing of each device through the twisted pair loop line. The protocol transmission controller in the application has multiple audio channels built-in, and the format of each channel is given. At the same time, the audio and control data are A / D and D / A converted, the encoding is reduced, the delay is reduced, and the synchronous clock is transmitted. Support multiple PCs to access the cascade system through the USB interface, and can be online at the same time, and can simultaneously perform voice acquisition and voice playback. The application switches the interface connection form of the twisted pair through upstream and downstream interface detection, so as to judge the state of the microphone cascade and use the scene to enable different audio algorithms, which is more intelligent.
[0078] Those skilled in the art can clearly understand that the method according to the above-mentioned embodiments can be realized by means of software on a general hardware platform, and of course, can also be realized by hardware, but in many cases, the former is a better implementation. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a storage medium (such as a ROM / RAM, a magnetic disk, or an optical disk) and includes a plurality of instructions for causing a terminal device (which can be a mobile phone, a computer, a server, or a network device) to execute the method described in the embodiments of the present application.
[0079] In the embodiments, a device for transmitting audio is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments, and will not be described again. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, implementation of hardware, or a combination of software and hardware, is also possible and contemplated.
[0080] Figure 10 is a structural block diagram of the device for transmitting audio according to the embodiments of the present application, as shown in Figure 10 The device includes: a first determining module 1002 configured to determine a device type of a target microphone in N+1 microphones, where N is greater than or equal to 0; a second determining module 1004 configured to determine a target channel in N+1 channels of a protocol controller according to the device type, where each of the N+1 microphones includes the protocol controller, each of the N+1 channels corresponds to one of the N+1 microphones, and each of the channels is used to transmit audio collected and played by the corresponding microphone; and a transmitting module 1006 configured to transmit target audio collected and played by the target microphone through the target channel.
[0081] In one exemplary embodiment, the device is further configured to determine a first device type of the target microphone according to detection signals of upstream and downstream interfaces of the target microphone; determine a second device type of the target microphone according to a state of a master-slave selection button of the target microphone; and the device type includes the first device type and the second device type.
[0082] In an example embodiment, the apparatus is further configured to determine that the target microphone is a single microphone when the detection signals of the upstream interface and the downstream interface are both high; determine that the target microphone is a middle cascade microphone when the detection signals of the upstream interface and the downstream interface are both low; determine that the target microphone is a last stage microphone when the upstream interface is low and the downstream interface is high; and determine that the target microphone is a first stage microphone when the upstream interface is high and the downstream interface is low.
[0083] In an example embodiment, the apparatus is further configured to determine that the target microphone is a master microphone when the master-slave selection button of the target microphone is on; and determine that the target microphone is a non-master microphone when the master-slave selection button of the target microphone is off.
[0084] In an example embodiment, the apparatus is further configured to determine the first channel of the N+1 channels as the target channel when the target microphone is a master microphone; and determine the Mth channel of the N+1 channels as the target channel when the target microphone is a non-master microphone, wherein M is greater than 1 and less than or equal to N+1, and the Mth channel is a channel of the N+1 channels that is not assigned to a microphone.
[0085] In an example embodiment, the apparatus is further configured to assign a first device number to the target microphone when the target microphone is a master microphone, and sequentially assign device numbers to other microphones of the N+1 microphones in order, wherein the first device number corresponds to the first channel; and apply for an Mth device number to a master microphone of the N+1 microphones when the target microphone is a non-master microphone, wherein the Mth device number corresponds to the Mth channel.
[0086] In an example embodiment, the apparatus is further configured to sequentially assign device numbers to lower stage microphones of the target microphone of the N+1 microphones when the target microphone is a first stage microphone; sequentially assign device numbers to upper stage microphones of the target microphone of the N+1 microphones when the target microphone is a last stage microphone; and sequentially assign device numbers to upper stage microphones and lower stage microphones of the target microphone of the N+1 microphones when the target microphone is a middle stage microphone.
[0087] In an example embodiment, the apparatus is further configured to, when the target microphone is a primary microphone, send a synchronization clock signal to other microphones in the N+1 microphones via the target microphone; and when the target microphone is a non-primary microphone, receive the synchronization clock signal via the target microphone.
[0088] It should be noted that each of the above modules can be implemented by software or hardware, and for the latter, the following implementation manners can be used, but are not limited thereto: all of the above modules are located in the same processor; or the above modules are located in different processors in any combination.
[0089] Embodiments of the present application further provide a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps of the method described in any of the above embodiments.
[0090] In an example embodiment, the computer readable storage medium can include, but is not limited to, a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store computer programs.
[0091] Embodiments of the present application further provide an electronic device, which comprises a memory and a processor, the memory stores a computer program, and the processor is configured to run the computer program to perform the steps of any of the above method embodiments.
[0092] In an example embodiment, the electronic device can further comprise a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0093] The specific examples in the present embodiment can refer to the examples described in the above embodiments and example embodiments, and the present embodiment will not be described here again.
[0094] It should be apparent to those skilled in the art that the modules or steps of the application described above can be implemented with general computing devices, which can be centralized on a single computing device or distributed on a network of multiple computing devices, which can be implemented with program codes executable by the computing devices, so that they can be stored in storage devices and executed by the computing devices, and in some cases, the steps shown or described can be executed in different orders than shown, or made into individual integrated circuit modules, or made into a single integrated circuit module. Thus, the application is not limited to any particular combination of hardware and software.
[0095] The preferred embodiments of the application described above are intended to be merely exemplary and those skilled in the art will readily suggest modifications and variations to the specific embodiments disclosed without departing from the principles of the application. Any and all such modifications and variations are intended to be included herein within the scope of the present application.
Claims
1. A method of transmitting audio, characterized by, The method comprises the steps of: determining the device type of a target microphone among N+1 microphones, wherein N is greater than or equal to 0; determining a target channel among N+1 channels of a protocol controller according to the device type, wherein each of the N+1 microphones comprises the protocol controller, each of the N+1 channels corresponds to one of the N+1 microphones, and each of the channels is used to transmit audio collected and played by the corresponding microphone, the microphone is built-in with a loudspeaker, and the protocol controller contains audio collection and play data of the N+1 microphone devices, and the audio data of all microphone devices is visible to other microphone devices; transmitting target audio collected and played by the target microphone through the target channel.
2. The method of claim 1, wherein, The method for determining the device type of a target microphone among N+1 microphones comprises the steps of: determining a first device type of the target microphone according to detection signals of upstream and downstream interfaces of the target microphone; determining a second device type of the target microphone according to a state of a master-slave selection button of the target microphone; wherein the device type comprises the first device type and the second device type.
3. The method of claim 2, wherein, The method for determining a first device type of a target microphone according to detection signals of upstream and downstream interfaces of the target microphone comprises the steps of: determining that the target microphone is a single microphone when the detection signals of the upstream and downstream interfaces are both high; determining that the target microphone is an intermediate cascade microphone when the detection signals of the upstream and downstream interfaces are both low; determining that the target microphone is a last-stage microphone when the upstream interface is low and the downstream interface is high; determining that the target microphone is a first-stage microphone when the upstream interface is high and the downstream interface is low.
4. The method of claim 2, wherein, The method for determining a second device type of a target microphone according to a state of a master-slave selection button of the target microphone comprises the steps of: determining that the target microphone is a master microphone when the master-slave selection button of the target microphone is in an open state; determining that the target microphone is a non-master microphone when the master-slave selection button of the target microphone is in a closed state.
5. The method according to any one of claims 1 to 4, characterized in that, The method for determining a target channel among N+1 channels of a protocol controller according to a device type comprises the steps of: determining a first channel among the N+1 channels as the target channel when the target microphone is a master microphone; determining an Mth channel among the N+1 channels as the target channel when the target microphone is a non-master microphone, wherein M is greater than 1 and less than or equal to N+1, and the Mth channel is a channel without allocated microphone among the N+1 channels.
6. The method of claim 5, wherein, The method further comprises the steps of: allocating a first device number to the target microphone and sequentially allocating device numbers to other microphones among the N+1 microphones in order when the target microphone is the master microphone, wherein the first device number corresponds to the first channel. In a case that the target microphone is the non-main microphone, applying an Mth device number to the main microphone in the N+1 microphones, wherein the M device numbers correspond to the Mth channel.
7. The method of claim 6, wherein, In a case that the target microphone is the main microphone, assigning device numbers to other microphones in the N+1 microphones in sequence, including: In a case that the target microphone is a first-level microphone, assigning device numbers to lower-level microphones of the target microphone in the N+1 microphones in sequence; In a case that the target microphone is a last-level microphone, assigning device numbers to upper-level microphones of the target microphone in the N+1 microphones in sequence; In a case that the target microphone is an intermediate-level microphone, assigning device numbers to upper-level microphones and lower-level microphones of the target microphone in the N+1 microphones in sequence.
8. The method according to any one of claims 1 to 4, characterized in that, The method further includes: In a case that the target microphone is the main microphone, sending a synchronization clock signal by the target microphone to other microphones in the N+1 microphones; In a case that the target microphone is the non-main microphone, receiving the synchronization clock signal by the target microphone.
9. An apparatus for transmitting audio, the apparatus comprising: It includes: A first determining module configured to determine a device type of a target microphone in N+1 microphones, wherein N is greater than or equal to 0; A second determining module configured to determine a target channel in N+1 channels of a protocol controller according to the device type, wherein each microphone in the N+1 microphones includes the protocol controller, each channel in the N+1 channels corresponds to one microphone in the N+1 microphones, the each channel is used to transmit audio collected and played by the corresponding microphone, the microphone is built-in with a loudspeaker, the protocol controller contains audio collection and play data of the N+1 microphone devices, and audio data of all microphone devices is visible to other microphone devices; A transmitting module configured to transmit target audio collected and played by the target microphone through the target channel.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, wherein the computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 8. 11.An electronic device comprising a memory and a processor, the electronic device characterized by, The memory stores a computer program, and the processor is configured to run the computer program to execute the method in any one of claims 1 to 8.
Citation Information
Patent Citations
Electronic music device
CN101146006B
Microphone cascading method
CN115348241A