Skip to content

Commit

Permalink
add: standalone tts readme update (ss220-space#3508)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladisvell authored Sep 13, 2023
1 parent 4e37292 commit a860e68
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
17 changes: 11 additions & 6 deletions tools/ttsServer/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Описание
Это self-hosted версия TTS сервера на основе моделей Silero. Совместима с билдом на момент 14.08.2023
Это self-hosted версия TTS сервера на основе моделей Silero. Совместима с билдом на момент 13.09.2023

Модели Silero предоставлены https://github.com/snakers4/silero-models/tree/master

Expand All @@ -17,20 +17,25 @@ Python 3.11.+ (версии ниже не проверял, просьба от

## Установка

Воспользуйтесь в командной строке `pip install -r requirements.txt`
Воспользуйтесь в командной строке, открытой в папке tools\ttsServer: `pip install -r requirements.txt`
Или воспользуйтесь файлом `install_requirements.bat`

Если не установлен ffmpeg, установите его. https://ffmpeg.org/download.html

## Как пользоваться

Включите в конфигурации билда в `config.txt` (раскоменнтируйте следующее):
Включите в конфигурации билда в `config.txt` (раскомментируйте следующее):
`TTS_TOKEN_SILERO mytoken` (токен не важен, он не используется)
`TTS_URL_SILERO https://example.com`
`TTS_ENABLED`
`TTS_CACHE`

Запустите `tts_server.py` через bat файл `launch_server.bat` или воспользуйтесь командной строкой и введите `python tts_server.py`.
Будет выведен адрес сервеа и номер порта для подключения к API, заполните файл `sensitive.dm` в строчке
`GLOBAL_REAL_VAR(tts_url_silero) = ...` и введите заместо `...` полученные данные, например
`GLOBAL_REAL_VAR(tts_url_silero) = "http://127.0.0.1:5000/tts/"`
Будет выведен адрес сервера и номер порта для подключения к API, заполните файл `config.txt` в строчке `TTS_URL_SILERO` появившийся адрес
Пример задания:
`TTS_URL_SILERO http://127.0.0.1:5000/tts/`

Внимание: производительность разняется от компьютеру к компьютеру. Возможны задержки от 0.5 секунд.

## Примечания

Expand Down
1 change: 1 addition & 0 deletions tools/ttsServer/install_requirements.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pip install -r requirements.txt
2 changes: 1 addition & 1 deletion tools/ttsServer/tts_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ def process_tts():

if __name__ == '__main__':
#Note: if you don't change host and port, default setting to import to sensitive.dm will be "http://127.0.0.1:5000/tts/"
print(f'Server is starting up. Copy and paste this into sensitive.dm var tts_url_silero: "http://{host}:{port}/tts/"')
print(f'Server is starting up. TTS URL: "http://{host}:{port}/tts/"')
api.run(host=host, port=port)

0 comments on commit a860e68

Please sign in to comment.