Audio input source switching method, device, equipment and product

By taking over the audio routing of mobile devices and listening for changes in the input source, the system identifies and switches to the Bluetooth audio input source, solving the problem of Bluetooth microphones and headphones not being able to switch automatically in existing technologies and improving the user experience.

CN121357464APending Publication Date: 2026-01-16SHEN ZHEN NEEWER TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511313451.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-15
Publication Date
2026-01-16

AI Technical Summary

Technical Problem

Current mobile devices cannot automatically switch to the Bluetooth audio input source when connected to Bluetooth microphones or headphones, resulting in a poor user experience, especially in live streaming scenarios where the default audio input source for most applications is the built-in microphone.

Method used

By taking over the audio routing of mobile devices, listening for changes in audio input sources, obtaining a list of audio input sources, and determining the Bluetooth audio input source based on the list, cross-application sharing of Bluetooth audio input sources can be achieved.

Benefits of technology

It enables automatic switching of the mobile device's audio routing to the Bluetooth audio input source when the user agrees to access the microphone, improving the ability to share audio input sources across applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121357464A_ABST
    Figure CN121357464A_ABST
Patent Text Reader

Abstract

The invention discloses an audio input source switching method, device, equipment and product, and relates to the technical field of electronic control. The audio input source switching method comprises the steps of taking over an audio route of the mobile device under the condition that a microphone access authorization instruction of a user is received; monitoring an audio input source change of the mobile device, and obtaining an audio input source list; determining a Bluetooth audio input source according to the audio input source list; and switching the audio input source of the audio route of the mobile device based on the Bluetooth audio input source. According to the scheme, the mobile device can be automatically switched to the Bluetooth audio input source, and meanwhile, the Bluetooth audio input source can be shared in a cross-application mode.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electronic control technology, and in particular to an audio input source switching method, apparatus, device and product. Background Technology

[0002] When a Bluetooth microphone or headset is connected to a mobile device, the operating system defaults to an application-level audio routing strategy. Each application needs to apply for microphone access permissions separately, and the default audio input source for each application is the mobile device's built-in microphone.

[0003] For example, in applications like TikTok, Xiaohongshu, and WeChat, even if a mobile device is connected to a Bluetooth microphone or headset, the sound is input from the mobile device's built-in microphone in a live streaming scenario. It cannot adaptively switch to the Bluetooth microphone audio input source, resulting in a poor user experience.

[0004] Therefore, it is necessary to propose a solution that supports sharing Bluetooth audio input sources across applications. Summary of the Invention

[0005] The main purpose of this application is to provide an audio input source switching method, apparatus, device and product, which aims to solve the technical problem of the lack of technical solutions in the industry that support cross-application sharing of Bluetooth audio input sources.

[0006] To achieve the above objectives, this application proposes an audio input source switching method, which includes: Upon receiving a microphone access authorization instruction from a user, take over the audio routing of the mobile device; Monitor changes in the audio input sources of the mobile device and obtain a list of audio input sources; Based on the list of audio input sources, determine the Bluetooth audio input source; Based on the Bluetooth audio input source, the audio input source of the mobile device's audio route is switched.

[0007] In one embodiment, before the step of monitoring changes in the audio input source of the mobile device and obtaining a list of audio input sources, the method further includes: The mobile device is initialized with audio parameters to enable Bluetooth audio input.

[0008] In one embodiment, the operating system of the mobile device includes a first operating system and a second operating system, and the step of taking over the audio routing of the mobile device upon receiving a microphone access authorization command from a user includes: When the mobile device's operating system is the first operating system, an audio session proxy is set up to manage the mobile device's audio routing through the audio session proxy; When the mobile device's operating system is a secondary operating system, it requests global audio focus from the audio manager to manage the mobile device's audio routing through the global audio focus.

[0009] In one embodiment, the step of initializing the audio parameters of the mobile device to enable Bluetooth audio input includes: When the mobile device's operating system is the first operating system, set the audio session category to the Bluetooth-enabled option to enable Bluetooth devices as audio input sources on the mobile device; When the mobile device's operating system is a second operating system, the audio mode of the second operating system is set to standard media playback mode to disable the mobile device's default audio routing policy. Disable the mobile device's built-in microphone input to allow Bluetooth audio input.

[0010] In one embodiment, the step of monitoring changes in the audio input source of the mobile device and obtaining a list of audio input sources includes: The audio input source change information of the mobile device is received through a listener; When the audio input source change information indicates the presence of a Bluetooth microphone device, obtain the audio input source list.

[0011] In one embodiment, the step of switching the audio input source of the audio route of the mobile device based on the Bluetooth audio input source includes: When the operating system of the mobile device is the first operating system, the global audio input source of the audio route of the mobile device is set to the Bluetooth audio input source; When the mobile device's operating system is a second operating system, the Bluetooth synchronous connection SOC link is initiated based on the Bluetooth audio input source. Activate the Bluetooth SOC link and establish a Bluetooth audio transmission channel to achieve global forced audio routing based on the Bluetooth audio transmission channel.

[0012] In one embodiment, the step of determining the Bluetooth audio input source based on the audio input source list includes: Based on the audio device information, determine the Bluetooth audio input source from the list of audio input sources; or Based on a visual pop-up window, the system receives user commands to determine the Bluetooth audio input source. The visual pop-up window is used to display the list of audio input sources to the user.

[0013] Furthermore, to achieve the above objectives, this application also proposes an audio input source switching device, which includes: The management module is used to take over the audio routing of mobile devices upon receiving a microphone access authorization instruction from a user; The monitoring module is used to monitor changes in the audio input source of the mobile device and obtain a list of audio input sources; The determining module is used to determine the Bluetooth audio input source based on the audio input source list; The switching module is used to switch the audio input source of the audio route of the mobile device based on the Bluetooth audio input source.

[0014] In addition, to achieve the above objectives, this application also proposes an audio input source switching device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the audio input source switching method as described above.

[0015] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the audio input source switching method described above.

[0016] One or more technical solutions proposed in this application have at least the following technical effects: The audio input source switching method, apparatus, device, and product proposed in this application specifically involve taking over the audio routing of a mobile device upon receiving a microphone access authorization command from a user; monitoring changes in the audio input source of the mobile device to obtain an audio input source list; determining a Bluetooth audio input source based on the audio input source list; and switching the audio input source of the mobile device's audio routing based on the Bluetooth audio input source.

[0017] This application, upon confirming that the user has consented to access the microphone, takes over the audio routing of the mobile device, obtains a list of audio input sources by listening to changes in the audio input source, determines the Bluetooth audio input source, and automatically switches the audio input source of the mobile device's audio routing to the Bluetooth audio input source, thereby enabling cross-application sharing of the Bluetooth audio input source. Attached Figure Description

[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a flowchart illustrating the first embodiment of the audio input source switching method of this application. Figure 2 This is a flowchart illustrating the second embodiment of the audio input source switching method of this application. Figure 3 This is a flowchart illustrating the third embodiment of the audio input source switching method of this application. Figure 4 This is a schematic diagram of the module structure of the audio input source switching device of this application; Figure 5 This is a schematic diagram of the device structure of the hardware operating environment involved in the audio input source switching method of this application embodiment.

[0021] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0022] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0023] The main solution of this application embodiment is: upon receiving a microphone access authorization instruction from a user, taking over the audio routing of the mobile device; monitoring changes in the audio input source of the mobile device and obtaining an audio input source list; determining the Bluetooth audio input source based on the audio input source list; and switching the audio input source of the audio routing of the mobile device based on the Bluetooth audio input source.

[0024] When a Bluetooth microphone or headset is connected to a mobile device, the operating system defaults to an application-level audio routing strategy. Each application needs to apply for microphone access permissions separately, and the default audio input source for each application is the mobile device's built-in microphone.

[0025] For example, in applications like TikTok, Xiaohongshu, and WeChat, even if a mobile device is connected to a Bluetooth microphone or headset, the sound is input from the mobile device's built-in microphone in a live streaming scenario. It cannot adaptively switch to the Bluetooth microphone audio input source, resulting in a poor user experience.

[0026] Furthermore, the inventors discovered that when a mobile device is engaged in a voice or video call, the device automatically activates its Bluetooth microphone for voice communication because the call mode uses the HFP protocol. However, after the call ends, the mobile device's audio input remains the default input from its built-in microphone.

[0027] Therefore, it is necessary to propose a solution that supports sharing Bluetooth audio input sources across applications.

[0028] To address the aforementioned technical problems, this application proposes a solution that, upon determining that the user has consented to access the microphone, takes over the audio routing of the mobile device, obtains a list of audio input sources by monitoring changes in the audio input source, identifies the Bluetooth audio input source, and automatically switches the audio input source of the mobile device's audio routing to the Bluetooth audio input source, thereby enabling cross-application sharing of the Bluetooth audio input source.

[0029] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, personal computer, mobile phone, etc., or an audio input source switching device that can achieve the above functions.

[0030] Based on this, embodiments of this application provide an audio input source switching method, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the audio input source switching method of this application.

[0031] The audio input source switching method includes steps S110~S140: Step S110: Upon receiving a microphone access authorization instruction from the user, take over the audio routing of the mobile device; It should be noted that audio routing refers to the transmission path of an audio stream from the input device to the output device.

[0032] This application applies to mobile devices to enable global-level audio input source switching. In order for global applications to use audio input sources, the audio input source switching device needs to use the mobile device's operating system to request system-level microphone access permissions from the user. Upon receiving the user's microphone access authorization instruction, it performs subsequent processing to ensure that the subsequent processing complies with relevant standards or regulations.

[0033] For example, upon receiving a microphone access authorization instruction from a user, the audio input source switching device gains control over the global audio input / output path of the mobile terminal by calling the audio session or audio management interface provided by the operating system. This allows the device to take over the audio routing of the mobile device, ensuring that when any third-party application is launched subsequently, the audio input follows the routing policy set by the audio input source switching device instead of the operating system's default built-in microphone on the mobile device.

[0034] Step S120: Monitor changes in the audio input source of the mobile device and obtain a list of audio input sources; It should be noted that the audio input source list refers to the set of all available audio input ports currently enumerated by the operating system. Each item in this set contains the port type and its unique identifier.

[0035] Specifically, the audio input source switching device needs to monitor changes in the audio input source of the mobile device so that it can immediately obtain the latest list of audio input sources after the current audio input source changes, and thus discover the Bluetooth audio input source.

[0036] Furthermore, in order for the audio input source switching device to discover the Bluetooth audio input source, step S1 is included before step 120: Step S1: Initialize the audio parameters of the mobile device to enable Bluetooth audio input.

[0037] Specifically, the audio input source switching device configures all the key parameters of the audio system in the mobile terminal's operating system in one go, so that the audio system is in a "Bluetooth audio input allowed" state, thus making it possible to detect the Bluetooth audio input source by listening to changes in the audio input source.

[0038] In one feasible implementation, the step of monitoring changes in the audio input source of the mobile device and obtaining a list of audio input sources includes steps S1201~S1202: Step S1201: Receive audio input source change information from the mobile device via a listener; Step S1202: When the audio input source change information indicates the presence of a Bluetooth microphone device, obtain the audio input source list.

[0039] It should be noted that a listener refers to a callback object or broadcast receiver registered with the operating system by the audio input source switching device.

[0040] Specifically, when events such as Bluetooth device connection or disconnection or wired headphone plugging / unplugging occur, the operating system will actively send audio input source change information to the audio input source switching device through a listener, such as operating system callback information or broadcast notification, so that the audio input source switching device can receive audio input source change information in real time and realize the monitoring of audio input source changes of mobile devices.

[0041] After confirming the presence of a Bluetooth microphone device based on operating system callback information or broadcast notifications, the system immediately obtains the latest list of audio input sources for subsequent discovery of Bluetooth audio input sources.

[0042] Step S130: Determine the Bluetooth audio input source based on the audio input source list; Optionally, the Bluetooth audio input source can be determined from the audio input source list based on the audio device information; Optionally, based on a visual pop-up window, a user instruction is received to determine the Bluetooth audio input source according to the user instruction. The visual pop-up window is used to display the list of audio input sources to the user.

[0043] Specifically, the audio input source switching device can determine the Bluetooth audio input source to be used for global audio input based on the audio input source list and audio device information, such as Bluetooth device identification information.

[0044] The audio input source switching device can also display a list of audio input sources in a visual pop-up window, receive the user's input source selection command, and determine the Bluetooth audio input source to be used for global audio input.

[0045] Specifically, the operating system of the mobile device further includes a first operating system and a second operating system. The first operating system is iOS (iPhone Operating System), and the second operating system is Android.

[0046] Specifically, in iOS systems, AVAudioSession is a system service class used to implement global audio management, specifically controlling the application's audio behavior, including audio routing settings, permission requests, etc.

[0047] In Android, AudioManager is a system service class used for global audio management, specifically managing audio focus, routing, and device status.

[0048] Optionally, on iOS, by registering a listening method, the audio route change notification AVAudioSessionRouteChangeNotification can be obtained, and the changes in the audio input source of the mobile device can be monitored based on the change notification.

[0049] Then, the availableInputs method is used to find Bluetooth audio input sources from the list of currently supported audio input sources on the mobile device, using the audio session Bluetooth port identifier - AVAudioSessionPortBluetoothHFP.

[0050] Optionally, on Android, by registering an audio device callback object - AudioManager.registerAudioDeviceCallback - the callback information of the registered audio device can be obtained, and by listening to the connection status of the audio device, the change of the audio input source of the mobile device can be determined.

[0051] Then, the list of audio input sources currently supported by the mobile device is obtained through the AudioManager.getDevices() method, and the Bluetooth audio input source is found through the Bluetooth device identification information - AudioDeviceInfo.TYPE_BLUETOOTH_SCO.

[0052] Step S140: Based on the Bluetooth audio input source, switch the audio input source of the audio route of the mobile device.

[0053] Specifically, after determining the Bluetooth audio input source through the aforementioned steps, the audio input source switching device can force the audio data stream of the mobile device to be routed to the Bluetooth microphone device corresponding to the Bluetooth audio input source, thereby switching the audio input source of the audio route to that Bluetooth audio input source.

[0054] In this embodiment, if it is determined that the user agrees to access the microphone, the audio routing of the mobile device is taken over. By listening to changes in the audio input source, the audio input source list is obtained to determine the Bluetooth audio input source, thereby automatically switching the audio input source of the mobile device's audio routing to the Bluetooth audio input source, realizing cross-application sharing of Bluetooth audio input source.

[0055] Based on the above embodiments of this application, a second embodiment of this application is proposed. In the second embodiment of this application, content that is the same as or similar to the above embodiments can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 2 , Figure 2 This is a flowchart illustrating the second embodiment of the audio input source switching method of this application; as shown below. Figure 2 As shown, the operating system of the mobile device includes a first operating system and a second operating system. The step of taking over the audio routing of the mobile device upon receiving a microphone access authorization command from a user includes steps S210-S220: Step S210: When the operating system of the mobile device is the first operating system, set up an audio session proxy to manage the audio routing of the mobile device through the audio session proxy; Step S220: When the operating system of the mobile device is a second operating system, request global audio focus from the audio manager to manage the audio routing of the mobile device through the global audio focus.

[0056] Further, the step of initializing the audio parameters of the mobile device to enable Bluetooth audio input includes steps A01 to A03: Step A01: When the operating system of the mobile device is the first operating system, set the audio session category to the Bluetooth-enabled option to enable the Bluetooth device as an audio input source on the mobile device. Step A02: When the operating system of the mobile device is the second operating system, set the audio mode of the second operating system to the standard media playback mode to remove the default audio routing policy of the mobile device. Step A03: Disable the built-in microphone input of the mobile device to allow Bluetooth audio input on the mobile device.

[0057] Specifically, referring to the foregoing embodiments, the first operating system is iOS, and the second operating system is Android.

[0058] Optionally, when the mobile device's operating system is iOS, the audio input source switching device can be authorized by setting the audio session delegate AVAudioSessionDelegate, thereby setting the audio input source switching device as an audio session delegate. This allows the audio input source switching device to centrally manage the mobile device's audio sessions, thereby managing the mobile device's global audio input sources and achieving audio routing management.

[0059] To ensure that the audio system of a mobile device is in a "Bluetooth audio input allowed" state, the audio input source switching device can initialize audio properties through the setCategory method of AVAudioSession, setting the audio session category to the Bluetooth allowed option, that is, setting AVAudioSessionCategoryOptionAllowBluetooth, so that the mobile device enables Bluetooth devices as audio input sources, that is, supports Bluetooth audio input sources.

[0060] Optionally, to synchronously set the Bluetooth device as an audio input source, the audio input source switching device can also enable the Bluetooth A2DP option by setting the audio session category to allow Bluetooth A2DP, i.e., setting AVAudioSessionCategoryOptionAllowBluetoothA2DP, thus allowing the mobile device to allow the Bluetooth device as an audio output source. It should be understood that a Bluetooth device includes at least components such as a Bluetooth microphone and speaker for inputting and outputting audio data streams.

[0061] Furthermore, after the audio input source switching device initializes the audio properties under the iOS system, it is also necessary to set the parameter of the setActive() method in AVAudioSession to YES in order to activate the audio session and make the aforementioned audio property-related settings take effect globally.

[0062] Optionally, when the mobile device's operating system is Android, it first requests global audio focus from AudioManager to manage the global audio focus, and then manages the mobile device's audio routing based on the global audio focus. Here, global audio focus refers to a persistent audio focus of type AUDIOFOCUS_GAIN in AudioManager.

[0063] Optionally, the audio input source switching device can set the default preferred device for the mobile device's audio policy to the Bluetooth device, implying that the mobile device should preferentially use the Bluetooth device for audio routing. This can be achieved by setting the parameter of the mobile device's default audio policy method to the Bluetooth device identifier TYPE_BLUETOOTH_SCO.

[0064] The default audio strategy method is AudioManager.setPreferredDeviceForStrategy.

[0065] Furthermore, since some audio policies force routing to the built-in microphone, earpiece, or speaker, even if the default preferred device for the mobile device's audio policy is set to the Bluetooth device as described above, there may still be cases where this fails.

[0066] To ensure that Bluetooth audio input sources are globally effective on mobile devices and can be shared across applications, The audio input source switching device still needs to initialize the audio parameters of the mobile device to enable Bluetooth audio input.

[0067] To ensure that the mobile device's audio system is in a "Bluetooth audio input allowed" state, the audio input source switching device sets AudioManager.setMode() to AudioManager.MODE_NORMAL, thereby setting the audio mode to standard media playback mode. This terminates special states such as calls or communications, removes the default routing policy of the mobile device for the built-in microphone, earpiece, or speaker, and ensures that subsequent audio input is performed based on the normal audio scenario.

[0068] Furthermore, in order to ensure that the Bluetooth device can exclusively use the audio transmission channel, the audio input source switching device needs to disable the built-in microphone input of the mobile device by setting setSpeakerphoneOn(false).

[0069] In this embodiment, the present application, through the above-described solution, manages the audio routing of the mobile device when the operating system of the mobile device is a first operating system or a second operating system. This breaks the permission isolation caused by the default application-level audio routing policy of the operating system, enabling the Bluetooth microphone to become the default input source globally. This allows for continued monitoring of changes in the audio input source, obtaining a list of audio input sources to determine the Bluetooth audio input source, and automatically switching the audio input source of the mobile device's audio routing to the Bluetooth audio input source, thus enabling cross-application sharing of the Bluetooth audio input source.

[0070] Based on the above embodiments of this application, a third embodiment of this application is proposed. In this third embodiment, content that is the same as or similar to the above embodiments can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 3 , Figure 3 This is a flowchart illustrating the third embodiment of the audio input source switching method of this application; as shown below. Figure 3 As shown, the step of switching the audio input source of the mobile device's audio route based on the Bluetooth audio input source includes steps S310~S330: Step S310: When the operating system of the mobile device is the first operating system, set the global audio input source of the audio route of the mobile device to the Bluetooth audio input source; Step S320: When the operating system of the mobile device is the second operating system, start the Bluetooth synchronous connection SOC link according to the Bluetooth audio input source; Step S330: Activate the Bluetooth SOC link and establish a Bluetooth audio transmission channel to achieve global forced audio routing based on the Bluetooth audio transmission channel.

[0071] Specifically, when the mobile device's operating system is iOS, the audio input source switching device sets the preferred audio input source to the Bluetooth audio input source through the setPreferredInput(AVAudioSessionPortBluetoothHFP) operation, thereby switching the global audio input source of the audio router to the Bluetooth audio input source, thus enabling cross-application sharing of the Bluetooth audio input source.

[0072] When the mobile device's operating system is Android, the audio input source switching device first starts the Bluetooth SOC (Synchronous Connection-Oriented) link through the AudioManager.startBluetoothSco() method according to the selected Bluetooth audio input source.

[0073] Then, by using the `AudioManager.setBluetoothScoOn(true)` operation, the established Bluetooth SOC link is activated, thereby establishing an audio transmission channel with the Bluetooth device or Bluetooth microphone device. It should be understood that this audio transmission channel can be a unidirectional audio input channel or a bidirectional audio input and output channel. Bidirectional audio input and output channels can be implemented using the same Bluetooth device.

[0074] Through the above steps, the audio input source switching device can force the audio data stream to be routed to the Bluetooth device according to the audio transmission channel, and preferentially select the Bluetooth device or Bluetooth microphone device as the input device to override the default routing strategy, thereby realizing global forced audio routing based on the Bluetooth audio transmission channel.

[0075] In this embodiment, the above method can at least achieve the following in scenarios where live streaming is conducted using a mobile device and the user agrees to microphone access permissions: after the Bluetooth microphone device is connected to the mobile device, the audio input source list is obtained by listening to changes in the audio input source of the mobile device, the Bluetooth audio input source is determined, and the Bluetooth audio input source is used as the global audio input source of the mobile device.

[0076] Furthermore, after switching the audio input source of the mobile device's audio routing to the Bluetooth audio input source, the Bluetooth microphone device can be tested in live streaming scenarios of certain applications, or the user's voice can be received through the Bluetooth microphone device to determine whether the relevant page displays sound wave fluctuations, thus determining whether the switch to the Bluetooth audio input source has been successful.

[0077] In this embodiment, the present application achieves automatic switching of the audio input source of the mobile device's audio routing by directly setting the preferred audio input or starting and activating the relevant Bluetooth SOC link when the mobile device's operating system is a first operating system or a second operating system. This enables the Bluetooth microphone to become the default input source globally, thus achieving cross-application sharing of Bluetooth audio input source.

[0078] It should be noted that the above embodiments can be combined and implemented in a reasonable manner according to the actual situation, and this embodiment will not elaborate on this further.

[0079] This application also provides an audio input source switching device, please refer to... Figure 4 The audio input source switching device includes: Management module 10 is used to take over the audio routing of the mobile device upon receiving a microphone access authorization instruction from the user; The monitoring module 20 is used to monitor changes in the audio input source of the mobile device and obtain a list of audio input sources; The determining module 30 is used to determine the Bluetooth audio input source based on the audio input source list; The switching module 40 is used to switch the audio input source of the audio route of the mobile device based on the Bluetooth audio input source.

[0080] The audio input source switching device provided in this application, employing the audio input source switching method in the above embodiments, can solve the technical problem of the lack of technical solutions in the industry that support cross-application sharing of Bluetooth audio input sources. Compared with the prior art, the beneficial effects of the audio input source switching device provided in this application are the same as those of the audio input source switching method provided in the above embodiments, and other technical features in the audio input source switching device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0081] This application provides an audio input source switching device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the audio input source switching method in the above embodiments.

[0082] The following is for reference. Figure 5This document illustrates a structural schematic diagram of an audio input source switching device suitable for implementing embodiments of this application. The audio input source switching device in these embodiments may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 5 The audio input source switching device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0083] like Figure 5 As shown, the audio input source switching device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory 1002 or a program loaded from a storage device 1003 into a random access memory 1004. The random access memory 1004 also stores various programs and data required for the operation of the audio input source switching device. The processing unit 1001, the read-only memory 1002, and the random access memory 1004 are interconnected via a bus 1005. An input / output interface 1006 is also connected to the bus. Typically, the following systems can be connected to the input / output interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the audio input source switching device to communicate wirelessly or wiredly with other devices to exchange data. Although the figure shows audio input source switching devices with various systems, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.

[0084] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from read-only memory 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0085] The audio input source switching device provided in this application, employing the audio input source switching method in the above embodiments, can solve the technical problem of the lack of technical solutions in the industry that support cross-application sharing of Bluetooth audio input sources. Compared with the prior art, the beneficial effects of the audio input source switching device provided in this application are the same as those of the audio input source switching method provided in the above embodiments, and other technical features in this audio input source switching device are the same as those disclosed in the method of the previous embodiment, and will not be repeated here.

[0086] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0087] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0088] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the audio input source switching method in the above embodiments.

[0089] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0090] The aforementioned computer-readable storage medium may be included in the audio input source switching device; or it may exist independently and not assembled into the audio input source switching device.

[0091] The aforementioned computer-readable storage medium carries one or more programs that, when executed by an audio input source switching device, cause the audio input source switching device to: take over the audio routing of the mobile device upon receiving a microphone access authorization instruction from a user; monitor changes in the audio input source of the mobile device and obtain an audio input source list; determine a Bluetooth audio input source based on the audio input source list; and switch the audio input source of the audio routing of the mobile device based on the Bluetooth audio input source.

[0092] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0093] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0094] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0095] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described audio input source switching method, thereby solving the technical problem of the lack of technical solutions in the industry that support cross-application sharing of Bluetooth audio input sources. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the audio input source switching method provided in the above embodiments, and will not be repeated here.

[0096] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the audio input source switching method described above.

[0097] The computer program product provided in this application solves the technical problem of the lack of technical solutions in the industry that support cross-application sharing of Bluetooth audio input sources. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the audio input source switching method provided in the above embodiments, and will not be repeated here.

[0098] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. A method for switching audio input sources, characterized in that, The audio input source switching method includes: Upon receiving a microphone access authorization instruction from a user, take over the audio routing of the mobile device; Monitor changes in the audio input sources of the mobile device and obtain a list of audio input sources; Based on the list of audio input sources, determine the Bluetooth audio input source; Based on the Bluetooth audio input source, the audio input source of the mobile device's audio route is switched.

2. The audio input source switching method as described in claim 1, characterized in that, Before the step of monitoring changes in the audio input source of the mobile device and obtaining the list of audio input sources, the method further includes: The mobile device is initialized with audio parameters to enable Bluetooth audio input.

3. The audio input source switching method as described in claim 2, characterized in that, The operating system of the mobile device includes a first operating system and a second operating system. The step of taking over the audio routing of the mobile device upon receiving a microphone access authorization command from a user includes: When the mobile device's operating system is the first operating system, an audio session proxy is set up to manage the mobile device's audio routing through the audio session proxy; When the mobile device's operating system is a secondary operating system, it requests global audio focus from the audio manager to manage the mobile device's audio routing through the global audio focus.

4. The audio input source switching method as described in claim 3, characterized in that, The step of initializing the audio parameters of the mobile device to enable Bluetooth audio input includes: When the mobile device's operating system is the first operating system, set the audio session category to the Bluetooth-enabled option to enable Bluetooth devices as audio input sources on the mobile device; When the mobile device's operating system is a second operating system, the audio mode of the second operating system is set to standard media playback mode to disable the mobile device's default audio routing policy. Disable the mobile device's built-in microphone input to allow Bluetooth audio input.

5. The audio input source switching method as described in claim 2, characterized in that, The step of monitoring changes in the audio input source of the mobile device and obtaining a list of audio input sources includes: The audio input source change information of the mobile device is received through a listener; When the audio input source change information indicates the presence of a Bluetooth microphone device, obtain the audio input source list.

6. The audio input source switching method as described in claim 4, characterized in that, The step of switching the audio input source of the audio route of the mobile device based on the Bluetooth audio input source includes: When the operating system of the mobile device is the first operating system, the global audio input source of the audio route of the mobile device is set to the Bluetooth audio input source; When the mobile device's operating system is a second operating system, the Bluetooth synchronous connection SOC link is initiated based on the Bluetooth audio input source. Activate the Bluetooth SOC link and establish a Bluetooth audio transmission channel to achieve global forced audio routing based on the Bluetooth audio transmission channel.

7. The audio input source switching method as described in claim 5, characterized in that, The step of determining the Bluetooth audio input source based on the audio input source list includes: Based on the audio device information, determine the Bluetooth audio input source from the list of audio input sources; or Based on a visual pop-up window, the system receives user commands to determine the Bluetooth audio input source. The visual pop-up window is used to display the list of audio input sources to the user.

8. An audio input source switching device, characterized in that, The audio input source switching device includes: The management module is used to take over the audio routing of mobile devices upon receiving a microphone access authorization instruction from a user; The monitoring module is used to monitor changes in the audio input source of the mobile device and obtain a list of audio input sources; The determining module is used to determine the Bluetooth audio input source based on the audio input source list; The switching module is used to switch the audio input source of the audio route of the mobile device based on the Bluetooth audio input source.

9. An audio input source switching device, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the audio input source switching method as claimed in any one of claims 1 to 7.

10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the steps of the audio input source switching method as described in any one of claims 1 to 7.