Start Server

Use the following procedure to start the CPQD ASR Server only when it is not running. When the server is running, it will have no effect.

1) Open a console on the machine where the ASR server has been installed

2) Verify ASR server status

Verify the ASR server status using the following command:

sudo systemctl status asr-server

The following example shows an idle ASR server:

$ sudo systemctl status asr-server

● asr-server.service - CPqD Speech Recognition Server
   Loaded: loaded (/usr/lib/systemd/system/asr-server.service; disabled; vendor preset: disabled)
   Active: inactive (dead)
     Docs: https://speechweb.cpqd.com.br/asr/docs/latest

3) Start the ASR server

If the ASR server is stopped, it can be started with the following command:

sudo systemctl start asr-server

4) Verify ASR server status

Verify the ASR server status using the following command:

sudo systemctl status asr-server

The following example shows an ASR server that is running:

$ sudo systemctl status asr-server

● asr-server.service - CPqD Speech Recognition Server
   Loaded: loaded (/usr/lib/systemd/system/asr-server.service; disabled; vendor preset: disabled)
   Active: active (running) since Thu 2018-04-12 13:11:26 UTC; 16s ago
     Docs: https://speechweb.cpqd.com.br/asr/docs/latest
 Main PID: 1380 (java)
   CGroup: /docker/c4cbfc49230515553eced80d3bc4b229fe478b06aa0f3bd503cd1a3ed1cd53b3/system.slice/asr-server.service
           └─1380 java -Xms128m -Xmx256m -XX:MaxDirectMemorySize=512m -XX:ErrorFile=/var/log/cpqd/asr/server/hs_err_pid%p.log -Dcpqd.asr.wrapper.file=/opt/cpqd/asr/config/server/asr-wrapper.properties -Dcpqd.sessionlog.config.fi...

Apr 12 13:11:26 c4cbfc492305 systemd[1]: Started CPqD Speech Recognition Server.
Apr 12 13:11:26 c4cbfc492305 systemd[1]: Starting CPqD Speech Recognition Server...
Apr 12 13:11:26 c4cbfc492305 start-server[1380]: Starting process asr-server...

5) Wait for the ASR server to start

Wait for the ASR server to finish the startup process, using the following command:

cpqdasr-status

The command should return only after the server is ready to receive requests.

Warning

When using free speech recognition, ASR startup can take a few minutes (usually less than 5) and the return of the above command will be displayed only after startup is complete.

The result must be as shown below, with the most important lines highlighted:

$ cpqdasr-status
Service Status: STARTED

Health Check:
{
    "asr-engine": {
        "healthy": true,
        "message": "CPqD ASR Server: 2.6.0 [Engine: 3.2.0]"
    },
    "deadlocks": {
        "healthy": true
    },
    "direct-memory": {
        "healthy": true,
        "message": "directMemoryUsed: 0.0078125 MB, totalCapacity: 0.0078125 MB, maxDirectMemory: 512.0 MB"
    },
    "license-manager-visibility": {
        "healthy": true
    },
    "license-status": {
        "healthy": true,
        "message": "ONLINE"
    }
}

6) Verify the log and confirm the ASR server startup

Verify if the ASR server has started up successfully, using the log /var/log/cpqd/asr/server/asr-server.log. Run the following command:

tail -F /var/log/cpqd/asr/server/asr-server.log

Server startup is confirmed by the message Server started, as shown in the example:

$ tail -F /var/log/cpqd/asr/server/asr-server.log

WARN   [18-04-16 16:40:49.073] [main] b.c.c.a.s.AsrServerApplication [ ] Starting ASR Server...
WARN   [18-04-16 16:40:49.076] [main] b.c.c.a.AsrEngine [ ] Loading ASR: /opt/cpqd/asr/engine/lib/libcpqd_asr.so, /opt/cpqd/asr/config/engine/engine.conf
WARN   [18-04-16 16:40:56.218] [main] b.c.c.a.AsrEngine [ ] [0] ASR engine created (3.2.0)
WARN   [18-04-16 16:40:56.218] [main] b.c.c.a.s.AsrServerApplication [ ] Server started after 241 secs