Search

CN-122027607-A - Audio play switching control method and device and aircraft

CN122027607ACN 122027607 ACN122027607 ACN 122027607ACN-122027607-A

Abstract

The embodiment of the application provides an audio play switching control method and device and an aircraft, and relates to the technical field of audio processing. The method comprises the steps of continuously processing and caching real-time audio stream data through a real-time audio playing module, continuously processing and caching file audio data through a file playing module, responding to a mode switching instruction, determining a current audio data source from a plurality of data sources based on the mode switching instruction, and accessing the audio data of the current audio data source to a hardware playing control module for audio playing. According to the embodiment of the application, the two modules respectively cache the two audio data, and the audio data of the corresponding audio data source is accessed to the hardware playing control module for playing during mode switching, so that the delay of playing mode switching can be reduced, and the efficiency of audio playing mode switching is effectively improved.

Inventors

  • CHEN FANGPING
  • SHEN BO
  • LI DEHUAI
  • Dong shining
  • WANG PEIJIE

Assignees

  • 天津云圣智能科技有限责任公司

Dates

Publication Date
20260512
Application Date
20260413

Claims (10)

  1. 1. An audio play switching control method, characterized by being applied to an aircraft, the method comprising: Continuously processing and caching real-time audio stream data through a real-time audio playing module, and continuously processing and caching file audio data through a file playing module; Determining a current audio data source from a plurality of data sources based on a mode switching instruction in response to the mode switching instruction, wherein the plurality of data sources comprise the real-time audio playing module and the file playing module; And accessing the audio data of the current audio data source to a hardware playing control module for audio playing, wherein the audio data of the current audio data source is the real-time audio stream data or the file audio data.
  2. 2. The audio play switching control method according to claim 1, wherein the determining a current audio data source from a plurality of data sources based on the mode switching instruction in response to the mode switching instruction comprises: when the playing arbiter determines that the mode switching instruction indicates to switch to a real-time shouting mode, determining that the current audio data source is the real-time audio playing module; and when the playing arbiter determines that the mode switching instruction indicates to switch to the file broadcasting mode, determining that the current audio data source is the file playing module.
  3. 3. The audio play switching control method according to claim 1, further comprising, before the accessing the audio data of the current audio data source to a hardware play control module for audio play: And respectively resampling the real-time audio stream data and the file audio data according to a preset target format to obtain audio data with uniform format, wherein the preset target format is determined based on the fixed working parameters of the hardware playing control module.
  4. 4. The audio playing switching control method according to claim 1, wherein the accessing the audio data of the current audio data source to the hardware playing control module for audio playing includes: After the audio data of the current audio data source is accessed to a hardware playing control module, before the hardware playing control module performs audio playing based on the current audio data source, the playing cache data in the hardware playing control module is emptied.
  5. 5. The audio play switching control method according to claim 1, wherein the continuously processing and buffering the real-time audio stream data by the real-time audio play module and continuously processing and buffering the file audio data by the file play module comprises: under the condition that a mode switching instruction for switching to a real-time shouting mode is determined to be received, continuously processing and caching real-time audio stream data through a real-time audio playing module; And under the condition that the mode switching instruction for switching to the file broadcasting mode is received, continuously processing and caching the file audio data through the file broadcasting module.
  6. 6. The audio play switching control method according to claim 1, wherein the continuously processing and buffering the real-time audio stream data by the real-time audio play module includes: and pulling the real-time audio stream from the Mediasoup server based on the WebRTC protocol through the real-time audio playing module, continuously decoding the real-time audio stream and caching the real-time audio stream into real-time audio stream data.
  7. 7. The audio play switching control method according to claim 1, further comprising: Responding to the recording instruction, and recording the real-time audio stream pulled by the real-time audio playing module into a circulating playing file; And storing the cyclic play file so that the file play module can continuously process and buffer file audio data based on the cyclic play file.
  8. 8. The audio playback switching control method as set forth in claim 1, wherein the continuously processing and buffering the file audio data by the file playback module includes: and continuously decoding and caching the pre-stored audio file into the file audio data through a file playing module, wherein the pre-stored audio file is downloaded and stored from a preset server.
  9. 9. An audio play switching control device for use with an aircraft, the device comprising: the data caching module is used for continuously processing and caching real-time audio stream data through the real-time audio playing module and continuously processing and caching file audio data through the file playing module; The system comprises a switching response module, a file playing module, a real-time audio playing module and a file playing module, wherein the switching response module is used for responding to a mode switching instruction and determining a current audio data source from a plurality of data sources based on the mode switching instruction; And the audio playing module is used for accessing the audio data of the current audio data source to a single hardware playing control module for audio playing, wherein the audio data of the current audio data source is the real-time audio stream data or the file audio data.
  10. 10. An aircraft comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor, when executing the program, implements the audio playback switching control method of any one of claims 1-8.

Description

Audio play switching control method and device and aircraft Technical Field The application relates to the technical field of audio processing, in particular to an audio playing switching control method and device and an aircraft. Background In emergency command, traffic guidance and other scenes, remote audio playing is usually required by using an aircraft-mounted megaphone. The existing aircraft audio playing mode mainly comprises the steps of playing a pre-stored audio file, storing pre-recorded audio on an aircraft, and circularly playing when needed, but not coping with emergency, and transmitting real-time voice to the aircraft for playing through radio or a network, wherein special hardware is generally needed and delay is high. At present, in order to integrate the two playing modes and realize on-demand switching, the prior art has the common practice that two independent and complete sets of audio equipment are deployed on an unmanned aerial vehicle at the same time, when switching is required, the current playing is stopped, the audio equipment is released, the other set of audio equipment is reinitialized, and the like, and the switching process has higher delay, so that the task continuity is affected. Therefore, the existing audio playing switching scheme has the problem of low switching efficiency. Disclosure of Invention The embodiment of the application aims to provide an audio play switching control method and device and an aircraft, which are used for improving the efficiency of audio play mode switching. In a first aspect, an embodiment of the present application provides an audio play switching control method, which is applied to an aircraft, and the method includes: Continuously processing and caching real-time audio stream data through a real-time audio playing module, and continuously processing and caching file audio data through a file playing module; Determining a current audio data source from a plurality of data sources based on a mode switching instruction in response to the mode switching instruction, wherein the plurality of data sources comprise the real-time audio playing module and the file playing module; And accessing the audio data of the current audio data source to a hardware playing control module for audio playing, wherein the audio data of the current audio data source is the real-time audio stream data or the file audio data. In the embodiment of the application, the real-time audio playing module and the file playing module are operated in parallel, so that the two audio data are continuously processed and cached respectively, and the audio data of the corresponding audio data source are accessed to the hardware playing control module for playing during the mode switching, so that the processes of hardware release, reinitialization and the like can be omitted during the switching process, the occurrence of excessively high switching delay is avoided, and the efficiency of switching the audio playing modes is effectively improved. In some embodiments, the determining, in response to a mode switch instruction, a current audio data source from a plurality of data sources based on the mode switch instruction comprises: when the playing arbiter determines that the mode switching instruction indicates to switch to a real-time shouting mode, determining that the current audio data source is the real-time audio playing module; and when the playing arbiter determines that the mode switching instruction indicates to switch to the file broadcasting mode, determining that the current audio data source is the file playing module. In the embodiment of the application, the play arbiter is used for accurately identifying and responding different mode switching instructions, so that the system can be ensured to be accurately switched to the corresponding audio data source, and the accuracy of switching the audio play modes is further improved. In some embodiments, before the accessing the audio data of the current audio data source to the hardware playing control module for audio playing, the method further includes: And respectively resampling the real-time audio stream data and the file audio data according to a preset target format to obtain audio data with uniform format, wherein the preset target format is determined based on the fixed working parameters of the hardware playing control module. In the embodiment of the application, the format unification processing is carried out before the switching of the access audio data, so that the hardware play control module does not need to change the play format during the mode switching, and the efficiency of the audio play mode switching is further improved. In some embodiments, the accessing the audio data of the current audio data source to the hardware playing control module for audio playing includes: After the audio data of the current audio data source is accessed to a hardware playing control module, before the hardware pl