Note: The work in progress.
Assumption: build environment is RPM-based distro with UniMRCP packages unimrcp-client
, unimrcp-client-devel
, unimrcp-server
, unimrcp-server-devel
already installed.
$ sudo yum install unimrcp-client unimrcp-client-devel unimrcp-server unimrcp-server-devel
Datails of instalation are available at https://www.unimrcp.org/manuals/html/RPMInstallationManual.html.
Development environment is Fedora.
There must be Rust in the environment: https://www.rust-lang.org/learn/get-started.
Plugin depends on clang
and openssl
development kits. So please ensures they are available in building environment.
Build the plugin with:
cargo build --release
Then copy libakplugin.so
from target/release
to unimrcp/plugin
(usually you need sudo privilege).
Edit config of the uniMRCP-server, file unimrcp/conf/unimrcpserver.xml
. Add line:
<engine id="Ak-Synth" name="libakplugin" enable="true"/>
Disable other synth-plugins like this:
<engine id="Demo-Synth-1" name="demosynth" enable="false"/>
.
On start the server loads the plugin, you may see in logs something like this
[INFO] Load Plugin [Ak-Synth] [/opt/unimrcp/plugin/libakplugin.so]
### Bug at virtual function
stream_read
In the scenario "synth" server calls stream_read
infinitely.
### Plugin works correctly
But does not do any actual synthesize. Client gets empty file.
To be functional plugin needs to be built with .secret
file in src
directory.
File .secret
must be:
pub(crate) static YANDEX_KEY: &str = "Your Yandex Passport OAUTH Token";
pub(crate) static FOLDER_ID: &str = "Your Yandex SpeechKit folder ID";
Be careful, your secrets are baked into the code of the plugin. So DO NOT distribute it as a compiled file.
Plugin accepts plain text from demo-synth
, sends the plain text to Yandex SpeechKit, all the received LPCM-stream is directed to the CLIENT. So you get your speech synthesized in unimrcp/var
directory as pcm-file.