## haikubot:B站引流狗最爱的俳句生成器
### 简介
haikubot 是一个基于 Bilibili 视频生成俳句的命令行工具。
在这里,我参考了 [bilibili-API-collect](https://github.com/SocialSisterYi/bilibili-API-collect) 仓库用于获取B站视频信息,你可以在 [musicstream_url.md](references/musicstream_url.md) 和 [videostream_url.md](references/videostream_url.md) 来参考如何获取音视频流地址。
接着,我使用了dashscope api,调用alibaba的paraformer模型进行语音识别,识别出类字幕文本。
最后,我使用了openai的api,可以用兼容模型(比如qwen/deepseek)来生成俳句。
### 安装
```bash
pip install haikubot
```
## 使用方法
```bash
# 第一次使用,你应该配置dashscope的API密钥,你可以搜索百炼平台,进去获取api key,随后替换这里的YOUR_API_KEY,然后运行
haikubot config YOUR_API_KEY
# 之后,你可以这样使用BVID处理视频生成俳句
haikubot process BV117XoYGErB
# 显示版本信息
haikubot version
```
Raw data
{
"_id": null,
"home_page": "https://github.com/lgy112112/haikubot",
"name": "haikubot",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "bilibili, haiku, audio, transcription, llm, asr",
"author": "lgy112112",
"author_email": "lgy112112@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/33/33/6b3ccb32449280d1934b56d9aba7237889300f864482fadb13ba321cd75a/haikubot-0.3.0.tar.gz",
"platform": null,
"description": "## haikubot\uff1aB\u7ad9\u5f15\u6d41\u72d7\u6700\u7231\u7684\u4ff3\u53e5\u751f\u6210\u5668\r\n\r\n### \u7b80\u4ecb\r\n\r\nhaikubot \u662f\u4e00\u4e2a\u57fa\u4e8e Bilibili \u89c6\u9891\u751f\u6210\u4ff3\u53e5\u7684\u547d\u4ee4\u884c\u5de5\u5177\u3002\r\n\r\n\u5728\u8fd9\u91cc\uff0c\u6211\u53c2\u8003\u4e86 [bilibili-API-collect](https://github.com/SocialSisterYi/bilibili-API-collect) \u4ed3\u5e93\u7528\u4e8e\u83b7\u53d6B\u7ad9\u89c6\u9891\u4fe1\u606f\uff0c\u4f60\u53ef\u4ee5\u5728 [musicstream_url.md](references/musicstream_url.md) \u548c [videostream_url.md](references/videostream_url.md) \u6765\u53c2\u8003\u5982\u4f55\u83b7\u53d6\u97f3\u89c6\u9891\u6d41\u5730\u5740\u3002\r\n\r\n\u63a5\u7740\uff0c\u6211\u4f7f\u7528\u4e86dashscope api\uff0c\u8c03\u7528alibaba\u7684paraformer\u6a21\u578b\u8fdb\u884c\u8bed\u97f3\u8bc6\u522b\uff0c\u8bc6\u522b\u51fa\u7c7b\u5b57\u5e55\u6587\u672c\u3002\r\n\r\n\u6700\u540e\uff0c\u6211\u4f7f\u7528\u4e86openai\u7684api\uff0c\u53ef\u4ee5\u7528\u517c\u5bb9\u6a21\u578b\uff08\u6bd4\u5982qwen/deepseek\uff09\u6765\u751f\u6210\u4ff3\u53e5\u3002\r\n\r\n### \u5b89\u88c5\r\n\r\n```bash\r\npip install haikubot\r\n```\r\n\r\n## \u4f7f\u7528\u65b9\u6cd5\r\n\r\n```bash\r\n# \u7b2c\u4e00\u6b21\u4f7f\u7528\uff0c\u4f60\u5e94\u8be5\u914d\u7f6edashscope\u7684API\u5bc6\u94a5\uff0c\u4f60\u53ef\u4ee5\u641c\u7d22\u767e\u70bc\u5e73\u53f0\uff0c\u8fdb\u53bb\u83b7\u53d6api key\uff0c\u968f\u540e\u66ff\u6362\u8fd9\u91cc\u7684YOUR_API_KEY\uff0c\u7136\u540e\u8fd0\u884c\r\nhaikubot config YOUR_API_KEY\r\n\r\n# \u4e4b\u540e\uff0c\u4f60\u53ef\u4ee5\u8fd9\u6837\u4f7f\u7528BVID\u5904\u7406\u89c6\u9891\u751f\u6210\u4ff3\u53e5\r\nhaikubot process BV117XoYGErB\r\n\r\n# \u663e\u793a\u7248\u672c\u4fe1\u606f\r\nhaikubot version\r\n```\r\n",
"bugtrack_url": null,
"license": null,
"summary": "\u4eceBilibili\u89c6\u9891\u751f\u6210\u4ff3\u53e5\u7684\u547d\u4ee4\u884c\u5de5\u5177",
"version": "0.3.0",
"project_urls": {
"Homepage": "https://github.com/lgy112112/haikubot"
},
"split_keywords": [
"bilibili",
" haiku",
" audio",
" transcription",
" llm",
" asr"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "e8addafa323e76e6b16b80d2783dbc59894da65fae5f3c0ef9c3d768ef452e65",
"md5": "78d4776cd5c36ae54aa88eecc5cab457",
"sha256": "2faafdccd7248c1c9c2d8e808a0a3becf2eb6b096b6bb58c08089e02520b71a7"
},
"downloads": -1,
"filename": "haikubot-0.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "78d4776cd5c36ae54aa88eecc5cab457",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 7372,
"upload_time": "2025-03-03T16:17:54",
"upload_time_iso_8601": "2025-03-03T16:17:54.290192Z",
"url": "https://files.pythonhosted.org/packages/e8/ad/dafa323e76e6b16b80d2783dbc59894da65fae5f3c0ef9c3d768ef452e65/haikubot-0.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "33336b3ccb32449280d1934b56d9aba7237889300f864482fadb13ba321cd75a",
"md5": "076388d5137fb312bfa2711ad51d6ca0",
"sha256": "ab6e66a718a4faf36582ebb4b2425330ff54f9a9ebd32cc61817ad780d03ed10"
},
"downloads": -1,
"filename": "haikubot-0.3.0.tar.gz",
"has_sig": false,
"md5_digest": "076388d5137fb312bfa2711ad51d6ca0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 6200,
"upload_time": "2025-03-03T16:17:55",
"upload_time_iso_8601": "2025-03-03T16:17:55.406948Z",
"url": "https://files.pythonhosted.org/packages/33/33/6b3ccb32449280d1934b56d9aba7237889300f864482fadb13ba321cd75a/haikubot-0.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-03-03 16:17:55",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "lgy112112",
"github_project": "haikubot",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "haikubot"
}