Whishow
Whistream(微流)是基于Whisper語音識(shí)別的的在線字幕生成工具,支持rtsp/rtmp/mp4等視頻流在線語音識(shí)別
1. whishow介紹
whishow(微秀)是python實(shí)現(xiàn)的在線音視頻流播放器,支持rtsp/rtmp/mp4等流式輸入,也是whistream的前端。python實(shí)現(xiàn)原理如下:
(1) SPROCESS.run() 的三個(gè)子線程負(fù)責(zé):緩存流數(shù)據(jù),處理音頻緩存生成二級緩存,處理視頻緩存生成二級緩存
def run(self,video_dst_frame_size=[-1,-1]):
ps = threading.Thread(target=self.stream.read,args=(video_dst_frame_size,))
pa = threading.Thread(target=self.process_audio,args=())
pu = threading.Thread(target=self.process_video,args=())
ps.start()
pa.start()
pu.start()
(2) PLAY.run()對上述二級緩存進(jìn)行在線播放
def run(self,spc:SPROCESS):
ps = threading.Thread(target=spc.run,args=())
pa = threading.Thread(target=self.listen_audio,args=())
pv = threading.Thread(target=self.listen_video,args=())
ps.start()
pa.start()
pv.start()
exe下載地址:https://github.com/coolEphemeroptera/Whishow/releases
whistream將在whishow基礎(chǔ)上引入whisper進(jìn)行在線語音識(shí)別生成視頻字幕
2. 使用
python:
python whishow.py <視頻路徑>
例1:python whishow.py ./test.mp4
例2:python whishow.py rtmp://mobliestream.c3tv.com:554/live/goodtv.sdp
命令行:
./whishow.exe <視頻路徑>
顯示如下:文章來源:http://www.zghlxwxcb.cn/news/detail-850034.html
3. 聯(lián)系我們
605686962@qq.com
coolEphemeroptera@gmail.com文章來源地址http://www.zghlxwxcb.cn/news/detail-850034.html
到了這里,關(guān)于基于Whisper語音識(shí)別的實(shí)時(shí)視頻字幕生成 (一): 流式顯示視頻幀和音頻幀的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!