CN109495776B - Audio sending and playing method and intelligent terminal - Google Patents

Audio sending and playing method and intelligent terminal Download PDF

Info

Publication number
CN109495776B
CN109495776B CN201811565099.4A CN201811565099A CN109495776B CN 109495776 B CN109495776 B CN 109495776B CN 201811565099 A CN201811565099 A CN 201811565099A CN 109495776 B CN109495776 B CN 109495776B
Authority
CN
China
Prior art keywords
audio data
invalid
audio
valid
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811565099.4A
Other languages
Chinese (zh)
Other versions
CN109495776A (en
Inventor
宋子全
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hisense Visual Technology Co Ltd
Original Assignee
Hisense Visual Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hisense Visual Technology Co Ltd filed Critical Hisense Visual Technology Co Ltd
Priority to CN201811565099.4A priority Critical patent/CN109495776B/en
Publication of CN109495776A publication Critical patent/CN109495776A/en
Priority to EP19898733.1A priority patent/EP3902271A4/en
Priority to PCT/CN2019/104971 priority patent/WO2020125076A1/en
Priority to CN201980079748.6A priority patent/CN113261300B/en
Priority to PCT/CN2019/107265 priority patent/WO2020125110A1/en
Priority to US16/588,510 priority patent/US11190836B2/en
Application granted granted Critical
Publication of CN109495776B publication Critical patent/CN109495776B/en
Priority to US17/512,912 priority patent/US11871075B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/439Processing of audio elementary streams
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/41Structure of client; Structure of client peripherals
    • H04N21/4104Peripherals receiving signals from specially adapted client devices
    • H04N21/4122Peripherals receiving signals from specially adapted client devices additional display device, e.g. video projector
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/436Interfacing a local distribution network, e.g. communicating with another STB or one or more peripheral devices inside the home
    • H04N21/4363Adapting the video stream to a specific local network, e.g. a Bluetooth® network
    • H04N21/43637Adapting the video stream to a specific local network, e.g. a Bluetooth® network involving a wireless protocol, e.g. Bluetooth, RF or wireless LAN [IEEE 802.11]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/488Data services, e.g. news ticker
    • H04N21/4882Data services, e.g. news ticker for displaying messages, e.g. warnings, reminders

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The application discloses a method for sending and playing audio and an intelligent terminal, so that network transmission burden is reduced, and real-time playing delay of the audio is optimized. An audio sending method provided by an embodiment of the present application includes: collecting currently played audio data; if the audio data is invalid audio data, adding invalid audio data indication information in the audio data, and compressing the audio data to generate an invalid audio data packet; and sending the invalid audio data packet to an audio data receiving end.

Description

Audio sending and playing method and intelligent terminal
Technical Field
The application relates to the technical field of intelligent device interaction, in particular to an audio sending and playing method and an intelligent terminal.
Background
With the continuous development of television technology, television products are more and more accepted and used by users. In some scenarios, many users are watching tv programs, and in order to avoid affecting the rest of family members, the tv is usually turned to a mute state or the volume of the tv is turned down, which affects the watching experience of the tv programs to some extent.
The mobile equipment is used as sound output equipment of the intelligent television, and the television end captures the current sound in real time and transmits the current sound to the mobile equipment for real-time playing. However, after the television is connected with the mobile phone, the sound delay may be caused by network reasons and the fact that the mobile phone playing cache cannot be cleaned in time.
Disclosure of Invention
The embodiment of the application provides an audio sending and playing method and an intelligent terminal, which are used for reducing network transmission burden and optimizing real-time playing delay of audio.
An audio sending method provided by an embodiment of the present application includes:
collecting currently played audio data;
if the audio data is invalid audio data, adding invalid audio data indication information in the audio data, and compressing the audio data to generate an invalid audio data packet;
and sending the invalid audio data packet to an audio data receiving end.
By the method, the audio data played currently is collected; if the audio data is invalid audio data, adding invalid audio data indication information in the audio data, and compressing the audio data to generate an invalid audio data packet; and sending the invalid audio data packet to an audio data receiving end, thereby reducing the network transmission burden and optimizing the real-time playing delay of the audio.
Optionally, if the audio data is valid audio data, the valid audio data is sent to the audio data receiving end.
Optionally, if the audio data is invalid audio data, adding invalid audio data indication information to the audio data, and compressing the audio data to generate an invalid audio data packet, specifically including:
judging whether all the audio data are invalid bytes;
and if all the audio data are invalid bytes, adding invalid audio data indication information in the invalid bytes, and compressing the invalid audio data to generate an invalid audio data packet.
Optionally, the collected audio data is a complete frame of audio data, and all characters of the frame of audio data are 0, and the audio data is determined to be invalid audio data.
Optionally, before the acquiring the audio data of the currently played content, the method further includes:
and controlling the intelligent terminal to enter a recording state, and recording the audio of the intelligent terminal.
An audio playing method provided by an embodiment of the present application includes:
receiving audio data sent by an audio data sending end;
and analyzing the audio data, and if the audio data is invalid audio data, discarding the invalid audio data.
By the method, the audio data sent by the audio data sending end is received; and analyzing the audio data, and if the audio data is invalid audio data, discarding the invalid audio data, thereby reducing the play cache of an audio data receiving end and optimizing the real-time play delay of the audio.
Optionally, when the audio data is valid audio data, the audio data is played.
Optionally, after receiving audio data sent by an audio data sending end, judging whether the audio data is invalid audio data according to indication information in the audio data;
optionally, the indication information is located in the first N-bit bytes of the audio data, where N is a natural number.
Optionally, when the audio data is valid audio data, playing the audio data specifically includes: and when the audio data is determined to be valid audio data, storing the valid audio data into a play cache.
Correspondingly, on the device side, the intelligent terminal that this application embodiment provided includes:
the receiving unit is used for receiving the voice instruction sent by the audio data receiving end;
the acquisition unit is used for acquiring currently played audio data;
the processing unit is used for adding invalid audio data indication information into the audio data if the audio data is invalid audio data, compressing the audio data and generating an invalid audio data packet;
and the sending unit is used for sending the invalid audio data packet to the audio data receiving end.
On the device side, the intelligent terminal provided by the embodiment of the application comprises:
the receiving unit is used for receiving the audio data sent by the audio data sending end;
the processing unit is used for analyzing the audio data, and if the audio data is invalid, the invalid audio data is discarded;
and the playing unit is used for playing the audio data when the audio data is valid audio data.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a first view of an example of interaction between a smart television and a mobile device according to an embodiment of the present application;
fig. 2 is a schematic diagram of a connection state between a mobile terminal and a smart television according to an embodiment of the present application;
fig. 3 is a schematic diagram of a first user interface of a mobile terminal according to an embodiment of the present disclosure;
fig. 4 is a schematic diagram of a second user interface of a mobile terminal according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a third user interface of a mobile terminal according to an embodiment of the present application;
fig. 6 is a schematic diagram of an audio transmitting method according to an embodiment of the present application;
fig. 7 is a schematic diagram illustrating an audio playing method according to an embodiment of the present application;
fig. 8 is a schematic diagram of an overall process of delay optimization according to an embodiment of the present application;
fig. 9 is a schematic diagram of an intelligent terminal according to an embodiment of the present application;
fig. 10 is a schematic diagram of an intelligent terminal according to an embodiment of the present application;
fig. 11 is a schematic diagram of an intelligent terminal according to an embodiment of the present application;
fig. 12 is a schematic diagram of an intelligent terminal further provided in the embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Various embodiments of the present application will be described in detail below with reference to the accompanying drawings. It should be noted that the display sequence of the embodiment of the present application only represents the sequence of the embodiment, and does not represent the merits of the technical solutions provided by the embodiments.
In the following description, numerous specific details are set forth to provide a more thorough explanation of embodiments of the present invention. It will be apparent, however, to one skilled in the art that the specific details may not be employed to practice embodiments of the present invention.
The term "live television" as used in this application refers to television production broadcast in real time or substantially synchronized with the time of occurrence of an event.
The term "video on demand" (VOD) as used in this application refers to systems and processes that allow a user to select and view/listen to video or audio content on demand. The VOD system may stream the content to view the real-time content or download it to a storage medium for later review.
As used in this application, the terms "determine," "calculate," and "computer" and variations thereof are used interchangeably and include any type of methodology, procedure, mathematical operation or technique.
The embodiment of the application provides an application scene of interaction between an intelligent television and a mobile terminal.
Reference is made to some embodiments of the smart tv 100 shown in fig. 1. The smart tv 100 may be used for entertainment, business applications, social interactions, content creation and/or consumption, and/or further include one or more other devices for organizing and controlling communications with the smart tv 100. It can therefore be appreciated that smart tv can be used to enhance the user interaction experience, whether at home or at work.
In some instances, the smart tv 100 may be configured to receive and understand various user and/or device inputs. A mobile terminal, such as a smart phone, a tablet, a computer, a notebook, a netbook, and other smart devices may be used to control the smart tv 100. For example, the smart tv 100 is controlled using an application running on the smart device.
In some examples, smart tv 100 may be configured to receive input through a variety of input devices, including, but in no way limited to, video, audio, radio, light, tactile, and combinations thereof. For example, the user may speak with the smart tv 100 in a conversational manner. The smart television 100 receives and understands voice commands like intelligent personal assistants and voice-controlled navigation applications (such as Siri for apple, Skyvi for android, Robin, Iris, and others) that are smart devices.
The operation steps of the user interface interaction of the mobile terminal provided by the embodiment of the application mainly comprise:
fig. 2 is a schematic diagram of a connection state between a mobile terminal and a smart television according to an embodiment of the present application. When the intelligent television interacts with the mobile terminal, the mobile terminal can send the intelligent television through various connection protocols and suggest communication connection with the intelligent television, and the mobile terminal can carry out remote control operation on the intelligent television or is provided with an application program capable of controlling the intelligent television.
As shown in fig. 3-5, when receiving and responding to an instruction for starting a remote control application of a smart television, a mobile terminal may start the remote control application, and present a first user interface capable of controlling the smart television, where the first user interface includes a main control area and a function selection area, where the main control area includes a volume control area and a program switching area; the function selection area at least comprises an acoustic tab. The mobile terminal can realize interaction with the smart television through operation on the user interface. Illustratively, when a user inputs an instruction in the volume control area, the volume output of the smart television end can be controlled.
And receiving and responding to the selection of the voice transmission option card, and presenting a second user interface, wherein the second user interface displays prompt information of a device currently playing voice as the audio data sending end, and is used for switching the voice playing end to a voice transmission switching option bar of the mobile terminal.
And receiving and responding to the instruction of selecting the voice transmission switching option bar, switching the equipment for playing the voice into the mobile equipment, and presenting a third user interface, wherein the third user interface displays prompt information of the equipment for playing the voice currently as the mobile terminal. In the process of sound transmission switching, the intelligent television end adjusts the volume of the audio player of the intelligent television end to be mute or 0, so that the audio data is still played in the audio player but is not output from a loudspeaker, and the audio data is collected, recorded and transmitted to the mobile terminal.
After receiving an audio transmission instruction of the mobile terminal, the smart television encodes the collected audio data into a Pulse Code Modulation (PCM) data stream, and transmits the PCM data stream to the mobile device through a network, and the mobile device plays the television sound in real time.
Specifically, on an intelligent television system developed based on a Linux or Android system, by using an audio capture coding function provided by a main processing Chip (CPU) of the entire television, sound of a current screen of the television is captured according to a certain sampling format (8KHz sampling rate, 16Bit sampling precision, dual channels), audio stream data in a PCM format is provided and is transmitted to an intelligent mobile phone through a wired network or a wireless network, and after receiving the audio stream data, the intelligent mobile terminal directly transmits the data to a hardware player for playing.
In the real-time audio listening process, the television continuously records the sound of the system and sends the sound to the mobile terminal through the network. At a television end, analyzing an effective audio data frame in real time before sending the recorded sound, and sending the effective audio data in real time; if the television does not play sound or video files, the sound recorded by the television is continuous 0x00(0x00 represents a 16-system number, and 0x is a 16-system prefix), and for the invalid data frames (null data) which are all 0x00, the network data volume of one frame is also occupied in the transmission process; after the mobile terminal receives the data, the data is added into the buffer memory of the player, the play buffer memory of the mobile phone system is also added, if special processing is carried out on the invalid data frame (for the data which is all 0x00, no sound is played by the player) and then the invalid data frame is sent to the mobile terminal, the network transmission load can be greatly reduced, and meanwhile, the play buffer memory of the mobile phone system is reduced, so that the real-time play delay of the audio is effectively optimized.
For example, at a television end, referring to fig. 6, an audio transmitting method provided in an embodiment of the present application includes:
s101, collecting currently played audio data;
in the real-time audio listening process, the television continuously records the sound being played by the system, that is, continuously collects the audio data of the currently played program. In the recording process, the television end does not detect whether the audio file is output at the moment, but is always in the recording stage.
S102, if the audio data are invalid audio data, adding invalid audio data indication information into the audio data, and compressing the audio data to generate an invalid audio data packet;
and S103, sending the invalid audio data packet to an audio data receiving end. Or, if the audio data collected by the television end is invalid audio data, the television end does not send the invalid audio data to the audio data receiving end.
For example, it is assumed that the user selects to start the voice transmission instruction during the playing of the football program, and the television starts recording. In the recording process, the user quits playing the football program due to misoperation or reselecting or browsing the watching program, at this time, the audio player does not actually play the audio data, but the recording is not terminated, so that the audio data collected by the television end is empty during the period without playing the football program, and the audio data is invalid audio data.
And if the acquired audio data is a complete frame of audio data and all characters of the frame of audio data are 0, determining that the audio data is invalid audio data. That is, this frame of audio data is all 0x 00. A frame of audio data that is all 0x00 is now referred to as invalid audio data.
Specifically, whether a frame of audio data is invalid data is judged, a circular detection can be performed on left and right bytes of a frame of data, and if one byte in the audio data is not 0x00, the audio data is determined to be valid audio data; if each byte in the audio data is 0x00, determining that the audio data is invalid audio data.
If the audio data is invalid audio data, adding invalid audio data indication information in the audio data, compressing the audio data, and generating an invalid audio data packet, specifically comprising:
judging whether all the audio data are invalid bytes;
and if all the audio data are invalid bytes, adding invalid audio data indication information in the invalid bytes, and compressing the invalid audio data to generate an invalid audio data packet.
As described above, in an intelligent television system developed based on Linux or Android system, using an audio capture coding function provided by a main processing Chip (CPU) of the entire television to capture sound of a current screen of the television according to a certain sampling format (8KHz sampling rate, 16Bit sampling precision, dual channels), providing audio stream data in PCM format, after the television collects audio data, packaging the audio data, and sending the audio data to the mobile phone, where the data packet includes the collected audio data and the current system time packaging format as shown in table 1:
TABLE 1 Audio data packet
Time (length 8Byte) Audio data (length 640Byte)
The method for calculating the size of each frame of audio data comprises the following steps:
the audio sampling rate is 8000Hz, the sampling channel is 2, the bit depth is 16, the sampling interval is 20ms, and then the calculation formula of the size of each frame of audio data is as follows:
Figure BDA0001914331460000081
when the intelligent television collects audio data, a frame of data normally occupies 640 bytes, and if the audio data is effective audio data, the 640 bytes of effective audio data are sent to the audio data receiving end. If the audio data is invalid data, the invalid data frames of all 0x00 occupy the network data amount of one frame in the transmission process, and after receiving the invalid data frames of all 0x00, the mobile terminal writes into the buffer of the player, and the play buffer of the mobile phone system is also increased.
In the embodiment of the present application, the invalid audio data is compressed, and the audio data of the segment of all 0x00 is compressed into M bytes instead of transmitting 640 bytes completely, that is, the invalid audio data is reassigned to a data stream of M characters, and the compressed audio data is specifically represented as 0x 000 x 000 x 000 x 000 x 000 x 000 x 000 x 000 x 000 x 000 x 000 x 000 x 000 x 00. Wherein M is a positive integer less than 640. Optionally, M is more than or equal to 1 and less than or equal to 100.
In the embodiment of the application, the transmission of the invalid audio data is also used for maintaining the communication connection between the smart television and the mobile terminal. If it is specified that the intelligent television and the mobile terminal need to transmit one data packet every 20ms to ensure communication connection, when the intelligent television does not transmit an audio data packet for 20ms, the connection is disconnected, so that the mobile terminal cannot receive the audio data in real time when valid audio data is transmitted at the next moment. Therefore, although there is no actual audio data, the tv side will send a data packet to the mobile terminal every 20 ms.
After the invalid data is compressed, in order to make the mobile terminal recognize after receiving the invalid data so as not to need to transmit the invalid data to the player thereof, an indication message for indicating that the data in the data packet is invalid data is added before the compressed data. Illustratively, the first N-bit bytes are added before the M bytes, where N is a natural number. The indication information is located in the first 5 bytes of the audio data, and the indication information may be specifically represented as 0x010x 020 x 030 x 040 x05, and it may be predefined with the audio data receiving end which characters are used for indicating whether the audio data is valid or not.
The generated invalid data packet comprises invalid audio data indication information and compressed M-bit invalid audio data.
For example, the invalid audio data indication information is 0x010x 020 x 030 x 040 x05, the segment of audio data which is all 0x00 is compressed into 20 bytes, that is, the segment of invalid audio data is reassigned into a data stream of 20 characters, and the compressed audio data is specifically represented as 0x010x 020 x 030 x 040 x 050 x 000 x 000 x 000 x 000 x 000 x 000 x 000 x 000 x 00.
Optionally, before the acquiring the audio data of the currently played content, the method further includes:
and controlling the intelligent terminal to enter a recording state, and recording the audio of the intelligent terminal.
Accordingly, for example, in a mobile terminal, referring to fig. 7, an audio playing method provided in an embodiment of the present application includes:
s201, receiving audio data sent by an audio data sending end;
s202, analyzing the audio data, and if the audio data is invalid, discarding the invalid audio data.
For example, the audio data transmitting end is a television end. And when the audio data received by the mobile terminal is invalid audio data, discarding the invalid audio data and not writing the invalid audio data into the cache of the mobile phone player. And when the audio data is valid audio data, playing the audio data.
Optionally, after receiving audio data sent by an audio data sending end, judging whether the audio data is invalid audio data according to indication information in the audio data;
illustratively, the indication information is located in the first N-bit bytes of the audio data, where N is a natural number. For example, the indication information is located in the first 5 bytes of the audio data, and the indication information may specifically be represented as 0x010x 020 x 030 x 040 x05, and it may be predefined with the sending end of the audio data which characters are used for indicating whether the audio data is valid or not.
Optionally, when the audio data is valid audio data, playing the audio data specifically includes: and when the audio data is determined to be valid audio data, storing the valid audio data into a play cache.
The method comprises the steps that before the mobile phone plays audio data, the audio data received by an upper layer are placed in a buffer queue, when a system player of the mobile phone plays the audio data, the data are taken from the buffer queue, after the playing is finished, the played data are deleted from the buffer queue, and if the data are written into the buffer queue too fast by the upper layer application and the data are taken from the buffer queue relatively slowly by the player, more and more buffer data in the queue are obtained.
Referring to fig. 8, a general flowchart for delay optimization provided in the embodiment of the present application, a general specific processing flow of a television and a mobile terminal includes:
after receiving the connection of the mobile phone, the television end captures the sound of the whole machine (television end) and judges whether the captured sound is an effective audio, and the specific judgment method is as follows:
after the television terminal collects a frame of audio data, judging whether the frame of data is all 0x00, that is, judging whether 640 bytes of data collected by the television terminal at one time are all 0x00, and if all the data are 0x00, defining the data as invalid audio data; if the frame data is not all 0x00 and consists of some data, such as 0x12, it indicates that the data is valid audio data.
When the data collected by the television end is effective audio data, the effective audio data is sent to the mobile terminal frame by frame; when the data collected by the television end is invalid audio data, firstly, optimizing the invalid audio data, that is, reassigning the invalid audio data with 640 bytes of data all being 0x00 into a data stream (or dummy data) with 20 characters, for example, in the data stream with 20 characters, the first five bits may be defined as 0x010x 020 x 030 x 040 x05 (i.e., indication information for indicating invalid audio data, the indication information is not limited to 0x010x 020 x 030 x 040 x05, and may also be defined as 0x010x 010x 020 x 020 x02, and the following 15 bits are all 0x00, and may be specifically represented as 0x010x 020 x 030 x 040 x 050 x 000 x 000 x 000 x 000 x 000 x 000 x 000 x 000 x00, so that the invalid audio data with 640 bytes is compressed into 20 bytes of data; the television side sends the 20 bytes of data to the mobile terminal.
When the mobile terminal receives the audio data packet stream sent by the television, it is first determined whether the received audio data is valid audio data, and if the mobile terminal receives the data stream with 20 bytes: 0x010x 020 x 030 x 040 x 050 x 000 x 000 x 000 x 000 x 000 x 000 x 000 x 000 x 000 x 000 x 000 x 000 x00, determining that the received data is invalid audio data (the invalid audio data has no sound at the television end) by judging the first 5 bits of the data, not writing the data into the cache of the mobile phone player, and discarding the invalid audio data (so that the function of clearing the audio cache data of the mobile phone system can be achieved); if the mobile terminal receives a data stream with 640 bytes instead of the data with 20 bytes, the received data is determined to be valid audio data, and the valid audio data is written into the buffer memory of the mobile phone player.
Correspondingly, on the device side, referring to fig. 9, an embodiment of the present application provides an intelligent terminal, including:
a receiving unit 11, configured to receive a voice instruction sent by an audio data receiving end;
the acquisition unit 12 is used for acquiring currently played audio data;
the processing unit 13 is configured to add invalid audio data indication information to the audio data if the audio data is invalid audio data, and compress the audio data to generate an invalid audio data packet;
a sending unit 14, configured to send the invalid audio data packet to the audio data receiving end.
On the device side, referring to fig. 10, an intelligent terminal provided in an embodiment of the present application includes:
a receiving unit 21, configured to receive audio data sent by an audio data sending end;
the processing unit 22 is configured to analyze the audio data, and if the audio data is invalid, discard the invalid audio data;
a playing unit 23, configured to play the audio data when the audio data is valid audio data.
Referring to fig. 11, an embodiment of the present application further provides an intelligent terminal, including:
the processor 600, for reading the program in the memory 610, executes the following processes:
collecting currently played audio data;
if the audio data is invalid audio data, adding invalid audio data indication information in the audio data, and compressing the audio data to generate an invalid audio data packet;
and sending the invalid audio data packet to an audio data receiving end.
Through the device, audio data played currently are collected; if the audio data is invalid audio data, adding invalid audio data indication information in the audio data, and compressing the audio data to generate an invalid audio data packet; and sending the invalid audio data packet to an audio data receiving end, thereby reducing the network transmission burden and optimizing the real-time playing delay of the audio.
Optionally, if the audio data is valid audio data, the valid audio data is sent to the audio data receiving end.
Optionally, if the audio data is invalid audio data, adding invalid audio data indication information to the audio data, and compressing the audio data to generate an invalid audio data packet, specifically including:
judging whether all the audio data are invalid bytes;
and if all the audio data are invalid bytes, adding invalid audio data indication information in the invalid bytes, and compressing the invalid audio data to generate an invalid audio data packet.
Optionally, the collected audio data is a complete frame of audio data, and all characters of the frame of audio data are 0, and the audio data is determined to be invalid audio data.
Optionally, before the acquiring the audio data of the currently played content, the method further includes:
and controlling the intelligent terminal to enter a recording state, and recording the audio of the intelligent terminal. Referring to fig. 12, an embodiment of the present application further provides an intelligent terminal, including:
a processor 800 for reading the program in the memory 810 and executing the following processes:
receiving audio data sent by an audio data sending end;
and analyzing the audio data, and if the audio data is invalid audio data, discarding the invalid audio data.
Receiving audio data sent by an audio data sending end through the intelligent terminal; and analyzing the audio data, and if the audio data is invalid audio data, discarding the invalid audio data, thereby reducing the play cache of an audio data receiving end and optimizing the real-time play delay of the audio.
Optionally, when the audio data is valid audio data, the audio data is played. Optionally, after receiving audio data sent by an audio data sending end, judging whether the audio data is invalid audio data according to indication information in the audio data;
optionally, the indication information is located in the first N-bit bytes of the audio data, where N is a natural number.
Optionally, when the audio data is valid audio data, playing the audio data specifically includes: and when the audio data is determined to be valid audio data, storing the valid audio data into a play cache.
Where in fig. 11 or 12, the bus architecture may include any number of interconnected buses and bridges, with one or more processors represented by a processor and various circuits of memory represented by memory being linked together. The bus architecture may also link together various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. The bus interface provides an interface.
The embodiment of the application provides a display terminal, which may be specifically a desktop computer, a portable computer, a smart phone, a tablet computer, a Personal Digital Assistant (PDA), and the like. The Display terminal may include a Central Processing Unit (CPU), a memory, an input/output device, etc., the input device may include a keyboard, a mouse, a touch screen, etc., and the output device may include a Display device, such as a Liquid Crystal Display (LCD), a Cathode Ray Tube (CRT), etc.
For different display terminals, the user interfaces 620 and 820 may optionally be interfaces capable of interfacing externally to desired devices, including but not limited to keypads, displays, speakers, microphones, joysticks, and the like.
The processor is responsible for managing the bus architecture and the usual processing, and the memory may store data used by the processor in performing operations.
Alternatively, the processor may be a CPU (central processing unit), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or a CPLD (Complex Programmable Logic Device).
The memory may include Read Only Memory (ROM) and Random Access Memory (RAM), and provides the processor with program instructions and data stored in the memory. In the embodiments of the present application, the memory may be used for storing a program of any one of the methods provided by the embodiments of the present application.
The processor is used for executing any one of the methods provided by the embodiment of the application according to the obtained program instructions by calling the program instructions stored in the memory.
Embodiments of the present application provide a computer storage medium for storing computer program instructions for an apparatus provided in the embodiments of the present application, which includes a program for executing any one of the methods provided in the embodiments of the present application.
The computer storage media may be any available media or data storage device that can be accessed by a computer, including, but not limited to, magnetic memory (e.g., floppy disks, hard disks, magnetic tape, magneto-optical disks (MOs), etc.), optical memory (e.g., CDs, DVDs, BDs, HVDs, etc.), and semiconductor memory (e.g., ROMs, EPROMs, EEPROMs, non-volatile memory (NAND FLASH), Solid State Disks (SSDs)), etc.
To sum up, the method for sending and playing the audio and the intelligent terminal provided by the embodiment of the application are used for reducing the network transmission burden and reducing the playing buffer of the audio data receiving end, thereby optimizing the real-time playing delay of the audio.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (10)

1. An audio transmission method, comprising:
collecting currently played audio data;
if the audio data is invalid audio data, adding invalid audio data indication information in the audio data, and compressing the audio data to generate an invalid audio data packet;
sending the invalid audio data packet to an audio data receiving end;
if the audio data is invalid audio data, adding invalid audio data indication information to the audio data, compressing the audio data, and generating an invalid audio data packet, specifically comprising:
judging whether all the audio data are invalid bytes;
if all the audio data are invalid bytes, adding invalid audio data indication information in the invalid bytes, and compressing the invalid audio data to generate an invalid audio data packet;
and if at least one byte in the audio data is a valid byte, determining that the audio data is valid data.
2. The method of claim 1, further comprising:
and if the audio data is valid audio data, sending the valid audio data to the audio data receiving end.
3. The method of claim 1, wherein the audio data is a complete frame of audio data, and all characters of the frame of audio data are 0, and the audio data is determined to be invalid audio data.
4. The method of claim 1, prior to said capturing currently playing audio data, further comprising:
and controlling the intelligent terminal to enter a recording state, and recording the audio of the intelligent terminal.
5. An audio playing method, comprising:
receiving audio data sent by an audio data sending end;
analyzing the audio data, and judging whether the audio data is invalid audio data according to the indication information in the audio data; if the audio data is invalid audio data, discarding the invalid audio data;
the indication information is added by the audio data sending end according to the following mode:
judging whether all the collected audio data currently played are invalid bytes;
if all the audio data are invalid bytes, determining that the audio data are invalid audio data, and adding the indication information into the invalid bytes; and if at least one byte in the audio data is a valid byte, determining that the audio data is valid data.
6. The method of claim 5, further comprising:
and when the audio data is valid audio data, playing the audio data.
7. The method of claim 5, wherein the indication information is located in the first N-bit bytes of the audio data, where N is a natural number.
8. The method according to claim 5, wherein when the audio data is valid audio data, playing the audio data specifically comprises: and when the audio data is determined to be valid audio data, storing the valid audio data into a play cache.
9. An intelligent terminal, comprising:
the receiving unit is used for receiving the voice instruction sent by the audio data receiving end;
the acquisition unit is used for acquiring currently played audio data;
the processing unit is used for adding invalid audio data indication information into the audio data if the audio data is invalid audio data, compressing the audio data and generating an invalid audio data packet;
the transmitting unit is used for transmitting the invalid audio data packet to the audio data receiving end;
the processing unit is configured to, if the audio data is invalid audio data, add invalid audio data indication information to the audio data, compress the audio data, and generate an invalid audio data packet, and specifically configured to:
judging whether all the audio data are invalid bytes;
if all the audio data are invalid bytes, adding invalid audio data indication information in the invalid bytes, and compressing the invalid audio data to generate an invalid audio data packet;
and if at least one byte in the audio data is a valid byte, determining that the audio data is valid data.
10. An intelligent terminal, comprising:
the receiving unit is used for receiving the audio data sent by the audio data sending end;
the processing unit is used for analyzing the audio data and judging whether the audio data is invalid according to the indication information in the audio data; if the audio data is invalid audio data, discarding the invalid audio data;
the playing unit is used for playing the audio data when the audio data is valid audio data;
the indication information is added by the audio data sending end according to the following mode:
judging whether all the collected audio data currently played are invalid bytes;
if all the audio data are invalid bytes, determining that the audio data are invalid audio data, and adding the indication information into the invalid bytes; and if at least one byte in the audio data is a valid byte, determining that the audio data is valid data.
CN201811565099.4A 2018-12-20 2018-12-20 Audio sending and playing method and intelligent terminal Active CN109495776B (en)

Priority Applications (7)

Application Number Priority Date Filing Date Title
CN201811565099.4A CN109495776B (en) 2018-12-20 2018-12-20 Audio sending and playing method and intelligent terminal
EP19898733.1A EP3902271A4 (en) 2018-12-20 2019-09-09 Audio playback and sending method and device
PCT/CN2019/104971 WO2020125076A1 (en) 2018-12-20 2019-09-09 Audio playback and sending method and device
CN201980079748.6A CN113261300B (en) 2018-12-20 2019-09-23 Audio sending and playing method and smart television
PCT/CN2019/107265 WO2020125110A1 (en) 2018-12-20 2019-09-23 Audio sending and playback methods and smart television
US16/588,510 US11190836B2 (en) 2018-12-20 2019-09-30 Audio playing and transmitting methods and apparatuses
US17/512,912 US11871075B2 (en) 2018-12-20 2021-10-28 Audio playing and transmitting methods and apparatuses

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811565099.4A CN109495776B (en) 2018-12-20 2018-12-20 Audio sending and playing method and intelligent terminal

Publications (2)

Publication Number Publication Date
CN109495776A CN109495776A (en) 2019-03-19
CN109495776B true CN109495776B (en) 2021-02-05

Family

ID=65711075

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811565099.4A Active CN109495776B (en) 2018-12-20 2018-12-20 Audio sending and playing method and intelligent terminal

Country Status (1)

Country Link
CN (1) CN109495776B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11190836B2 (en) 2018-12-20 2021-11-30 Hisense Visual Technology Co., Ltd. Audio playing and transmitting methods and apparatuses
WO2020125076A1 (en) * 2018-12-20 2020-06-25 青岛海信电器股份有限公司 Audio playback and sending method and device
CN113763918A (en) * 2021-08-18 2021-12-07 单百通 Text-to-speech conversion method and device, electronic equipment and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005184383A (en) * 2003-12-18 2005-07-07 Sony Corp System, apparatus and method for real-time data communication
CN102800324A (en) * 2012-07-30 2012-11-28 东莞宇龙通信科技有限公司 Audio processing system and method for mobile terminals
CN102971788A (en) * 2010-04-13 2013-03-13 弗兰霍菲尔运输应用研究公司 Method and encoder and decoder for gapless playback of an audio signal
CN105430436A (en) * 2015-10-30 2016-03-23 青岛海尔智能家电科技有限公司 Method and device of sharing television audios by mobile terminals

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005184383A (en) * 2003-12-18 2005-07-07 Sony Corp System, apparatus and method for real-time data communication
CN102971788A (en) * 2010-04-13 2013-03-13 弗兰霍菲尔运输应用研究公司 Method and encoder and decoder for gapless playback of an audio signal
CN102800324A (en) * 2012-07-30 2012-11-28 东莞宇龙通信科技有限公司 Audio processing system and method for mobile terminals
CN105430436A (en) * 2015-10-30 2016-03-23 青岛海尔智能家电科技有限公司 Method and device of sharing television audios by mobile terminals

Also Published As

Publication number Publication date
CN109495776A (en) 2019-03-19

Similar Documents

Publication Publication Date Title
US11336953B2 (en) Video processing method, electronic device, and computer-readable medium
US11930197B2 (en) Video decoding method and apparatus, computer device, and storage medium
CN109495776B (en) Audio sending and playing method and intelligent terminal
US11871075B2 (en) Audio playing and transmitting methods and apparatuses
CN107682752B (en) Method, device and system for displaying video picture, terminal equipment and storage medium
CN103379379B (en) Streaming media buffer playing method and device
CN112272170B (en) Voice communication method and device, electronic equipment and storage medium
CN110662017B (en) Video playing quality detection method and device
TW201729187A (en) System and method for controlling memory frequency using feed-forward compression statistics
CN111352605A (en) Audio playing and sending method and device
WO2018171548A1 (en) Decoding method, terminal and computer-readable storage medium
US8868419B2 (en) Generalizing text content summary from speech content
KR20140092517A (en) Compressing Method of image data for camera and Electronic Device supporting the same
CN108259998B (en) Player, play control method and device, electronic equipment and play system
US11908481B2 (en) Method for encoding live-streaming data and encoding device
CN104376859B (en) The method and online music player of a kind of playlist adjust automatically
CN109495699B (en) Video playing switching method and device
CN113261300B (en) Audio sending and playing method and smart television
WO2024051823A1 (en) Method for managing reception information and back-end device
WO2023083213A1 (en) Data decoding method and apparatus, electronic device and readable storage medium
CN111355996A (en) Audio playing method and computing device
CN116170632A (en) Sound compensation method and device
CN114422840A (en) Audio track switching method and device
CN112311491A (en) Multimedia data acquisition method and device, storage medium and electronic equipment
CN106341519B (en) Audio data processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 266555 Qingdao economic and Technological Development Zone, Shandong, Hong Kong Road, No. 218

Applicant after: Hisense Visual Technology Co., Ltd.

Address before: 266100 Zhuzhou Road, Laoshan District, Shandong, No. 151, No.

Applicant before: QINGDAO HISENSE ELECTRONICS Co.,Ltd.

GR01 Patent grant
GR01 Patent grant