mirror of
https://github.com/Ethan930717/siliconflow_tts.git
synced 2026-07-21 14:44:05 +08:00
upload
This commit is contained in:
+176
@@ -0,0 +1,176 @@
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
|
||||
# C extensions
|
||||
*.so
|
||||
|
||||
# Distribution / packaging
|
||||
.Python
|
||||
build/
|
||||
develop-eggs/
|
||||
dist/
|
||||
downloads/
|
||||
eggs/
|
||||
.eggs/
|
||||
lib/
|
||||
lib64/
|
||||
parts/
|
||||
sdist/
|
||||
var/
|
||||
wheels/
|
||||
pip-wheel-metadata/
|
||||
share/python-wheels/
|
||||
*.egg-info/
|
||||
.installed.cfg
|
||||
*.egg
|
||||
MANIFEST
|
||||
|
||||
# PyInstaller
|
||||
# Usually these files are written by a python script from a template
|
||||
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||
*.manifest
|
||||
*.spec
|
||||
|
||||
# Unit test / coverage reports
|
||||
htmlcov/
|
||||
.tox/
|
||||
.nox/
|
||||
.coverage
|
||||
.coverage.*
|
||||
.cache
|
||||
nosetests.xml
|
||||
coverage.xml
|
||||
*.cover
|
||||
*.py,cover
|
||||
.hypothesis/
|
||||
.pytest_cache/
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
*.pot
|
||||
|
||||
# Django stuff:
|
||||
*.log
|
||||
local_settings.py
|
||||
db.sqlite3
|
||||
db.sqlite3-journal
|
||||
|
||||
# Flask stuff:
|
||||
instance/
|
||||
.webassets-cache
|
||||
|
||||
# Scrapy stuff:
|
||||
.scrapy
|
||||
|
||||
# Sphinx documentation
|
||||
docs/_build/
|
||||
|
||||
# PyBuilder
|
||||
target/
|
||||
|
||||
# Jupyter Notebook
|
||||
.ipynb_checkpoints
|
||||
|
||||
# IPython
|
||||
profile_default/
|
||||
ipython_config.py
|
||||
|
||||
# pyenv
|
||||
.python-version
|
||||
|
||||
# pipenv
|
||||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
||||
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
||||
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
||||
# install all needed dependencies.
|
||||
#Pipfile.lock
|
||||
|
||||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
||||
__pypackages__/
|
||||
|
||||
# Celery stuff
|
||||
celerybeat-schedule
|
||||
celerybeat.pid
|
||||
|
||||
# SageMath parsed files
|
||||
*.sage.py
|
||||
|
||||
# Environments
|
||||
.env
|
||||
.venv
|
||||
env/
|
||||
venv/
|
||||
ENV/
|
||||
env.bak/
|
||||
venv.bak/
|
||||
|
||||
# Spyder project settings
|
||||
.spyderproject
|
||||
.spyproject
|
||||
|
||||
# Rope project settings
|
||||
.ropeproject
|
||||
|
||||
# mkdocs documentation
|
||||
/site
|
||||
|
||||
# mypy
|
||||
.mypy_cache/
|
||||
.dmypy.json
|
||||
dmypy.json
|
||||
|
||||
# Pyre type checker
|
||||
.pyre/
|
||||
|
||||
# IDE files
|
||||
.vscode/
|
||||
.idea/
|
||||
*.swp
|
||||
*.swo
|
||||
*~
|
||||
|
||||
# OS generated files
|
||||
.DS_Store
|
||||
.DS_Store?
|
||||
._*
|
||||
.Spotlight-V100
|
||||
.Trashes
|
||||
ehthumbs.db
|
||||
Thumbs.db
|
||||
|
||||
# Home Assistant specific
|
||||
*.yaml.backup
|
||||
*.yaml.bak
|
||||
.HA_VERSION
|
||||
home-assistant.log
|
||||
home-assistant_v2.db
|
||||
*.db-shm
|
||||
*.db-wal
|
||||
|
||||
# API keys and secrets
|
||||
secrets.yaml
|
||||
known_devices.yaml
|
||||
|
||||
# Test files
|
||||
test_*.py
|
||||
*_test.py
|
||||
tests/
|
||||
|
||||
# Development files
|
||||
*.tmp
|
||||
*.temp
|
||||
temp/
|
||||
tmp/
|
||||
|
||||
# Audio files (if any test audio files)
|
||||
*.wav
|
||||
*.mp3
|
||||
*.m4a
|
||||
*.opus
|
||||
*.pcm
|
||||
|
||||
# Local configuration files
|
||||
config/
|
||||
configuration.yaml
|
||||
@@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2025 Ethan930717
|
||||
Copyright (c) 2025 SiliconFlow TTS Contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
🎙️ 一个功能强大的 Home Assistant 文本转语音集成,基于 [SiliconFlow](https://siliconflow.cn) 的 CosyVoice2-0.5B 模型。
|
||||
|
||||
[](https://github.com/your-username/siliconflow-tts-ha/releases)
|
||||
[](LICENSE)
|
||||
[](https://github.com/homeassistant-addons/siliconflow-tts/releases)
|
||||
[](LICENSE)
|
||||
[](https://www.home-assistant.io/)
|
||||
[](README_OPENSOURCE.md)
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
1. 确保已安装 [HACS](https://hacs.xyz/)
|
||||
2. 进入 HACS → 集成
|
||||
3. 点击右上角 ⋮ → 自定义存储库
|
||||
4. 添加此仓库 URL:`https://github.com/your-username/siliconflow-tts-ha`
|
||||
4. 添加此仓库 URL:`https://github.com/homeassistant-addons/siliconflow-tts`
|
||||
5. 类别选择"集成"
|
||||
6. 搜索 "SiliconFlow TTS" 并安装
|
||||
7. 重启 Home Assistant
|
||||
@@ -272,7 +272,7 @@ script:
|
||||
|
||||
遇到问题?请通过以下方式反馈:
|
||||
|
||||
1. [GitHub Issues](https://github.com/your-username/siliconflow-tts-ha/issues)
|
||||
1. [GitHub Issues](https://github.com/homeassistant-addons/siliconflow-tts/issues)
|
||||
2. [Home Assistant 社区论坛](https://bbs.hassbian.com/)
|
||||
|
||||
## 🤝 贡献代码
|
||||
@@ -303,4 +303,4 @@ script:
|
||||
|
||||
⭐ 如果这个项目对您有帮助,请给我们一个 Star!
|
||||
|
||||
🔗 **项目链接**: https://github.com/your-username/siliconflow-tts-ha
|
||||
🔗 **项目链接**: https://github.com/homeassistant-addons/siliconflow-tts
|
||||
@@ -1,95 +0,0 @@
|
||||
# SiliconFlow TTS/STT 组件安装指南
|
||||
|
||||
## 安装步骤
|
||||
|
||||
### 1. 重启Home Assistant
|
||||
修改了组件文件后,需要重启Home Assistant以加载新的组件。
|
||||
|
||||
### 2. 添加集成
|
||||
重启后,按以下步骤添加集成:
|
||||
|
||||
1. 进入 **设置** > **设备与服务**
|
||||
2. 点击右下角的 **添加集成** 按钮
|
||||
3. 搜索 **SiliconFlow**
|
||||
4. 你应该能看到两个集成:
|
||||
- **SiliconFlow TTS**
|
||||
- **SiliconFlow STT**
|
||||
|
||||
### 3. 配置TTS
|
||||
1. 选择 **SiliconFlow TTS**
|
||||
2. 输入你的硅基流动API密钥
|
||||
3. 点击提交
|
||||
|
||||
### 4. 配置STT
|
||||
1. 选择 **SiliconFlow STT**
|
||||
2. 输入你的硅基流动API密钥
|
||||
3. 点击提交
|
||||
|
||||
### 5. 配置语音助手
|
||||
配置完成后:
|
||||
|
||||
1. 进入 **设置** > **语音助手**
|
||||
2. 在 **文本转语音** 中选择 **SiliconFlow TTS**
|
||||
3. 在 **语音转文本** 中选择 **SiliconFlow STT**
|
||||
|
||||
## 故障排除
|
||||
|
||||
### 找不到集成
|
||||
如果在添加集成页面找不到SiliconFlow:
|
||||
1. 确保已重启Home Assistant
|
||||
2. 检查日志是否有错误信息
|
||||
3. 确认文件结构正确
|
||||
|
||||
### API密钥验证失败
|
||||
如果API密钥验证失败:
|
||||
1. 检查API密钥是否正确
|
||||
2. 确认网络连接正常
|
||||
3. 检查硅基流动服务状态
|
||||
|
||||
### 语音助手中找不到选项
|
||||
如果在语音助手设置中找不到对应选项:
|
||||
1. 确保两个集成都已成功配置
|
||||
2. 重新加载集成
|
||||
3. 重启Home Assistant
|
||||
|
||||
## 使用方法
|
||||
|
||||
配置完成后,你可以:
|
||||
|
||||
### 在自动化中使用TTS
|
||||
```yaml
|
||||
action:
|
||||
- service: tts.speak
|
||||
target:
|
||||
entity_id: tts.siliconflow_tts
|
||||
data:
|
||||
message: "你能用高兴的情感说吗?<|endofprompt|>Hello World!"
|
||||
```
|
||||
|
||||
### 在脚本中使用
|
||||
```yaml
|
||||
script:
|
||||
test_tts:
|
||||
sequence:
|
||||
- service: tts.speak
|
||||
target:
|
||||
entity_id: tts.siliconflow_tts
|
||||
data:
|
||||
message: "测试消息"
|
||||
options:
|
||||
voice: "FunAudioLLM/CosyVoice2-0.5B:anna"
|
||||
```
|
||||
|
||||
### 使用自定义音色
|
||||
```yaml
|
||||
script:
|
||||
custom_voice:
|
||||
sequence:
|
||||
- service: tts.speak
|
||||
target:
|
||||
entity_id: tts.siliconflow_tts
|
||||
data:
|
||||
message: "自定义音色测试"
|
||||
options:
|
||||
reference_audio: "speech:your-voice-uri"
|
||||
```
|
||||
@@ -21,4 +21,4 @@
|
||||
|
||||
支持上传个人音色文件,实现个性化语音输出。
|
||||
|
||||
详细使用说明请查看 [GitHub 仓库](https://github.com/your-username/siliconflow-tts-ha)。
|
||||
详细使用说明请查看 [GitHub 仓库](https://github.com/homeassistant-addons/siliconflow-tts)。
|
||||
+3
-3
@@ -2,10 +2,10 @@
|
||||
"domain": "siliconflow_tts",
|
||||
"name": "SiliconFlow TTS",
|
||||
"version": "1.0.0",
|
||||
"documentation": "https://github.com/your-username/siliconflow-tts-ha",
|
||||
"issue_tracker": "https://github.com/your-username/siliconflow-tts-ha/issues",
|
||||
"documentation": "https://github.com/homeassistant-addons/siliconflow-tts",
|
||||
"issue_tracker": "https://github.com/homeassistant-addons/siliconflow-tts/issues",
|
||||
"requirements": ["aiohttp>=3.8.0", "async_timeout>=4.0.0"],
|
||||
"codeowners": ["@your-username"],
|
||||
"codeowners": ["@homeassistant-addons"],
|
||||
"config_flow": true,
|
||||
"dependencies": [],
|
||||
"after_dependencies": [],
|
||||
|
||||
Reference in New Issue
Block a user