CN113825009B - Audio and video playing method and device, electronic equipment and storage medium - Google Patents
Audio and video playing method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN113825009B CN113825009B CN202111274227.1A CN202111274227A CN113825009B CN 113825009 B CN113825009 B CN 113825009B CN 202111274227 A CN202111274227 A CN 202111274227A CN 113825009 B CN113825009 B CN 113825009B
- Authority
- CN
- China
- Prior art keywords
- audio
- segmentation
- target
- time
- text
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 34
- 230000011218 segmentation Effects 0.000 claims abstract description 68
- 238000006243 chemical reaction Methods 0.000 claims abstract description 24
- 239000012634 fragment Substances 0.000 claims abstract description 21
- 238000004590 computer program Methods 0.000 claims description 12
- 230000005236 sound signal Effects 0.000 claims description 10
- 238000001228 spectrum Methods 0.000 claims description 9
- 238000001914 filtration Methods 0.000 claims description 7
- 238000009432 framing Methods 0.000 claims description 3
- 238000005070 sampling Methods 0.000 claims description 3
- 238000013473 artificial intelligence Methods 0.000 abstract description 6
- 238000005516 engineering process Methods 0.000 abstract description 4
- 230000006870 function Effects 0.000 description 10
- 238000004891 communication Methods 0.000 description 9
- 238000007726 management method Methods 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 238000000802 evaporation-induced self-assembly Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012552 review Methods 0.000 description 1
- 238000012216 screening Methods 0.000 description 1
- 230000003595 spectral effect Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing 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/432—Content retrieval operation from a local storage medium, e.g. hard-disk
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing 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/439—Processing of audio elementary streams
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing 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/44—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
The invention relates to artificial intelligence technology, and discloses an audio and video playing method, which comprises the following steps: performing audio conversion on the audio file to be played to obtain target audio; segmenting the target audio by using the mute segments in the target audio to obtain a plurality of segmented audio segments; converting each segmented audio fragment into segmented text, and marking the corresponding segmented text according to the starting time of the segmented audio fragment; displaying all the segmentation texts on a preset display interface according to the sequence of the marked starting time; when a text clicking operation is carried out on a display interface, identifying a segmentation text clicked by the clicking operation, and obtaining a target segmentation text; and performing fixed-point playing on the audio-video file to be played according to the starting time of the target segmentation text mark. The invention also relates to a blockchain technique, wherein the cut text can be stored in a blockchain node. The invention also provides an audio and video playing device, equipment and a medium. The invention can improve the efficiency of audio and video playing.
Description
Technical Field
The present invention relates to artificial intelligence technologies, and in particular, to an audio and video playing method, an audio and video playing device, an electronic device, and a storage medium.
Background
With the development of the video live broadcast industry, the more the live broadcast exposure problem is, the stronger the live broadcast instantaneity is, if the live broadcast is missed, the live broadcast video or audio needs to be watched back and played, and the place of interest is found. Video or audio content can be stored on a background server in real time, so that students who can not participate in live broadcast or want to consolidate knowledge points can conveniently review for many times;
But when the audio and video is back-watched and played at present, the user can only play or jump at double speed to search the wanted point or wanted point, and more time is required to find the needed audio and video content for playing, so that the efficiency of audio and video playing is lower.
Disclosure of Invention
The invention provides an audio and video playing method, an audio and video playing device, electronic equipment and a storage medium, and mainly aims to improve the efficiency of audio and video playing.
In order to achieve the above object, the present invention provides an audio/video playing method, including:
Acquiring a video file to be played, and performing audio conversion on the video file to be played to obtain target audio;
marking the mute segment of the target audio, and segmenting the target audio according to the marked mute segment to obtain a plurality of segmented audio segments;
Performing text conversion on each segmented audio fragment to obtain a corresponding segmented text, and marking the corresponding segmented text according to the starting time of the segmented audio fragment;
Displaying all the segmentation texts on a preset display interface according to the sequence of the marked starting time;
when a text clicking operation is carried out on the display interface, identifying a segmentation text clicked by the clicking operation to obtain a target segmentation text;
and playing the audio-video file to be played at fixed points according to the starting time of the target segmentation text mark.
Optionally, the mute segment marking the target audio includes:
framing the target audio by using a preset frame length to obtain a plurality of audio frames;
combining all the target audio frames according to time sequence to obtain an audio frame sequence;
identifying silence frames in the target audio frames, and selecting continuous silence frames which are larger than the preset frame number in the target audio frame sequence;
constructing a time interval according to the start time of a first frame and the end time of a last frame in the selected continuous mute frames;
And marking the audio fragments in each time interval in the target audio as mute fragments.
Optionally, the identifying a mute frame in the target audio frame includes:
calculating short-time energy of each target audio frame;
marking the audio frames with the short-time energy smaller than a preset energy threshold as mute frames;
Calculating the short-time zero-crossing rate of the audio frame with the short-time energy not smaller than a preset energy threshold value;
And marking the audio frames with the short-time energy not smaller than a preset energy threshold and the short-time zero-crossing rate not larger than a preset zero-crossing rate threshold as mute frames.
Optionally, the text conversion is performed on each of the cut audio segments to obtain a corresponding cut text, and the marking is performed on the corresponding cut text according to the start time of the cut audio segment, including:
Sampling the segmentation audio by using an analog-to-digital converter to obtain a segmentation audio signal;
performing pre-emphasis operation on the split audio signals to obtain split audio filtering signals;
performing short-time Fourier transform on the segmented audio filter signal to obtain the segmented audio frequency spectrum;
And performing text conversion on the segmented audio frequency spectrum by using a pre-constructed voice-to-text model to obtain the corresponding segmented text.
Optionally, the audio conversion of the audio-visual file to be played to obtain the target audio includes:
Judging whether the data format of the video file to be played is a preset audio format or not;
when the data format is a preset audio format, carrying out PCM audio decoding on the audio-video file to be played to obtain the target audio;
When the data format is not the preset audio format, acquiring the audio in the audio-visual file to be played to obtain initial audio;
and carrying out PCM audio decoding on the initial audio to obtain the target audio.
Optionally, the segmenting the target audio according to the marked silence segments to obtain a plurality of segmented audio segments, including:
The mute segment is used as a segmentation node to segment the target audio, so that a plurality of initial segmentation audio segments are obtained;
And determining the initial cut audio segment with time greater than or equal to a preset time threshold as the cut audio segment.
Optionally, the performing fixed-point playing on the audio-video file to be played according to the start time of the target cut text mark includes:
Determining the starting time of the target segmentation text mark as playing time;
And playing the audio-visual file to be played, and adjusting the playing start time of the audio-visual file to be played to the playing time.
In order to solve the above problems, the present invention further provides an audio/video playing device, which includes:
The audio segmentation module is used for obtaining an audio file to be played, and carrying out audio conversion on the audio file to be played to obtain target audio; marking the mute segment of the target audio, and segmenting the target audio according to the marked mute segment to obtain a plurality of segmented audio segments;
The time marking module is used for carrying out text conversion on each segmented audio segment to obtain a corresponding segmented text, and marking the corresponding segmented text according to the starting time of the segmented audio segment; displaying all the segmentation texts on a preset display interface according to the sequence of the marked starting time;
the fixed point playing module is used for identifying the segmentation text clicked by the clicking operation when the text clicking operation is carried out on the display interface, so as to obtain a target segmentation text; and playing the audio-video file to be played at fixed points according to the starting time of the target segmentation text mark.
In order to solve the above-mentioned problems, the present invention also provides an electronic apparatus including:
a memory storing at least one computer program; and
And the processor executes the computer program stored in the memory to realize the audio and video playing method.
In order to solve the above-mentioned problems, the present invention also provides a computer-readable storage medium having stored therein at least one computer program that is executed by a processor in an electronic device to implement the above-mentioned audio-video playing method.
According to the method, the device, the electronic equipment and the readable storage medium for playing the audio and video, the audio and video file to be played is played at fixed points according to the starting time of the target segmentation text mark, the content to be seen can be found faster through the text content, and then the corresponding time point is jumped to be played at fixed points, so that the efficiency of playing the audio and video is improved.
Drawings
Fig. 1 is a flowchart of an audio/video playing method according to an embodiment of the present invention;
fig. 2 is a schematic block diagram of an audio/video playing device according to an embodiment of the present invention;
Fig. 3 is a schematic diagram of an internal structure of an electronic device for implementing an audio/video playing method according to an embodiment of the present invention;
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
The embodiment of the application provides an audio and video playing method. The execution main body of the audio/video playing method includes, but is not limited to, at least one of a server, a terminal and the like capable of being configured to execute the method provided by the embodiment of the application. In other words, the audio/video playing method may be performed by software or hardware installed in a terminal device or a server device, where the software may be a blockchain platform. The service end includes but is not limited to: the server can be an independent server, or can be a cloud server for providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), basic cloud computing services such as big data and artificial intelligent platforms, and the like.
Referring to fig. 1, a flowchart of an audio/video playing method according to an embodiment of the present invention is shown, where in the embodiment of the present invention, the audio/video playing method includes:
S1, acquiring a video file to be played, and performing audio conversion on the video file to be played to obtain target audio;
In detail, in the embodiment of the present invention, the audio-video file to be played is an entire video file or an audio file of a live course.
Further, in the embodiment of the present invention, the content of the middle audio in the audio-visual file to be played is identified, and the audio conversion needs to be performed on the audio-visual file to be played.
In detail, in the embodiment of the present invention, whether the data format of the audio-visual file to be played is a preset audio format is determined, if the data format is the preset audio format, PCM (Pulse Code Modulation ) audio decoding is performed on the audio-visual file to be played to obtain the target audio, and optionally, the target audio is PCM voice data; if the data format is not the preset audio format, acquiring the audio in the audio-visual file to be played to obtain initial audio, and performing PCM audio decoding on the initial audio to obtain the target audio. The target audio format is a PCM format. Optionally, in the embodiment of the present invention, audio in the audio file to be played may be obtained by using methods such as recording and format conversion.
For example: and the file format of the audio-video file to be played is MP4 file, and the preset audio format is PCM format, then the audio in the audio-video file to be played is acquired to obtain the initial audio, and the PCM audio decoding is carried out on the initial audio to obtain the target audio.
S2, marking the mute segment of the target audio, and segmenting the target audio according to the marked mute segment to obtain a plurality of segmented audio segments;
in order to better segment the target audio, the embodiment of the present invention needs to label a mute segment of the target audio, including:
framing the target audio by using a preset frame length to obtain a plurality of audio frames;
alternatively, in the embodiment of the present invention, the preset frame length may be 20ms.
Combining all the target audio frames according to time sequence to obtain an audio frame sequence;
identifying silence frames in the target audio frames, and selecting continuous silence frames which are larger than the preset frame number in the target audio frame sequence;
in the embodiment of the invention, the mute part is always a part for speaking and pausing, and because the pauses among words and between sentences are different, the mute segments needed by people are needed to be screened through the mute time length, so that continuous mute frames with the number larger than the preset frame number in the target audio frame sequence are selected.
Constructing a time interval according to the start time of a first frame and the end time of a last frame in the selected continuous mute frames;
optionally, in the embodiment of the present invention, the start time of the first frame is taken as a left end point of the interval, and the end time of the last frame is taken as a right end point of the interval to construct a time interval. For example: the first frame starts at 5 minutes 21 seconds and the last frame ends at 5 minutes 23 seconds, then the time interval is [5:21,5:23].
And marking the audio fragments in each time interval in the target audio as mute fragments.
For example: the time interval is [5:21,5:23], then audio segments within the time interval 5 minutes 21 seconds to 5 minutes 23 seconds are marked as silence segments.
Optionally, in the embodiment of the present invention, identifying a mute frame in all the target audio frames includes:
calculating short-time energy of each target audio frame;
marking the audio frames with the short-time energy smaller than a preset energy threshold as mute frames;
Calculating the short-time zero-crossing rate of the audio frame with the short-time energy not smaller than a preset energy threshold value;
And marking the audio frames with the short-time energy not smaller than a preset energy threshold and the short-time zero-crossing rate not larger than a preset zero-crossing rate threshold as mute frames.
It should be further noted that the short-time energy threshold and the zero crossing rate threshold may be selected and set according to multiple test results. Such as: the short-time energy threshold and the zero crossing rate threshold are set to be unique unchanged values, and specific data can be set according to test results.
In detail, in the embodiment of the present invention, the target audio is segmented according to the marked silence segments to obtain a plurality of segmented audio segments, including:
The mute segment is used as a segmentation node to segment the target audio, so that a plurality of initial segmentation audio segments are obtained;
For example: the target audio is divided into two mute segments of 00:00:31-00:00:50 and 00:01:20-00:01:30 respectively within 2 minutes, and then the mute segments are used as dividing nodes to divide the target audio, so that three initial divided audio segments of 00:00:00-00:00:30, 00:00:51-00:01:19 and 00:01:31-00:02:00 are obtained.
Further, if the time corresponding to the initial cut audio segment is too short, the information amount of the initial cut audio segment is low, so in the embodiment of the invention, the initial cut audio segment with the time greater than or equal to the preset time threshold is determined to be the cut audio segment.
In another embodiment of the present invention, in order to ensure the segmentation speed, no further screening is required for the segmented segments, so that the segmenting the target audio according to the marked mute segments to obtain a plurality of segmented audio segments includes: and cutting the target audio by taking the mute segment as a cutting node to obtain the cut audio segment.
For example: the target audio is divided into three audio segments of 00:00:00-00:00:30, 00:00:51-00:01:19 and 00:01:31-00:02:00 by taking the mute segments as dividing nodes after 2 minutes and two mute segments of 00:00:31-00:00:50 and 00:01:20-00:01:30 are respectively obtained.
S3, performing text conversion on each segmented audio segment to obtain a corresponding segmented text, and marking the corresponding segmented text according to the starting time of the segmented audio segment;
In detail, in order to fast play the audio-visual file to be played, the embodiment of the invention needs to convert the audio content into text content, so that text conversion is performed on each segmented audio segment to obtain a corresponding segmented text.
In detail, in the embodiment of the present invention, because the audio is an analog signal, in order to facilitate the extraction of the spectral features of the split audio, the split audio needs to be digitally sampled, so that in the embodiment of the present invention, the split audio is sampled by using an analog/digital converter, so as to obtain a split audio signal; performing pre-emphasis operation on the split audio signals to obtain split audio filtering signals; and performing short-time Fourier transform on the segmented audio filter signal to obtain the segmented audio frequency spectrum.
Because the pronunciation system of the human voice can inhibit the high frequency part, in the embodiment, the digital voice signal can be compensated through the pre-emphasis operation, so that the energy of the high frequency part is improved, the voice energy of the high frequency part and the voice energy of the low frequency part have similar amplitude, the frequency spectrum of the signal becomes flat, and the same signal-to-noise ratio can be used in the whole frequency band from low frequency to high frequency.
Specifically, the embodiment of the invention can perform pre-emphasis operation on the sliced audio signal through a function y (t) =x (t) - μx (t-1), wherein x (t) is the sliced audio signal, t is time, y (t) is the sliced audio filtering signal, μ is an adjusting value of the pre-emphasis operation, and the value range of μ is [0.9,1.0].
Further, the embodiment of the invention utilizes the pre-constructed voice-to-text model to perform text conversion on the segmented audio frequency spectrum to obtain the corresponding segmented text.
Alternatively, the speech-to-text model in embodiments of the present invention may be an artificial intelligence model, such as an ASR model.
In another embodiment of the present invention, a recognition result of a preset voice recognition software for performing voice recognition on the cut audio segment is obtained, so as to obtain the corresponding cut text, where the voice recognition software is a program capable of recognizing voice into text.
Further, the embodiment of the invention marks the corresponding segmented text according to the starting time of the segmented audio segment. For example: and marking the start time 00:00:51 of the segmented audio fragments to the segmented text corresponding to the segmented audio fragments when the corresponding time of the segmented audio fragments is 00:00:51-00:01:19.
In another embodiment of the present invention, the cut text may be stored in a blockchain node, and the high throughput characteristic of the blockchain node is utilized to improve the data access efficiency.
S4, displaying all the segmentation texts on a preset display interface according to the sequence of the marked starting time;
in detail, in the embodiment of the invention, in order to facilitate the user to view the content in the target audio from front to back in turn, all the segmentation texts are displayed on a preset display interface according to the sequence of the starting time of the mark.
Optionally, the display interface is a display interface of a smart device of the user, and the smart device includes: cell phones, computers, tablets, etc.
S5, when a text clicking operation is carried out on the display interface, identifying a cut text clicked by the clicking operation, and obtaining a target cut text;
The text clicking operation in the embodiment of the invention comprises but is not limited to: touch clicks, mouse clicks, etc.
S6, performing fixed-point playing on the audio-video file to be played according to the starting time of the target segmentation text mark.
In detail, in the embodiment of the present invention, the start time of the target cut text label is determined as a play time; further, the audio-visual file to be played is played, and the playing start time of the audio-visual file to be played is adjusted to be the playing time.
For example: and if the starting time of the target segmentation text mark is 5 minutes 21 seconds, determining the 5 minutes 21 seconds as the playing time, and starting to play the audio-video file to be played from the 5 minutes 21 seconds of the audio-video file to be played.
In another embodiment of the present invention, in order to reduce playing resources, it is not necessary to load the entire audio/video file to be played every time, so the performing fixed-point playing on the audio/video file to be played according to the start time of the target cut text mark includes: and splitting the audio-video file to be played by taking the starting time of the target splitting text mark as a splitting node to obtain a target playing file, and further playing the target playing file.
For example: and if the starting time of the target cut text mark is 5 minutes 21 seconds, determining the 5 minutes 21 seconds as a cut node, and cutting out the 5 minutes 21 seconds and the later parts of the video file to be played as target play files.
Fig. 2 is a functional block diagram of the audio/video playing device according to the present invention.
The audio/video playing device 100 of the present invention may be installed in an electronic apparatus. Depending on the implemented functions, the audio/video playing apparatus may include an audio slicing module 101, a time stamping module 102, and a fixed point playing module 103, where the modules may also be referred to as units, and refer to a series of computer program segments capable of being executed by a processor of an electronic device and performing a fixed function, and stored in a memory of the electronic device.
In the present embodiment, the functions concerning the respective modules/units are as follows:
The audio segmentation module 101 is configured to obtain an audio file to be played, and perform audio conversion on the audio file to be played to obtain a target audio; marking the mute segment of the target audio, and segmenting the target audio according to the marked mute segment to obtain a plurality of segmented audio segments;
The time marking module 102 is configured to perform text conversion on each of the cut audio segments to obtain a corresponding cut text, and mark the corresponding cut text according to a start time of the cut audio segment; displaying all the segmentation texts on a preset display interface according to the sequence of the marked starting time;
The fixed-point playing module 103 is configured to identify a cut text clicked by a clicking operation when performing the clicking operation on the display interface, so as to obtain a target cut text; and playing the audio-video file to be played at fixed points according to the starting time of the target segmentation text mark.
Fig. 3 is a schematic structural diagram of an electronic device for implementing the audio/video playing method according to the present invention.
The electronic device may comprise a processor 10, a memory 11, a communication bus 12 and a communication interface 13, and may further comprise a computer program, such as an audio-visual playing program, stored in the memory 11 and executable on the processor 10.
The memory 11 includes at least one type of readable storage medium, including flash memory, a mobile hard disk, a multimedia card, a card memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device, such as a mobile hard disk of the electronic device. The memory 11 may also be an external storage device of the electronic device in other embodiments, such as a plug-in mobile hard disk, a smart memory card (SMART MEDIA CARD, SMC), a Secure Digital (SD) card, a flash memory card (FLASH CARD) or the like, which are provided on the electronic device. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device. The memory 11 may be used not only for storing application software installed in an electronic device and various data, such as codes of an audio/video playing program, but also for temporarily storing data that has been output or is to be output.
The processor 10 may be comprised of integrated circuits in some embodiments, for example, a single packaged integrated circuit, or may be comprised of multiple integrated circuits packaged with the same or different functions, including one or more central processing units (Central Processing unit, CPU), microprocessors, digital processing chips, graphics processors, combinations of various control chips, and the like. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various components of the entire electronic device using various interfaces and lines, and executes various functions of the electronic device and processes data by running or executing programs or modules (e.g., an audio/video playing program, etc.) stored in the memory 11, and calling data stored in the memory 11.
The communication bus 12 may be a peripheral component interconnect standard (PERIPHERAL COMPONENT INTERCONNECT, PCI) bus, or an extended industry standard architecture (extended industry standard architecture, EISA) bus, among others. The bus may be classified as an address bus, a data bus, a control bus, etc. The communication bus 12 is arranged to enable a connection communication between the memory 11 and at least one processor 10 etc. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
Fig. 3 shows only an electronic device with components, and it will be understood by those skilled in the art that the structure shown in fig. 3 is not limiting of the electronic device and may include fewer or more components than shown, or may combine certain components, or a different arrangement of components.
For example, although not shown, the electronic device may further include a power source (such as a battery) for supplying power to the respective components, and preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that functions of charge management, discharge management, power consumption management, and the like are implemented through the power management device. The power supply may also include one or more of any of a direct current or alternating current power supply, recharging device, power failure classification circuit, power converter or inverter, power status indicator, etc. The electronic device may further include various sensors, bluetooth modules, wi-Fi modules, etc., which are not described herein.
Optionally, the communication interface 13 may comprise a wired interface and/or a wireless interface (e.g., WI-FI interface, bluetooth interface, etc.), typically used to establish a communication connection between the electronic device and other electronic devices.
Optionally, the communication interface 13 may further comprise a user interface, which may be a Display, an input unit, such as a Keyboard (Keyboard), or a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch, or the like. The display may also be referred to as a display screen or display unit, as appropriate, for displaying information processed in the electronic device and for displaying a visual user interface.
It should be understood that the embodiments described are for illustrative purposes only and are not limited to this configuration in the scope of the patent application.
The audio/video playing program stored in the memory 11 of the electronic device is a combination of a plurality of computer programs, and when running in the processor 10, it can be implemented:
Acquiring a video file to be played, and performing audio conversion on the video file to be played to obtain target audio;
marking the mute segment of the target audio, and segmenting the target audio according to the marked mute segment to obtain a plurality of segmented audio segments;
Performing text conversion on each segmented audio fragment to obtain a corresponding segmented text, and marking the corresponding segmented text according to the starting time of the segmented audio fragment;
Displaying all the segmentation texts on a preset display interface according to the sequence of the marked starting time;
when a text clicking operation is carried out on the display interface, identifying a segmentation text clicked by the clicking operation to obtain a target segmentation text;
and playing the audio-video file to be played at fixed points according to the starting time of the target segmentation text mark.
In particular, the specific implementation method of the processor 10 on the computer program may refer to the description of the relevant steps in the corresponding embodiment of fig. 1, which is not repeated herein.
Further, the electronic device integrated modules/units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. The computer readable medium may be non-volatile or volatile. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM).
Embodiments of the present invention may also provide a computer readable storage medium storing a computer program which, when executed by a processor of an electronic device, may implement:
Acquiring a video file to be played, and performing audio conversion on the video file to be played to obtain target audio;
marking the mute segment of the target audio, and segmenting the target audio according to the marked mute segment to obtain a plurality of segmented audio segments;
Performing text conversion on each segmented audio fragment to obtain a corresponding segmented text, and marking the corresponding segmented text according to the starting time of the segmented audio fragment;
Displaying all the segmentation texts on a preset display interface according to the sequence of the marked starting time;
when a text clicking operation is carried out on the display interface, identifying a segmentation text clicked by the clicking operation to obtain a target segmentation text;
and playing the audio-video file to be played at fixed points according to the starting time of the target segmentation text mark.
Further, the computer-usable storage medium may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created from the use of blockchain nodes, and the like.
In the several embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be other manners of division when actually implemented.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, may be located in one place, or may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
The embodiment of the application can acquire and process the related data based on the artificial intelligence technology. Wherein artificial intelligence (ARTIFICIAL INTELLIGENCE, AI) is the theory, method, technique, and application system that uses a digital computer or a digital computer-controlled machine to simulate, extend, and expand human intelligence, sense the environment, acquire knowledge, and use knowledge to obtain optimal results.
In addition, each functional module in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units can be realized in a form of hardware or a form of hardware and a form of software functional modules.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof.
The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and the like. The blockchain (Blockchain), essentially a de-centralized database, is a string of data blocks that are generated in association using cryptographic methods, each of which contains information from a batch of network transactions for verifying the validity (anti-counterfeit) of its information and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, an application services layer, and the like.
Furthermore, it is evident that the word "comprising" does not exclude other elements or steps, and that the singular does not exclude a plurality. A plurality of units or means recited in the system claims can also be implemented by means of software or hardware by means of one unit or means. The terms second, etc. are used to denote a name, but not any particular order.
Finally, it should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present invention and not for limiting the same, and although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications and equivalents may be made to the technical solution of the present invention without departing from the spirit and scope of the technical solution of the present invention.
Claims (8)
1. An audio/video playing method, which is characterized by comprising the following steps:
Acquiring a video file to be played, and performing audio conversion on the video file to be played to obtain target audio;
Marking the mute segment of the target audio, segmenting the target audio by taking the marked mute segment as a segmentation node to obtain a plurality of initial segmented audio segments, and determining the initial segmented audio segments with time greater than or equal to a preset time threshold as the segmented audio segments;
Sampling the segmentation audio fragments by using an analog-to-digital converter to obtain segmentation audio signals, performing pre-emphasis operation on the segmentation audio signals to obtain segmentation audio filtering signals, performing short-time Fourier transform on the segmentation audio filtering signals to obtain segmentation audio frequency spectrums, performing text conversion on the segmentation audio frequency spectrums by using a pre-constructed voice-to-text model to obtain corresponding segmentation texts, and marking the corresponding segmentation texts according to the starting time of the segmentation audio fragments;
Displaying all the segmentation texts on a preset display interface according to the sequence of the marked starting time;
when a text clicking operation is carried out on the display interface, identifying a segmentation text clicked by the clicking operation to obtain a target segmentation text;
and playing the audio-video file to be played at fixed points according to the starting time of the target segmentation text mark.
2. The audio-video playing method as claimed in claim 1, wherein said mute segment for said target audio comprises:
framing the target audio by using a preset frame length to obtain a plurality of audio frames;
combining all the target audio frames according to time sequence to obtain an audio frame sequence;
identifying silence frames in the target audio frames, and selecting continuous silence frames which are larger than the preset frame number in the target audio frame sequence;
constructing a time interval according to the start time of a first frame and the end time of a last frame in the selected continuous mute frames;
And marking the audio fragments in each time interval in the target audio as mute fragments.
3. The audio video playback method of claim 1, wherein the identifying a mute frame in the target audio frame comprises:
calculating short-time energy of each target audio frame;
marking the audio frames with the short-time energy smaller than a preset energy threshold as mute frames;
Calculating the short-time zero-crossing rate of the audio frame with the short-time energy not smaller than a preset energy threshold value;
And marking the audio frames with the short-time energy not smaller than a preset energy threshold and the short-time zero-crossing rate not larger than a preset zero-crossing rate threshold as mute frames.
4. The audio/video playing method of claim 1, wherein the audio converting the audio/video file to be played to obtain the target audio comprises:
Judging whether the data format of the video file to be played is a preset audio format or not;
when the data format is a preset audio format, carrying out PCM audio decoding on the audio-video file to be played to obtain the target audio;
When the data format is not the preset audio format, acquiring the audio in the audio-visual file to be played to obtain initial audio;
and carrying out PCM audio decoding on the initial audio to obtain the target audio.
5. The audio-video playing method according to any one of claims 1 to 4, wherein the performing fixed-point playing on the audio-video file to be played according to the start time of the target cut text mark includes:
Determining the starting time of the target segmentation text mark as playing time;
And playing the audio-visual file to be played, and adjusting the playing start time of the audio-visual file to be played to the playing time.
6. An audio/video playback apparatus, comprising:
The audio segmentation module is used for obtaining an audio file to be played, and carrying out audio conversion on the audio file to be played to obtain target audio; marking the mute segment of the target audio, segmenting the target audio by taking the marked mute segment as a segmentation node to obtain a plurality of initial segmented audio segments, and determining the initial segmented audio segments with time greater than or equal to a preset time threshold as the segmented audio segments;
The time marking module is used for sampling the segmentation audio fragments by utilizing an analog-to-digital converter to obtain segmentation audio signals, performing pre-emphasis operation on the segmentation audio signals to obtain segmentation audio filtering signals, performing short-time Fourier transform on the segmentation audio filtering signals to obtain segmentation audio frequency spectrums, performing text conversion on the segmentation audio frequency spectrums by utilizing a pre-constructed voice-to-text model to obtain corresponding segmentation texts, and marking the corresponding segmentation texts according to the starting time of the segmentation audio fragments;
the fixed point playing module is used for identifying the segmentation text clicked by the clicking operation when the text clicking operation is performed on the display interface, so as to obtain a target segmentation text; and playing the audio-video file to be played at fixed points according to the starting time of the target segmentation text mark.
7. An electronic device, the electronic device comprising:
at least one processor; and
A memory communicatively coupled to the at least one processor;
wherein the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the audio video playback method of any one of claims 1 to 5.
8. A computer readable storage medium storing a computer program, wherein the computer program when executed by a processor implements the audio-video playing method according to any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111274227.1A CN113825009B (en) | 2021-10-29 | 2021-10-29 | Audio and video playing method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111274227.1A CN113825009B (en) | 2021-10-29 | 2021-10-29 | Audio and video playing method and device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113825009A CN113825009A (en) | 2021-12-21 |
CN113825009B true CN113825009B (en) | 2024-06-04 |
Family
ID=78917692
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111274227.1A Active CN113825009B (en) | 2021-10-29 | 2021-10-29 | Audio and video playing method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113825009B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114566172A (en) * | 2022-02-25 | 2022-05-31 | 北京砍石高科技有限公司 | Audio data processing method and device, storage medium and electronic equipment |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101539929A (en) * | 2009-04-17 | 2009-09-23 | 无锡天脉聚源传媒科技有限公司 | Method for indexing TV news by utilizing computer system |
JP2010256391A (en) * | 2009-04-21 | 2010-11-11 | Takeshi Hanamura | Voice information processing device |
CN103200463A (en) * | 2013-03-27 | 2013-07-10 | 天脉聚源(北京)传媒科技有限公司 | Method and device for generating video summary |
CN103700370A (en) * | 2013-12-04 | 2014-04-02 | 北京中科模识科技有限公司 | Broadcast television voice recognition method and system |
CN106953887A (en) * | 2017-01-05 | 2017-07-14 | 北京中瑞鸿程科技开发有限公司 | A fine-grained radio audio content personalized organization recommendation method |
CN111010586A (en) * | 2019-12-19 | 2020-04-14 | 腾讯科技(深圳)有限公司 | Live broadcast method, device, equipment and storage medium based on artificial intelligence |
CN112331193A (en) * | 2019-07-17 | 2021-02-05 | 华为技术有限公司 | Voice interaction method and related device |
-
2021
- 2021-10-29 CN CN202111274227.1A patent/CN113825009B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101539929A (en) * | 2009-04-17 | 2009-09-23 | 无锡天脉聚源传媒科技有限公司 | Method for indexing TV news by utilizing computer system |
JP2010256391A (en) * | 2009-04-21 | 2010-11-11 | Takeshi Hanamura | Voice information processing device |
CN103200463A (en) * | 2013-03-27 | 2013-07-10 | 天脉聚源(北京)传媒科技有限公司 | Method and device for generating video summary |
CN103700370A (en) * | 2013-12-04 | 2014-04-02 | 北京中科模识科技有限公司 | Broadcast television voice recognition method and system |
CN106953887A (en) * | 2017-01-05 | 2017-07-14 | 北京中瑞鸿程科技开发有限公司 | A fine-grained radio audio content personalized organization recommendation method |
CN112331193A (en) * | 2019-07-17 | 2021-02-05 | 华为技术有限公司 | Voice interaction method and related device |
CN111010586A (en) * | 2019-12-19 | 2020-04-14 | 腾讯科技(深圳)有限公司 | Live broadcast method, device, equipment and storage medium based on artificial intelligence |
Also Published As
Publication number | Publication date |
---|---|
CN113825009A (en) | 2021-12-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10410615B2 (en) | Audio information processing method and apparatus | |
CN106486128B (en) | Method and device for processing double-sound-source audio data | |
CN110427809A (en) | Lip reading recognition methods, device, electronic equipment and medium based on deep learning | |
CN114866807A (en) | Avatar video generation method and device, electronic equipment and readable storage medium | |
CN110717337A (en) | Information processing method, device, computing equipment and storage medium | |
CN112116903B (en) | Speech synthesis model generation method and device, storage medium and electronic equipment | |
CN112053692B (en) | Speech recognition processing method, device and storage medium | |
CN107680584B (en) | Method and device for segmenting audio | |
CN113707173B (en) | Voice separation method, device, equipment and storage medium based on audio segmentation | |
CN114598933A (en) | Video content processing method, system, terminal and storage medium | |
CN113903363A (en) | Violation detection method, device, equipment and medium based on artificial intelligence | |
CN113077821A (en) | Audio quality detection method and device, electronic equipment and storage medium | |
CN111510765A (en) | Audio label intelligent labeling method and device based on teaching video | |
CN111177462A (en) | Method and device for determining video distribution timeliness | |
CN113825009B (en) | Audio and video playing method and device, electronic equipment and storage medium | |
CN110889008B (en) | Music recommendation method and device, computing device and storage medium | |
CN104882146B (en) | The processing method and processing device of audio promotion message | |
CN110555117B (en) | Data processing method and device and electronic equipment | |
CN109213466B (en) | Court trial information display method and device | |
CN114140850A (en) | Face recognition method and device and electronic equipment | |
CN113852835A (en) | Live audio processing method, device, electronic device and storage medium | |
CN113808618A (en) | Audio quality evaluation method and device, equipment, medium and product thereof | |
CN114093340A (en) | Speech synthesis method, speech synthesis device, storage medium and electronic equipment | |
CN114466105B (en) | Binding method and device for fixed telephone number, electronic equipment and medium | |
CN115132183B (en) | Training method, device, equipment, medium and program product of audio recognition model |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |