Skip to main content

Executable Files

This article explains the purpose and usage of executables distributed in the SPE package: phxspe, phxclient, phxadmin and phxadmin2.

phxspe

phxspe is the main SPE executable, launching this file starts the SPE itself.

Command line parameters supported by phxspe are listed below:
(use appropriate OS-specific parameter separator, e.g., use --help in Linux and /help in Windows).

Generic

  • help – Show help information on command line parameters and exit.
  • version – Show version and exit.
  • config=<file> – Use a specified SPE configuration file.
  • license=<file> – Use a specified license file.
  • cwd=<directory> – Set the current working directory before launching SPE.
  • terminate-by-stdin – Terminate the server by entering the q character.

Linux-specific

  • daemon – Run SPE in the background as a daemon.
  • umask=<mask> – Set the "umask" value for the daemon (in octal format, e.g., 027).
  • pidfile=<path> – Write the application's process ID (PID) to the specified file.

Windows-specific

  • registerService – Register the application as a Windows service.
  • displayName=<text> – Specify the service's friendly name (valid only with registerService).
  • description=<text> – Specify the service description (valid only with registerService).
  • startup=automatic|manual – Specify the service startup mode (valid only with registerService).
  • unregisterService – Unregister the previously registered Windows service.

phxclient

phxclient is a simple command line SPE client. It is specifically designed for the SPE REST API, e.g., it automatically handles polling for asynchronous requests results. phxclient also provides additional functionality related to SPE features, such as the ability to stream audio recordings via RTP or HTTP stream. Therefore it's useful for quick testing of the SPE API without complex scripting or programming.

Command line parameters supported by phxclient are listed below:   (use the appropriate OS-specific parameter separator, e.g. use --help in Linux and /help in Windows).

  • help – Show help information on command-line parameters and exit.
  • verbose – Use verbose output.
  • method=<name> – Set HTTP method (GET, POST, DELETE, etc.).
  • uri=<uri> – Set URI for the HTTP request.
  • login=<username> – Set username for HTTP Basic authentication.
  • password=<password> – Set user password for HTTP Basic authentication.
  • session=<session> – Set session ID for authentication.
  • data=<file> – Path to the file to be sent (usually via POST or PUT).
  • content-type=<content_type> – Set Content-Type for the data to be sent (e.g., "application/json").
  • chunked – Send data using HTTP chunked transfer encoding.
  • rtp=<host>:<port> – Send data using RTP stream to the specified "host" and "port"
  • rtp-payload=<payload> – Set RTP payload type. Supported payloads are 0, 8, 10, 11, 35, 36 (see API documentation for more details). The payload must correspond with the data in the file (set by the "data" parameter). If omitted, the default payload type 11 is used.
  • webhook=<url> – Use Webhook to deliver asynchronous request results to a URL (e.g., "http://server:port").
  • priority=number – Set request priority (see the article processing priority for more details).

phxclient: example 1

phxclient /login=admin /password=phonexia /method=POST/uri="127.0.0.1:8600/audiofile?path=/myfile.wav" /data="c:\\audio files\\example recording.wav"

Upload the example recording.wav file from the c:\audio files folder to SPE running on this machine (i.e., with IP address 127.0.0.1) and place it in the root of the SPE internal storage under the name myfile.wav. See the POST /audiofile endpoint documentation for details.

phxclient: example 2

#Windows
phxclient /login=admin /password=phonexia /method=GET
/uri="127.0.0.1:8600/technologies/stt/?path=/myfile.wav&model=en_us_6&result_type=one_best,n_best&cache_disable=true"
#Linux
./phxclient --login=admin --password=phonexia --method=GET
--uri="127.0.0.1:8600/technologies/stt/?path=/myfile.wav&model=en_us_6&result_type=one_best,n_best&cache_disable=true"

Process the myfile.wav file stored in the root of SPE internal storage—e.g., uploaded using the previous example—using the Speech To Text (STT) technology model EN_US_6 (6th generation English). Return one_best and n_best result types, and disable any possibly previously cached results (i.e., ensure physical processing of the file). See the GET /technologies/stt endpoint documentation for details.

phxadmin

phxadmin is an interactive command-line-based SPE administration utility for user management, technologies configuration, diagnostic info collection, etc. Due to its interactivity, it's not suitable for automation. The phxadmin2 is a scripting-friendly tool intended for automated administration.

Command line parameters supported by phxadmin are listed below:   (use appropriate OS-specific parameter separator, e.g., use **--**help in Linux and **/**help in Windows).

Generic

  • help – Show help information on command-line parameters and exit.
  • version – Show version and exit.
  • config=<file> – Use the specified SPE configuration file.
  • license=<file> – Use the specified license file.

User management

  • add-user – Create a new user account.
  • edit-user – Edit an existing user account.
  • delete-user – Remove an existing user account.
  • show-user – Show information about an existing user account.
  • list-users – List all existing user accounts.

Technologies configuration

  • configure-tech – Run the technologies configuration wizard, which creates a technologies configuration file.
  • available-tech=<file> – Create a technologies configuration file containing all available technologies and technology models. The file extension determines the resulting file format (XML or JSON).
  • add-language-pack=<path> – Add a custom LID language pack from the specified directory. The language pack name will be the same as the directory name.
  • delete-language-pack – Delete a custom LID language pack.

Support

  • hwgen[=<file>] – Create a machine hardware profile file.
  • report – Create an SPE report useful for troubleshooting and diagnostics. The report contains configuration, logs, licenses, and the hardware profile of the current computer.

Migration from legacy version

  • upgrade – Transfer data from REST SERVER v2 to Speech Engine v3. Requires the v2-properties and v2-cwd parameters.
  • v2-properties=<file> – Path to the REST SERVER v2 bsapirest.properties configuration file.
  • v2-cwd=<path> – Path to the REST SERVER v2 working directory. This is usually the path to the REST SERVER v2 bin directory.

phxadmin2

phxadmin2 is an automation- and scripting-friendly, command-line-based SPE administration utility for user management, technology configuration, diagnostic information collection, etc.

Usage: phxadmin [OPTION | COMMAND] [subcommand] [suboption...]

Options

  • --help – Show help information on command-line parameters and exit.
  • --version – Show SPE version and exit.

Commands

  • user – Manage SPE users. Without a subcommand, lists all users.
  • technology – Manage technologies. Without a subcommand, lists enabled technologies.
  • language-pack – Manage LID language packs. Without a subcommand, lists all LID language packs.
  • hwgen – Create a machine hardware profile file.
  • report – Create an SPE report useful for troubleshooting and diagnostics.

Run phxadmin2 COMMAND --help to see available subcommands and additional usage details.

note

phxadmin2 uses internal codes for technology names. See the article describing the SPE configuration file article for a list of technology codes and names.

phxadmin2: example 1

./phxadmin2 hwgen SPE-007 --output-file ~/spe007_profile.txt

Create an HW profile named SPE-007 and save it to the spe007_profile.txt file in the home directory.

phxadmin2: example 2

./phxadmin2 technology show sid4? \*l\*

List all present technologies with names matching the "sid4 followed by any single character" pattern and models with names matching the "l preceded and followed by zero or more characters" pattern. This command lists SID4E and SID4C (SID4 extractor and SID4 comparator) with both L4 and XL4 models, depending on the actual availability of the technologies/models in that SPE installation. Due to the "...single character" pattern definition, the list won't include SID4E_STREAM, SID4C_STREAM, and SID4CALIB technologies.

phxadmin2: example 3

./phxadmin2 technology enable sid?\_stream:\*l?=3 sid4?\_stream:\*l?=1

  • Enable 3 instances of technologies with names matching the "sid followed by a single character, followed by _stream" pattern and models with names matching "l preceded by any number of characters and followed by any single character".
  • Also enable 1 instance of technologies with names matching the "sid4 followed by a single character, followed by _stream" pattern and models with names matching "l preceded by any number of characters and followed by any single character".

Assuming that all the technologies/models are available in that SPE installation, this command adds (*) the following to the technologies configuration file:

  • SIDE_STREAM for both L3 and XL3 models, 3 instances of each.
  • SIDC_STREAM for both L3 and XL3 models, 3 instances of each.
  • SID4E_STREAM for both L4 and XL4 models, 1 instance of each.
  • SID4C_STREAM for both L4 and XL4 models, 1 instance of each.

(*) Any existing entries in the technologies configuration file are retained (since no --disable-others option was included in the command).