2021-04-18 17:54:41 +08:00
|
|
|
|
# 如果要修改配置,可以复制此文件并重命名为“config.ini”再修改
|
|
|
|
|
# If you want to modify the configuration, copy this file and rename it to "config.ini" and edit
|
|
|
|
|
|
2020-02-03 16:18:21 +08:00
|
|
|
|
[app]
|
2023-07-31 23:29:02 +08:00
|
|
|
|
# 数据库配置,见 https://docs.sqlalchemy.org/en/20/core/engines.html#database-urls
|
|
|
|
|
# See https://docs.sqlalchemy.org/en/20/core/engines.html#database-urls
|
2020-02-03 16:18:21 +08:00
|
|
|
|
database_url = sqlite:///data/database.db
|
2020-08-22 18:38:52 +08:00
|
|
|
|
|
2021-04-20 21:30:57 +08:00
|
|
|
|
# 如果使用了nginx之类的反向代理服务器,设置为true
|
|
|
|
|
# Set to true if you are using a reverse proxy server such as nginx
|
|
|
|
|
tornado_xheaders = false
|
|
|
|
|
|
|
|
|
|
# 加载器URL,本地使用时加载器可以让你先运行OBS再运行blivechat。如果为空,不使用加载器
|
|
|
|
|
# **自建服务器时强烈建议不使用加载器**,否则可能因为混合HTTP和HTTPS等原因加载不出来
|
|
|
|
|
# Use a loader so that you can run OBS before blivechat. If empty, no loader is used
|
|
|
|
|
loader_url = https://xfgryujk.sinacloud.net/blivechat/loader.html
|
|
|
|
|
|
2023-07-30 15:29:40 +08:00
|
|
|
|
# 启动时打开浏览器
|
|
|
|
|
# Open browser at startup
|
|
|
|
|
open_browser_at_startup = true
|
|
|
|
|
|
2022-02-27 22:05:37 +08:00
|
|
|
|
# 允许上传自定义表情文件
|
|
|
|
|
# Enable uploading custom emote file
|
|
|
|
|
enable_upload_file = true
|
|
|
|
|
|
2021-04-20 21:30:57 +08:00
|
|
|
|
|
2023-08-24 21:52:51 +08:00
|
|
|
|
# 获取头像最大队列长度
|
2021-04-20 21:30:57 +08:00
|
|
|
|
# Maximum queue length for fetching avatar
|
2023-08-24 23:07:17 +08:00
|
|
|
|
fetch_avatar_max_queue_size = 4
|
2021-04-20 21:30:57 +08:00
|
|
|
|
|
2023-07-31 23:29:02 +08:00
|
|
|
|
# 内存中头像缓存数量
|
|
|
|
|
# Number of avatar caches in memory
|
|
|
|
|
avatar_cache_size = 10000
|
2021-04-20 21:30:57 +08:00
|
|
|
|
|
|
|
|
|
|
2020-11-28 22:56:45 +08:00
|
|
|
|
# 允许自动翻译到日语
|
2020-02-06 17:39:56 +08:00
|
|
|
|
# Enable auto translate to Japanese
|
|
|
|
|
enable_translate = true
|
2020-08-22 18:38:52 +08:00
|
|
|
|
|
2020-11-28 22:56:45 +08:00
|
|
|
|
# 允许翻译的房间ID,以逗号分隔。如果为空,允许所有房间
|
2021-12-31 00:45:47 +08:00
|
|
|
|
# Comma separated room IDs in which translation are allowed. If empty, all rooms are allowed
|
2020-08-16 12:13:53 +08:00
|
|
|
|
# Example: allow_translate_rooms = 4895312,22347054,21693691
|
|
|
|
|
allow_translate_rooms =
|
2020-02-03 16:18:21 +08:00
|
|
|
|
|
2023-08-05 21:25:59 +08:00
|
|
|
|
# 翻译最大队列长度
|
|
|
|
|
# Maximum queue length for translating
|
|
|
|
|
translate_max_queue_size = 10
|
|
|
|
|
|
2021-04-20 21:30:57 +08:00
|
|
|
|
# 翻译缓存数量
|
|
|
|
|
# Number of translation caches
|
|
|
|
|
translation_cache_size = 50000
|
2021-04-11 14:16:32 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# -------------------------------------------------------------------------------------------------
|
|
|
|
|
# 以下是给字幕组看的,实在懒得翻译了_(:з」∠)_。如果你不了解以下参数的意思,使用默认值就好
|
|
|
|
|
# **The following is for translation team. Leave it default if you don't know its meaning**
|
2021-04-11 22:11:13 +08:00
|
|
|
|
# -------------------------------------------------------------------------------------------------
|
2021-04-11 14:16:32 +08:00
|
|
|
|
|
2021-04-20 22:09:47 +08:00
|
|
|
|
# 翻译器配置,索引到下面的配置节。可以以逗号分隔配置多个翻译器,翻译时会自动负载均衡
|
2021-04-11 22:11:13 +08:00
|
|
|
|
# 配置多个翻译器可以增加额度、增加QPS、容灾
|
|
|
|
|
# 不同配置可以使用同一个类型,但要使用不同的账号,否则还是会遇到额度、调用频率限制
|
2022-06-18 21:42:03 +08:00
|
|
|
|
translator_configs = tencent_translate_free
|
2021-04-11 14:16:32 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[tencent_translate_free]
|
|
|
|
|
# 类型:腾讯翻译白嫖版。使用了网页版的接口,**将来可能失效**
|
|
|
|
|
type = TencentTranslateFree
|
2021-04-11 22:11:13 +08:00
|
|
|
|
|
2023-08-05 21:25:59 +08:00
|
|
|
|
# 请求间隔时间(秒),等于 1 / QPS
|
|
|
|
|
query_interval = 1
|
2021-04-11 22:11:13 +08:00
|
|
|
|
|
2021-04-11 14:16:32 +08:00
|
|
|
|
# 自动:auto;中文:zh;日语:jp;英语:en;韩语:kr
|
|
|
|
|
# 完整语言列表见文档:https://cloud.tencent.com/document/product/551/15619
|
|
|
|
|
# 源语言
|
|
|
|
|
source_language = zh
|
|
|
|
|
# 目标语言
|
|
|
|
|
target_language = jp
|
|
|
|
|
|
|
|
|
|
|
2021-04-11 22:11:13 +08:00
|
|
|
|
[tencent_translate]
|
|
|
|
|
# 文档:https://cloud.tencent.com/product/tmt
|
|
|
|
|
# 定价:https://cloud.tencent.com/document/product/551/35017
|
|
|
|
|
# * 文本翻译的每月免费额度为5百万字符
|
|
|
|
|
# * 文本翻译当月需付费字符数小于100百万字符(1亿字符)时,刊例价为58元/每百万字符
|
|
|
|
|
# * 文本翻译当月需付费字符数大于等于100百万字符(1亿字符)时,刊例价为50元/每百万字符
|
|
|
|
|
# 限制:https://cloud.tencent.com/document/product/551/32572
|
|
|
|
|
# * 文本翻译最高QPS为5
|
|
|
|
|
|
|
|
|
|
# 类型:腾讯翻译
|
|
|
|
|
type = TencentTranslate
|
|
|
|
|
|
|
|
|
|
# 请求间隔时间(秒),等于 1 / QPS。理论上最高QPS为5,实际测试是3
|
|
|
|
|
query_interval = 0.333
|
|
|
|
|
|
2021-12-31 00:45:47 +08:00
|
|
|
|
# 自动:auto;中文:zh;日语:ja;英语:en;韩语:ko
|
2021-04-11 22:11:13 +08:00
|
|
|
|
# 完整语言列表见文档:https://cloud.tencent.com/document/product/551/15619
|
|
|
|
|
# 源语言
|
|
|
|
|
source_language = zh
|
|
|
|
|
# 目标语言
|
2021-12-31 00:45:47 +08:00
|
|
|
|
target_language = ja
|
2021-04-11 22:11:13 +08:00
|
|
|
|
|
|
|
|
|
# 腾讯云API密钥
|
|
|
|
|
secret_id =
|
|
|
|
|
secret_key =
|
|
|
|
|
|
2021-12-31 00:45:47 +08:00
|
|
|
|
# 腾讯云地域参数,用来标识希望操作哪个地域的数据,建议按照运行blivechat的机器所在地区就近选择
|
2021-04-11 22:11:13 +08:00
|
|
|
|
# 北京:ap-beijing;上海:ap-shanghai;香港:ap-hongkong;首尔:ap-seoul
|
|
|
|
|
# 完整地域列表见文档:https://cloud.tencent.com/document/api/551/15615#.E5.9C.B0.E5.9F.9F.E5.88.97.E8.A1.A8
|
|
|
|
|
region = ap-shanghai
|
2021-04-23 21:35:57 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[baidu_translate]
|
|
|
|
|
# 文档:https://fanyi-api.baidu.com/
|
|
|
|
|
# 定价:https://fanyi-api.baidu.com/product/112
|
2023-07-30 15:29:40 +08:00
|
|
|
|
# * 标准版每月前5万字符免费,超出仅收取超出部分费用(QPS=1),按49元/百万字符计费
|
|
|
|
|
# * 高级版每月前100万字符免费,超出仅收取超出部分费用(QPS=10),按49元/百万字符计费
|
|
|
|
|
# * 尊享版每月前200万字符免费,超出后仅收取超出部分费用(QPS=100),按49元/百万字符计费
|
2021-04-23 21:35:57 +08:00
|
|
|
|
|
|
|
|
|
# 类型:百度翻译
|
|
|
|
|
type = BaiduTranslate
|
|
|
|
|
|
|
|
|
|
# 请求间隔时间(秒),等于 1 / QPS
|
|
|
|
|
query_interval = 1.5
|
|
|
|
|
|
|
|
|
|
# 自动:auto;中文:zh;日语:jp;英语:en;韩语:kor
|
|
|
|
|
# 完整语言列表见文档:https://fanyi-api.baidu.com/doc/21
|
|
|
|
|
# 源语言
|
|
|
|
|
source_language = zh
|
|
|
|
|
# 目标语言
|
|
|
|
|
target_language = jp
|
|
|
|
|
|
|
|
|
|
# 百度翻译开放平台应用ID和密钥
|
|
|
|
|
app_id =
|
|
|
|
|
secret =
|