CN116017035A - K song method and device of intelligent television - Google Patents

K song method and device of intelligent television Download PDF

Info

Publication number
CN116017035A
CN116017035A CN202211631311.9A CN202211631311A CN116017035A CN 116017035 A CN116017035 A CN 116017035A CN 202211631311 A CN202211631311 A CN 202211631311A CN 116017035 A CN116017035 A CN 116017035A
Authority
CN
China
Prior art keywords
microphone
audio
equipment
audio data
song
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.)
Pending
Application number
CN202211631311.9A
Other languages
Chinese (zh)
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.)
Sichuan Changhong Electric Co Ltd
Original Assignee
Sichuan Changhong Electric 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 Sichuan Changhong Electric Co Ltd filed Critical Sichuan Changhong Electric Co Ltd
Priority to CN202211631311.9A priority Critical patent/CN116017035A/en
Publication of CN116017035A publication Critical patent/CN116017035A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The invention relates to the technical field of television audio, discloses a K song method and a device of an intelligent television, and aims to solve the problem of poor generality of the K song method of the existing intelligent television, wherein the scheme mainly comprises the following steps: after detecting that equipment is connected with the intelligent television, acquiring equipment information of the equipment, and judging whether the equipment is a microphone according to the equipment information of the equipment; initializing equipment parameters of the microphone, opening the microphone through ALSA audio drive, and reading audio data collected by the microphone; judging whether the data format of the audio data is consistent with the data format of the audio output equipment, if so, sending the audio data to the audio output equipment for playing through an ALSA audio driver, otherwise, sending the audio data to the audio output equipment for playing through the ALSA audio driver after format conversion. The invention realizes the function of K song of any microphone under any interface.

Description

K song method and device of intelligent television
Technical Field
The invention relates to the technical field of television audio, in particular to a K song method and device of an intelligent television.
Background
Television has long been given karaoke application scenarios as a living room video entertainment center. In the existing smart television system, to realize the karaoke function, a microphone, usually a USB wireless microphone, needs to be connected, and the television system must be specially docked with a manufacturer of the microphone to run the services of the manufacturer and realize the karaoke function. If microphones are to be supported by multiple vendors, it is necessary to interface with each vendor at the same time. If an unpaired microphone is accessed, it cannot be used. Meanwhile, even if microphones of manufacturers are connected, the supporting conditions of each manufacturer on the K songs of any interface are different, and the existing microphones only support singing under the application and cannot support the K songs under any interface.
Because of the lack of unified system-level K song service, the support range of the television to the K song microphone is limited, a user must know microphone manufacturers supported by specific television models and purchase correct microphone models to use normally, the use difficulty of the user is increased, and the universality is poor. If a television interfaces with multiple vendor microphones, each will have its own application, causing confusion to the user as to which setting application should be used to adjust the microphone effect. If a microphone incapable of supporting any interface Ksong is connected, the use scene of the user is also greatly limited.
Disclosure of Invention
The invention aims to solve the problem of poor universality of a K song method of the existing intelligent television, and provides another K song method and device of the intelligent television.
The technical scheme adopted by the invention for solving the technical problems is as follows:
in one aspect, a method for singing a smart television is provided, which includes the following steps:
step 1, after detecting that equipment is connected with an intelligent television, acquiring equipment information of the equipment, judging whether the equipment is a microphone according to the equipment information of the equipment, and if so, entering step 2;
step 2, initializing equipment parameters of the microphone, opening the microphone through ALSA audio drive, and reading audio data collected by the microphone;
and 3, judging whether the data format of the audio data is consistent with the data format of the audio output equipment, if so, sending the audio data to the audio output equipment for playing through an ALSA audio driver, otherwise, sending the audio data to the audio output equipment for playing through the ALSA audio driver after format conversion.
Further, the format conversion of the audio data specifically includes: the number of channels and the sampling rate of the audio data are converted.
Further, in the step 2, after the microphone is turned on by the ALSA audio driving, the method further includes:
and controlling the intelligent television to open the full scene K song function.
Further, the method further comprises:
and after the disconnection of the microphone and the intelligent television is detected, acquiring the equipment information of the microphone, judging whether the microphone is an effective microphone according to the equipment information of the microphone, if so, stopping the K song process, and exiting the full scene K song function.
Further, the method further comprises:
judging whether the data format of the audio data collected by the microphone is consistent with the data format required by the current application of the intelligent television, if so, sending the audio data to the current application through the audio middleware, otherwise, sending the audio data to the current application after format conversion;
the current application performs a K-song scoring based on the received audio data.
On the other hand, provide a K of smart TV sings device, including setting up in the K of smart TV sings service middleware, K sings service middleware is used for:
after detecting that equipment is connected with the intelligent television, acquiring equipment information of the equipment, and judging whether the equipment is a microphone according to the equipment information of the equipment; initializing equipment parameters of a microphone when the microphone is judged, opening the microphone through ALSA audio drive, and reading audio data collected by the microphone; and judging whether the data format of the audio data is consistent with the data format of the audio output equipment, if so, sending the audio data to the audio output equipment for playing through an ALSA audio driver, otherwise, sending the audio data to the audio output equipment for playing through the ALSA audio driver after format conversion.
Further, the format conversion of the audio data specifically includes: the number of channels and the sampling rate of the audio data are converted.
Further, the K song service middleware is further configured to:
after the microphone is turned on through the ALSA audio driver, the intelligent television is controlled to enter any K song software interface.
Further, the K song service middleware is further configured to:
and after the disconnection of the microphone and the intelligent television is detected, acquiring the equipment information of the microphone, judging whether the microphone is an effective microphone according to the equipment information of the microphone, if so, stopping the K song process, and exiting the K song software interface.
Further, the K song service middleware is further configured to:
and judging whether the data format of the audio data acquired by the microphone is consistent with the data format required by the current application of the intelligent television, if so, sending the audio data to the current application through the audio middleware, otherwise, sending the audio data to the current application after format conversion, wherein the current application is used for carrying out K song scoring according to the received audio data.
The beneficial effects of the invention are as follows: according to the method and the device for the K song of the intelligent television, the K song service is integrated in the television system, and the standard ALSA IO Interface interface provided by the ALSA audio driver is used, so that the function of K song of any microphone under any interface is realized. Compared with the prior art, the invention does not need to be in systematic butt joint with a specific microphone manufacturer, all microphones can realize the K song of the whole scene, and all microphones are managed by one service, so that the occupation of system resources is reduced, and the difficulty of purchasing and using the microphones by users is reduced.
Drawings
Fig. 1 is a flow diagram of a karaoke method of an intelligent television according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a K song service middleware according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating audio data format conversion according to an embodiment of the present invention.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
The invention aims to provide a K song method and device of an intelligent television, which are used for realizing the function of K song of any microphone under any interface, and the main technical scheme comprises the following steps: after detecting that equipment is connected with the intelligent television, acquiring equipment information of the equipment, and judging whether the equipment is a microphone according to the equipment information of the equipment; initializing equipment parameters of a microphone when the microphone is judged, opening the microphone through ALSA audio drive, and reading audio data collected by the microphone; and judging whether the data format of the audio data is consistent with the data format of the audio output equipment, if so, sending the audio data to the audio output equipment for playing through an ALSA audio driver, otherwise, sending the audio data to the audio output equipment for playing through the ALSA audio driver after format conversion.
It will be appreciated that in a smart tv, all USB wireless microphones are managed as USB audio input devices. When the microphone is connected to the smart television, the system ALSA audio driver will create a corresponding PCM node for it to operate the device and read the data. Based on the method, the device access state management and the audio data processing of the microphone are realized by constructing a Karaoke Service middleware, wherein the device access state management mainly comprises the following steps: and detecting whether a microphone device is connected, if so, initializing device parameters of the microphone, and turning on the microphone through an ALSA audio driver. The audio data processing mainly comprises: and checking the data format of the audio data acquired by the microphone, if the data format of the audio data is inconsistent with the data format of the intelligent television loudspeaker, converting the data format of the audio data, and sending the converted data to an ALSA audio driver, so that the audio is played through the television loudspeaker.
Examples
Referring to fig. 1, the method for singing a smart television according to the embodiment of the invention includes the following steps:
step 1, after detecting that equipment is connected with an intelligent television, acquiring equipment information of the equipment, judging whether the equipment is a microphone according to the equipment information of the equipment, and if so, entering step 2;
referring to fig. 2, in this embodiment, a Karaoke Service middleware (Karaoke Service) is built on the smart tv to implement the function of a microphone on an interface Karaoke. Wherein, the K sings service middleware includes: the microphone equipment is connected with the state management module and the microphone audio data processing module.
Taking a USB wireless microphone as an example, when the USB wireless microphone device is connected and disconnected, the system broadcasts connection and disconnection information of the USB device. The microphone device access state management module monitors the information and starts the processing flow when the USB wireless microphone is accessed and removed.
The USB wireless microphone access processing flow is as follows:
1) After the USB equipment is connected to the intelligent television, the system transmits USB equipment connection broadcast.
2) And after receiving the USB device access broadcast, the Ksong service middleware extracts the device information of the USB device.
3) And the Ksong service middleware judges whether the USB equipment is a USB microphone according to the equipment information, and if so, the step 2 is entered.
Step 2, initializing equipment parameters of the microphone, opening the microphone through ALSA audio drive, and reading audio data collected by the microphone;
specifically, after the Ksong service middleware judges that the USB microphone is connected to the intelligent television, equipment information is captured, equipment parameters are initialized, the USB microphone is opened through ALSA audio drive, and after the USB microphone is opened, the Ksong service middleware reads audio data collected by the USB microphone from the ALSA audio drive.
In this embodiment, after turning on the microphone by the ALSA audio driving, it further includes: and controlling the intelligent television to open the full scene K song function.
After the full-scene K song function is opened, K songs can be carried out on the intelligent television at any interface or any scene, for example, K songs are carried out when the intelligent television plays network videos, and for example, K songs are carried out when the intelligent television plays digital televisions.
And 3, judging whether the data format of the audio data is consistent with the data format of the audio output equipment, if so, sending the audio data to the audio output equipment for playing through an ALSA audio driver, otherwise, sending the audio data to the audio output equipment for playing through the ALSA audio driver after format conversion.
It will be appreciated that the original audio streams obtained from USB microphones of different vendors may have different parameters such as channel number, bit rate, etc. of the audio data (e.g. sample rate 16k, 44.1k, 48k, etc. channels have mono, stereo, etc.). Referring to fig. 3, in order to match the input audio data with the data format of the audio output device (local speaker), in this embodiment, after the K song service middleware reads the audio data collected by the USB microphone from the ALSA audio driver, format conversion (channel number, sampling rate, etc.) is performed on the audio data input by the USB microphone, the format of the audio data required by the audio output device of the smart tv is unified (e.g. sampling rate 48K, channel stereo), and the converted audio data is sent to the ALSA audio driver, so that the audio is played from the local speaker.
In order to further enhance the user experience, this embodiment further includes: judging whether the data format of the audio data collected by the microphone is consistent with the data format required by the current application, if so, sending the audio data to the current application through the audio middleware, otherwise, sending the audio data to the current application after format conversion; the current application performs a K-song scoring based on the received audio data.
Specifically, when recording is applied, audio data is requested from the Audio middleware (Audio HAL) of the system to be input to the microphone. In order to enable an application to acquire Audio data of the USB microphone through a standard interface of the system, the K song service middleware needs to transmit the Audio data read from the USB microphone to the Audio HAL through a socket after certain processing, so that the Audio data is transmitted to the application through the standard interface of the system.
The audio data transmission flow is as follows:
1) And a socket communication pipeline is built between the Ksong service middleware and the system Audio middleware (Audio HAL), so that Audio data collected by the USB microphone is sent to the system.
2) The audio data formats required may be different for different applications of the recording. When the format parameters of the application requirements are inconsistent with the provided format parameters, parameter format conversion (such as the number of channels, sampling rate and the like) is performed first, and then the data format meeting the application requirements is sent to the Audio HAL.
The method of the embodiment further comprises the following steps: and after the disconnection of the microphone and the intelligent television is detected, acquiring the equipment information of the microphone, judging whether the microphone is an effective microphone according to the equipment information of the microphone, if so, stopping the K song process, and exiting the full scene K song function.
Specifically, after the user K songs are finished, the wireless microphone removing process is entered, which specifically includes:
1) After the USB microphone is removed, the system sends a USB device disconnect broadcast.
2) And after receiving the USB device removal broadcast, the KGege service middleware extracts the related information of the USB device.
3) And judging whether the USB microphone is the USB microphone which is currently in effect, if so, stopping the K song processing flow, and exiting the K song function of the whole scene.
Through the automatic termination K song processing flow after the USB microphone is removed, the whole scene K song function is exited simultaneously, the manual termination and the operation of exiting of a user are avoided, and the user experience is further improved.
In summary, in the K song method of the smart television according to the embodiment, the K song service middleware is constructed, and the microphone access state management and the audio data processing are realized by constructing the K song service middleware, so that the function of K song of any microphone under any interface is realized. And the system is not required to be in butt joint with a specific microphone manufacturer, all microphones can realize the K song of the whole scene, and the universality is improved. And all the microphones are managed through one service, so that the occupation of system resources is reduced, and the difficulty of purchasing and using the microphones by a user is reduced.
Based on the above technical scheme, this embodiment also provides a K song device of smart tv, including setting up in the K song service middleware of smart tv, K song service middleware is used for:
after detecting that equipment is connected with the intelligent television, acquiring equipment information of the equipment, and judging whether the equipment is a microphone according to the equipment information of the equipment; initializing equipment parameters of a microphone when the microphone is judged, opening the microphone through ALSA audio drive, and reading audio data collected by the microphone; and judging whether the data format of the audio data is consistent with the data format of the audio output equipment, if so, sending the audio data to the audio output equipment for playing through an ALSA audio driver, otherwise, sending the audio data to the audio output equipment for playing through the ALSA audio driver after format conversion.
It can be understood that, since the K song device of the smart television according to the embodiment of the present invention is a device for implementing the K song method of the smart television according to the embodiment, for the device disclosed in the embodiment, the description is simpler, and the relevant points refer to the part of the description of the method.

Claims (10)

1. The K song method of the intelligent television is characterized by comprising the following steps of:
step 1, after detecting that equipment is connected with an intelligent television, acquiring equipment information of the equipment, judging whether the equipment is a microphone according to the equipment information of the equipment, and if so, entering step 2;
step 2, initializing equipment parameters of the microphone, opening the microphone through ALSA audio drive, and reading audio data collected by the microphone;
and 3, judging whether the data format of the audio data is consistent with the data format of the audio output equipment, if so, sending the audio data to the audio output equipment for playing through an ALSA audio driver, otherwise, sending the audio data to the audio output equipment for playing through the ALSA audio driver after format conversion.
2. The method for singing a smart television according to claim 1, wherein the format conversion of the audio data specifically includes: the number of channels and the sampling rate of the audio data are converted.
3. The method for K song of smart tv according to claim 1, wherein in step 2, after turning on the microphone by ALSA audio driving, further comprises:
and controlling the intelligent television to open the full scene K song function.
4. The smart television K song method of claim 3, further comprising:
and after the disconnection of the microphone and the intelligent television is detected, acquiring the equipment information of the microphone, judging whether the microphone is an effective microphone according to the equipment information of the microphone, if so, stopping the K song process, and exiting the full scene K song function.
5. The method for singing a smart tv of any of claims 1 to 4, further comprising:
judging whether the data format of the audio data collected by the microphone is consistent with the data format required by the current application of the intelligent television, if so, sending the audio data to the current application through the audio middleware, otherwise, sending the audio data to the current application after format conversion;
the current application performs a K-song scoring based on the received audio data.
6. K of smart TV sings device, its characterized in that, including setting up in the K of smart TV sings service middleware, K sings service middleware is used for:
after detecting that equipment is connected with the intelligent television, acquiring equipment information of the equipment, and judging whether the equipment is a microphone according to the equipment information of the equipment; initializing equipment parameters of a microphone when the microphone is judged, opening the microphone through ALSA audio drive, and reading audio data collected by the microphone; and judging whether the data format of the audio data is consistent with the data format of the audio output equipment, if so, sending the audio data to the audio output equipment for playing through an ALSA audio driver, otherwise, sending the audio data to the audio output equipment for playing through the ALSA audio driver after format conversion.
7. The apparatus for singing a smart tv set as claimed in claim 6, wherein the format conversion of the audio data specifically includes: the number of channels and the sampling rate of the audio data are converted.
8. The smart tv of claim 6, wherein the K song service middleware is further configured to:
after the microphone is turned on through the ALSA audio driver, the intelligent television is controlled to enter any K song software interface.
9. The smart tv of claim 8, wherein the K song service middleware is further configured to:
and after the disconnection of the microphone and the intelligent television is detected, acquiring the equipment information of the microphone, judging whether the microphone is an effective microphone according to the equipment information of the microphone, if so, stopping the K song process, and exiting the K song software interface.
10. The apparatus for K-songs of a smart tv according to any one of claims 6 to 9, wherein the K-song service middleware is further configured to:
and judging whether the data format of the audio data acquired by the microphone is consistent with the data format required by the current application of the intelligent television, if so, sending the audio data to the current application through the audio middleware, otherwise, sending the audio data to the current application after format conversion, wherein the current application is used for carrying out K song scoring according to the received audio data.
CN202211631311.9A 2022-12-19 2022-12-19 K song method and device of intelligent television Pending CN116017035A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211631311.9A CN116017035A (en) 2022-12-19 2022-12-19 K song method and device of intelligent television

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211631311.9A CN116017035A (en) 2022-12-19 2022-12-19 K song method and device of intelligent television

Publications (1)

Publication Number Publication Date
CN116017035A true CN116017035A (en) 2023-04-25

Family

ID=86024112

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211631311.9A Pending CN116017035A (en) 2022-12-19 2022-12-19 K song method and device of intelligent television

Country Status (1)

Country Link
CN (1) CN116017035A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107481709A (en) * 2017-08-11 2017-12-15 腾讯音乐娱乐(深圳)有限公司 Audio data transmission method and device
CN107770628A (en) * 2016-08-23 2018-03-06 中兴通讯股份有限公司 One kind Karaoke realization method and system, intelligent household terminal
CN110083328A (en) * 2019-03-29 2019-08-02 北京奇艺世纪科技有限公司 A kind of audio frequency playing method, device, electronic equipment and storage medium
CN112489609A (en) * 2020-11-03 2021-03-12 深圳创维-Rgb电子有限公司 Microphone-based method, device, terminal and medium for automatically jumping K song block
CN113990275A (en) * 2021-09-08 2022-01-28 百度在线网络技术(北京)有限公司 Song requesting method and device, electronic equipment and computer readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107770628A (en) * 2016-08-23 2018-03-06 中兴通讯股份有限公司 One kind Karaoke realization method and system, intelligent household terminal
CN107481709A (en) * 2017-08-11 2017-12-15 腾讯音乐娱乐(深圳)有限公司 Audio data transmission method and device
CN110083328A (en) * 2019-03-29 2019-08-02 北京奇艺世纪科技有限公司 A kind of audio frequency playing method, device, electronic equipment and storage medium
CN112489609A (en) * 2020-11-03 2021-03-12 深圳创维-Rgb电子有限公司 Microphone-based method, device, terminal and medium for automatically jumping K song block
CN113990275A (en) * 2021-09-08 2022-01-28 百度在线网络技术(北京)有限公司 Song requesting method and device, electronic equipment and computer readable storage medium

Similar Documents

Publication Publication Date Title
US9147342B2 (en) Techniques for configuring and remotely controlling a multimedia system
CN100359463C (en) Architecture for optimizing audio and video output states for multimedia devices
CN1937852B (en) Audio playing system and audio playing control method
CN101479695A (en) Method and system for allowing a media player to transfer digital audio to an accessory
CN101754087A (en) Audio apparatus and method for auto sound calibration
WO2006129724A1 (en) Programmed recording system, mobile terminal device, recording device, and moving-image contents processing method
EP1439666A1 (en) Information processing apparatus and communication control method for use in the apparatus
JP2010074837A (en) Tuner module utilizing device-specific controller
WO2014090040A1 (en) Method of using a mobile device as a microphone, method of audio playback, and related device and system
CN104834623A (en) Audio playing method and audio playing device
US20140003617A1 (en) Wireless audio/video system for audio signal reproduction and control method for controlling the same
WO2020207373A1 (en) Method, device, terminal, and system for playing back multimedia resource
CN112272170A (en) Voice communication method and device, electronic equipment and storage medium
CN102103884B (en) Audio playing device
CN112235623B (en) Mobile intelligent household set top box and system thereof
CN116017035A (en) K song method and device of intelligent television
US20140163971A1 (en) Method of using a mobile device as a microphone, method of audio playback, and related device and system
CN103905851A (en) Multimedia resource playing method and video adapter
CN101022354A (en) Method and apparatus for providing broadcast content in UPnP network
CN110278089A (en) A kind of wireless session control system and control method and business method based on virtual USB device
EP1473882A2 (en) Method for distributing and reproducing the contents
US20070073632A1 (en) Setting up a communication connection using an embedded unique communication identifier
WO2016173455A1 (en) Method and device for realizing compatibility of secondary video
CN105828172A (en) Playing control method and device in audio-video playing system
TWI389567B (en) Internet TV playback system, playback method and the implementation of its computer program products

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