Skip to main content

Authentication and Database Settings

Authentication

This section is important for developers. If sessions are enabled and multiple REST clients connect to a single SPE, then the X-Session must be shared between the REST clients; the session token must be shared and managed outside of SPE. If you are experiencing troubles during evaluation, set this directive to false and try Basic authentication as described here: API documentation - Authentication. More advanced configuration and large-scale deployment should be discussed within Phonexia Customer Support.

# Authentication mode
# Set true for authentication with sessions
# Set false for basic authentication
server.enable_authentication_token = true

Keep the Resource locker in the default configuration:

# Resource locker
# If enabled, every resource (file, speaker model, keyword list etc.) is exclusively locked for modifications during processing.
# This ensures that resource cannot be modified when it is used for processing
server.enable_resource_locker = true

Database settings

SQLite is a great database for most evaluation use cases. However, if you would like to use the database as the logging target, it must be switched to a MySQL type of database. Also, if your architecture requires shared user resources, you have to use a MySQL type of database. Supported MySQL engines are based on MySQL v5.6+ (SPE up to 3.45) or MariaDBv10.x (SPE 3.46+).

warning

MySQL is not supported since SPE 3.46, please use MariaDB instead.

# Type of database
# Suported are SQLite and MariaDB
server.db.engine = SQLite

The database is mainly used as a working cache. Details about SPE user accounts are saved in the database as permanent objects, and speech processing results are stored inside as dependent objects. The results are available as long as the audio recording is present in the home directory. Whenever audio files are deleted from the storage using the appropriate RESTful API call, all related results are erased from database.

# Store results of technologies in database
server.db.save_results = true
# Set SQLite database file
server.db.sqlite.data_source = ${application.dir}phxspe.sqlite

When you opt for more advanced database usage, configure the connector using these directives:

# MariaDB database configuration
# server.db.engine = MariaDB
# Database address
# server.db.mariadb.host = 127.0.0.1
# Database port
# server.db.mariadb.port = 3306
# Name of database
# server.db.mariadb.db = phxspe
# Database user name
# server.db.mariadb.user = phonexia
# Database password
# server.db.mariadb.password = phonexia
# Database options
# server.db.mariadb.options = compress=true;auto-reconnect=true
# Maximum of MariaDB database connections at the time. Default value is 32.
# server.db.mariadb.max_connections = 32