azuse / youtube-streaming-translator-python Goto Github PK
View Code? Open in Web Editor NEW实时翻译油管直播,不知道怎么优化,闲置中
License: GNU General Public License v3.0
实时翻译油管直播,不知道怎么优化,闲置中
License: GNU General Public License v3.0
一直遇到这个问题,尝试了好多办法都无法解决。我应该怎么处理?
Connecting to youtube...
Traceback (most recent call last):
File "E:\youtube-streaming-translator-python-master\main.google.py", line 449, in
video = pafy.new(url)
File "E:\youtube-streaming-translator-python-master\venv\lib\site-packages\pafy\pafy.py", line 124, in new
return Pafy(url, basic, gdata, size, callback, ydl_opts=ydl_opts)
File "E:\youtube-streaming-translator-python-master\venv\lib\site-packages\pafy\backend_youtube_dl.py", line 31, in init
super(YtdlPafy, self).init(*args, **kwargs)
File "E:\youtube-streaming-translator-python-master\venv\lib\site-packages\pafy\backend_shared.py", line 97, in init
self._fetch_basic()
File "E:\youtube-streaming-translator-python-master\venv\lib\site-packages\pafy\backend_youtube_dl.py", line 53, in _fetch_basic
self._likes = self._ydl_info['like_count']
KeyError: 'like_count'
https://greasyfork.org/en/scripts/384708-bilibili-danmaku-translator
不知有可供参考的地方吗(●ˇ∀ˇ●)
你好,我想知道这个怎么才能做到中英翻译。
self.config = speech.types.RecognitionConfig(
encoding=speech.enums.RecognitionConfig.AudioEncoding.LINEAR16,
sample_rate_hertz=44100,
language_code='en-US',
max_alternatives=1,
enable_automatic_punctuation=True, # 启用标点符号
diarization_config=speaker_diarization_config, # 区分讲话人
speech_contexts=speech_contexts # 语音自适应
)
我将上述的 language_code 写成了 en-US
但是我发现我实时翻译这个的时候,http://127.0.0.1:5000 这个网页没有任何输出
Speech2text timeout
Exception in thread Thread-2:
Traceback (most recent call last):
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "main.google.py", line 213, in run
for response in responses:
UnboundLocalError: local variable 'responses' referenced before assignment
127.0.0.1 - - [14/Jan/2021 03:46:17] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [14/Jan/2021 03:46:26] "GET / HTTP/1.1" 200 -
146 146 0 145 145 4 0
而且运行对应的脚本出现以上错误,想知道这个错误是怎么原因造成的?
从谷歌API收到回复 与 (翻译完成)的片段数 这两个字段总是 4和0
我这里播放的直播视频是英文视频可以请教一下如何解决这个问题吗?
如题
另外在简介里写点英文的东西
这样应该能火(刚需
经验上来说,日翻中百度翻译比谷歌好不少,不知道能否实现。
https://api.fanyi.baidu.com/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.