
phonexia/spePhonexia Speech Engine (SPE) is HTTP server provides REST API designed for developers who want to integrate Phonexia speech technologies.
Note: Pulling an images requires using a specific tag. The latest tag is not supported. See Tag naming chapter for more info.
Starting a Phonexia Speech Engine version 3.61 with VAD technology:
shell$ docker run --detach --name some-spe --publish 8600:8600 --volume /license.dat:/opt/spe/license.dat phonexia/spe:3.61-vad
or:
shell$ docker network create some-network $ docker run --detach --name some-spe --network some-network --volume /license.dat:/opt/spe/license.dat phonexia/spe:3.61-vad
... where:
some-network is a newly created networksome-spe is the name you want to assign to your container/license.dat is path to Phonexia license file. Contact our support at *** to get the license.SPE is automatically configured, by entry point script, during the start to initialize 1 instance of technology (also 1 instance of stream variant of technology is initialized if available → it will consume another slot from license). See Technologies configuration chapter for more info.
You can visit API documentation from your web browser: http://localhost:8600/doc (you need to run SPE with --publish 8600:8600)
or user curl to get SPE status (you need to run SPE with --publish 8600:8600):
shell$ curl localhost:8600/status
or use phxclient in the image (SPE has to be connected to a some-network network):
shell$ docker run --rm --network some-network phonexia/spe:3.61-vad phxclient -m GET -u some-spe:8600/status
SPE is automatically configured, by entry point script, to start 1 instance of each technology upon container start (also 1 instance of stream variant of technology is initialized if available → it will consume another slot from license). To initialize multiple instances of technology you can use environment variable SPE_N_INSTANCES. You can also set number of workers by variables SPE_N_WORKERS and SPE_N_REALTIME_WORKERS (since SPE 3.55 workers are configured automatically (value -1) according to number of CPUs and number of configured technologies). To use 4 instances run:
shell$ docker run --detach --name some-spe -e SPE_N_INSTANCES=4 --publish 8600:8600 --volume /license.dat:/opt/spe/license.dat phonexia/spe:3.61-vad
... or you can use environment variable SPE_ENABLE_TECHNOLOGIES. This variable is passed as phxadmin2 technology enable ${SPE_ENABLE_TECHNOLOGIES} command in the entry point script. To configure 3 instances of VAD technology and 1 instance of VAD_STREAM technology run:
shell$ docker run --detach --name some-spe -e SPE_ENABLE_TECHNOLOGIES="vad:*=3 vad_stream:*=1" --publish 8600:8600 --volume /license.dat:/opt/spe/license.dat phonexia/spe:3.61-vad
... or you can bind your own configuration file to /opt/spe/settings/technologies.xml in the container. Entry point script doesn't configure SPE if the /opt/spe/settings/technologies.xml file already exists. See Data persistence chapter for more info.
Entry-point script variables:
| Variable | Description |
|---|---|
| SPE_N_INSTANCES | Initialize N instances of each technology. Default value is 1. |
| SPE_ENABLE_TECHNOLOGIES | Initialization string passed to phxadmin2 technology enable command. Example: enable 2 instances of VAD technology with model GENERIC_3 and 3 instances of VAD_STREAM technology: SPE_ENABLE_TECHNOLOGIES="vad:generic_3=2 vad_stream:generic_3=3" |
| SPE_UPGRADE_DATABASE | Do automatic database schema upgrade. This is useful when upgrading to new version of SPE and using MariaDB database (SQLite is upgraded automatically). User should do a backup of database before schema upgrade. |
SPE configuration varaibles:
Column Variable is the name of the environment variable, SPE property is the name of property in settings/phxspe.properties file to which is the variable mapped to.
| Variable | SPE property | Description |
|---|---|---|
| SPE_MULTITHREAD_INITIALIZATION | server.technology_multithread_initialization | Enable using multi-thread initialization |
| SPE_MULTITHREAD_INITIALIZATION_N | server.technology_multithread_initialization | Number of threads for initialization of technologies |
| SPE_ENABLE_AUTHENTICATION_TOKEN | server.enable_authentication_token | Authentication mode, false for basic authentication |
| SPE_ENABLE_RESOURCE_LOCKER | server.enable_resource_locker | Resource locker, locks resources while processing |
| SPE_DB_ENGINE | server.db.engine | Type of database ('SQLite' or 'MariaDB') |
| SPE_DB_SAVE_RESULTS | server.db.save_results | Store results of technologies in database |
| SPE_DB_SQLITE_DATA_SOURCE | server.db.sqlite.data_source | Set SQLite database file |
| SPE_DB_MARIADB_HOST | server.db.mariadb.host | Database address |
| SPE_DB_MARIADB_PORT | server.db.mariadb.port | Database port |
| SPE_DB_MARIADB_DB | server.db.mariadb.db | Database Name |
| SPE_DB_MARIADB_USER | server.db.mariadb.user | Database user name |
| SPE_DB_MARIADB_PASSWORD | server.db.mariadb.password | Database password |
| SPE_DB_MARIADB_OPTIONS | server.db.mariadb.options | Database options |
| SPE_DB_MARIADB_MAX_CONNECTIONS | server.db.max_connections | Maximum simultaneous connections |
| SPE_N_WORKERS | server.n_workers | No of workers |
| SPE_N_REALTIME_WORKERS | server.n_realtime_workers | No of realtime workers |
| SPE_FINISHED_TASK_TIMEOUT | server.finished_task_timeout | Timeout to auto remove finished task |
| SPE_LICENSE | server.license | Path to license file |
| SPE_INPUT_STRAM_RTP_STREAM_LIMIT | input_stream.rtp.stream_limit | No of max opened input RTP sessions |
| SPE_INPUT_STRAM_RTP_TIMEOUT | input_stream.rtp.timeout | Set timeout for input RTP socket in seconds |
| SPE_OUTPUT_STRAM_RTP_TIMEOUT | output_stream.rtp.timeout | Set timeout for output RTP socket in seconds |
| SPE_AUDIO_CONVERTER_ENABLED | audio_converter.enabled | Enable audio converter. Possible values: true, false, auto |
| SPE_AUDIO_CONVERTER_COMMAND | audio_converter.command | Set audio converter command |
| SPE_REPORTING_URLS | reporting.url | Comma separated list of addresses to reporting servers |
| SPE_REPORTING_SSL_ENABLED | reporting.ssl.enabled | Toggle SSL connection for sending reports |
| SPE_REPORTING_SSL_CA_FILE | reporting.ssl.ca_file | Set path to root CA certificate |
| SPE_REPORTING_SSL_CERTIFICATE_FILE | reporting.ssl.certificate_file | Path to certificate file |
| SPE_REPORTING_SSL_PRIVATE_KEY_FILE | reporting.ssl.private_key_file | Path to private key file |
| SPE_REPORTING_SSL_PRIVATE_KEY_PASSWORD | reporting.ssl.private_key_password | Private key password, leave empty if omitted |
| SPE_REPORTING_SSL_CIPHER_LIST | reporting.ssl.cipher_list | Set ssl cipher list |
| SPE_TECHNOLOGIES_TTS_CONNECTORS | external.technologies.tts_connectors | Enable text to speech connectors |
See data/phxspe.properties.default file for more info:
shell$ docker run --rm phonexia/spe:3.61-vad cat data/phxspe.properties.default
SPE_OUTPUT_STREAM_RTP_TIMEOUT If output stream doesn't send any data for more than given timeout, it is closed. Prevents stuck stream in case client forgets to close stream.
SPE_TECHNOLOGIES_TTS_CONNECTORS Enables external technology Text To Speech. Comma separated list of connector's folder names. By default stored in external/technologies/tts folder. Each connector has to be configured by it's own configuration file, located in it's folder. Template for creating such configuration file can be found in connectors.properties.template file in the connector's folder.
You can inspect default values of environment variables by run:
shell$ docker inspect phonexia/spe:3.61-vad
SPE configuration is stored in /opt/spe/settings folder. Files phxspe.properties and technologies.xml in this folder are generated automatically upon container start (if don't exist). You can bind your own configuration files by bind the settings folder:
shelldocker run --detach --name some-spe --publish 8600:8600 --volume /license.dat:/opt/spe/license.dat --volume /spe/my_settings:/opt/spe/settings phonexia/spe:3.61-vad
You can edit those files manually. You can also edit technologies.xml file by phxadmin or phxadmin2 utilities. Restart of SPE is required after editing configuration files.
You can list currently configured technologies:
shell$ docker run --rm --volume /spe/my_settings:/opt/spe/settings phonexia/spe:3.61-vad phxadmin2 technology
You can enable or disable VAD technology:
shell$ docker run --rm --volume /spe/my_settings:/opt/spe/settings phonexia/spe:3.61-vad phxadmin2 technology enable vad $ docker run --rm --volume /spe/my_settings:/opt/spe/settings phonexia/spe:3.61-vad phxadmin2 technology disable vad
See help for more info:
shell$ docker run --rm phonexia/spe:3.61-vad phxadmin2 --help
SPE stores data in folders home and shared. SQLite database file is stored in home folder by default. You can make data persistent by bind those folders:
shell$ docker run --detach --name some-spe --publish 8600:8600 --volume /license.dat:/opt/spe/license.dat --volume /spe/my_home:/opt/spe/home --volume /spe/my_shared:/opt/spe/shared phonexia/spe:3.61-vad
Use environment variable SPE_REPORTING_URLS to confiugure RLS addresses:
shell$ docker run --detach --name some-spe --publish 8600:8600 --volume /license.dat:/opt/spe/license.dat -e SPE_REPORTING_URLS="server1.com:8777, 192.168.0.10:8777" phonexia/spe:3.61-vad
Start MariaDB database with persistent storage in /mariadb-data folder:
shell$ docker run -d --network some-network --name mariadb --volume /mariadb-data:/var/lib/mysql -e MARIADB_ROOT_PASSWORD=secret -e MARIADB_DATABASE=phxspe mariadb:latest
Where secret is a password for root user in MariaDB and phxspe is a name of SPE's database.
Run SPE using MariaDB database:
shelldocker run --detach --name some-spe --network some-network --volume /license.dat:/opt/spe/license.dat -e SPE_DB_ENGINE=MariaDB -e SPE_DB_MARIADB_HOST=mariadb -e SPE_DB_MARIADB_USER=root -e SPE_DB_MARIADB_PASSWORD=secret -e SPE_DB_MARIADB_DB=phxspe phonexia/spe:3.61-vad
Example docker-compose.yml file for SPE:
yamlversion: '3' services: mariadb: image: mariadb:latest container_name: mariadb environment: MARIADB_ROOT_USER: root MARIADB_ROOT_PASSWORD: secret MARIADB_USER: phonexia MARIADB_DATABASE: phxspe volumes: - dbdata:/var/lib/mysql healthcheck: test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"] timeout: 20s retries: 10 spe: image: phonexia/spe:3.61-vad container_name: spe links: - mariadb environment: SPE_DB_ENGINE: MariaDB SPE_DB_MARIADB_HOST: mariadb SPE_DB_MARIADB_USER: root SPE_DB_MARIADB_PASSWORD: secret SPE_DB_MARIADB_DB: phxspe ports: - 8600:8600 volumes: - home:/opt/spe/home - shared:/opt/spe/shared - settings:/opt/spe/settings - /spe/license.dat:/opt/spe/license.dat depends_on: mariadb: condition: service_healthy healthcheck: test: ["CMD", "curl" ,"-f", "http://localhost:8600/status"] timeout: 30s retries: 10 volumes: dbdata: home: shared: settings:
Where /spe/license.dat is path to license file.
Run docker-compose up -d in the folder with the docker-compose.yml file.
Example spe-vad-sqe-sid4.Dockerfile file combining VAD, SQE and SID4 technologies:
dockerfileFROM phonexia/spe:3.61-vad as VAD FROM phonexia/spe:3.61-sqe as SQE FROM phonexia/spe:3.61-sid4 as SID4 FROM phonexia/spe:3.61 COPY --from=VAD /opt/spe/bsapi ./bsapi COPY --from=SQE /opt/spe/bsapi ./bsapi COPY --from=SID4 /opt/spe/bsapi ./bsapi
Run docker build -t spe-vad-sqe-sid4:3.61 -f spe-vad-sqe-sid4.Dockerfile . in the folder with spe-vad-sqe-sid4.Dockerfile file to build an image.
There are few version naming styles, to make it easy to stay with newest or your preferred version of SPE.
For example we have tag named 3.61.0-vad-generic_3. Where:
3.61.0 is version of SPE. If you want to keep track of a new bug-fix releases, you can specify version as 3.61, which will always point to the latest bug-fix versionvad is name of technology. Supported technologies are: age, denoise, diar, gid, kws, lid, sid, sid4, sqe, stt, tanalysis and vad.generic_3 is name of a technology model. Model name can be omitted for some technologies to get default model. For example VAD technology's default model is generic_3 sou you can use tag 3.61.0-vad instead.We also provide an image without any technology. The tag name contains only the version 3.61.0 or 3.61. Note that the SPE doesn't start with this image due to missing technology. This image is useful as a base image for combining multiple technologies (see the Combining multiple technologies section for more information)
探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
在 Linux 系统配置镜像服务
在 Docker Desktop 配置镜像
Docker Compose 项目配置
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
MacOS OrbStack 容器配置
在宝塔面板一键配置镜像
Synology 群晖 NAS 配置
飞牛 fnOS 系统配置镜像
极空间 NAS 系统配置服务
爱快 iKuai 路由系统配置
绿联 NAS 系统配置镜像
QNAP 威联通 NAS 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
无需登录使用专属域名
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
免费版仅支持 Docker Hub 访问,不承诺可用性和速度;专业版支持更多镜像源,保证可用性和稳定速度,提供优先客服响应。
专业版支持 docker.io、gcr.io、ghcr.io、registry.k8s.io、nvcr.io、quay.io、mcr.microsoft.com、docker.elastic.co 等;免费版仅支持 docker.io。
当返回 402 Payment Required 错误时,表示流量已耗尽,需要充值流量包以恢复服务。
通常由 Docker 版本过低导致,需要升级到 20.x 或更高版本以支持 V2 协议。
先检查 Docker 版本,版本过低则升级;版本正常则验证镜像信息是否正确。
使用 docker tag 命令为镜像打上新标签,去掉域名前缀,使镜像名称更简洁。
来自真实用户的反馈,见证轩辕镜像的优质服务