SOUND4 BIGVOICE.CL Library [1.1.15]
Loading...
Searching...
No Matches
Environment variables and parameters

Parameters defaulting from environment

The following environment variables are used by software library:

Note
Those variables can be passed as parameters when creating the instance.
Note
boolvalue are (case insensitive):
  • 0,false,no,n : disable
  • 1,true,yes,y,(empty),(any) : enable

Webserver authentification setup :

  • SETUP_USER : The setup user name
  • SETUP_SECRET : The setup user password
  • ADMIN_USER : The admin user name
  • ADMIN_SECRET : The admin user password
Web login initialization
If the storage is not yet initialized, you can choose how to protect the web access.
There are 2 modes:
  1. Setup mode: you define a setup account, which can then create an administrator account.
    The setup account always keeps the access and can delete the administrator.
  2. Admin mode: you define the administrator, which will be the single administrator.
To select the mode, you have to put in the parameters
  1. SETUP_USER (and optionally SETUP_SECRET) to select Setup mode
  2. ADMIN_USER (and optionally ADMIN_SECRET) to select Admin mode
  3. none: the web access is opened, no login will be asked
If you do not set the xxx_SECRET, then the setuppassword will be randomly generated and print in logs (at info severity).
You can also use the JSON api to change this after the storage is created : see Change setup account

Webserver secure :

  • SSL_CERTIFICATE_PATH : path to the SSL public certificate
  • SSL_PRIVATE_PATH : path to the SSL private certificate

Network access :

  • LICENSE_SERVER : the SOUND4 license server's URL
  • LICENSE_SERVER_PROXY : proxy server to use for licenses [user:pass@]host:port
  • LICENSE_CERT_DIR : optional certificates dirs for HTTPS verification
  • LICENSE_CERT_BUNDLE : optional certificates bundle for HTTPS verification
  • LICENSE_CERT_CHECK : if "false", do not check HTTPS certificates

Parameters

The following parameters can be set before creating instance, but are never taken from environment.

Run mode:

  • FILE_MODE=seconds : force file mode, settings the maximum estimated audio duration (non realtime, wait license ok to process)
  • STATE_FILENAME=filename : force this instance to store its state in file named filename.json (instead of state.json)
  • STATE_ONAIR=filename : force this instance to store its on air preset name in file named filename.onair (instead of none). Used for sharing between instances.
  • STORAGE_RO=boolvalue : force the storage in read-only mode
  • STATE_RO=boolvalue : force the state in read-only mode (but can save presets/auth)
  • WAIT_LICENSE=boolvalue : force to wait the license load before starting (always in file mode)
  • FAST_START=boolvalue : do not to try loading the license before starting (never in file mode)
  • LOG_HEADER=string : use string as header for logs in instance as much as possible

Web server options:

  • COOKIE_DOMAIN=domain : Force login cookie's domain
  • COOKIE_PATH=path : Force login cookie's path
  • COOKIE_SECURE=mode : Force login cookie's secure mode [true|false]
  • COOKIE_SAMESITE=mode : Force login cookie's secure mode [default|strict|lax|none]

Preset sharing

You can use the same folder for multiple instances so they share their presets.

In this case, you should use a different STATE_FILENAME per instance so they keep their settings and on air presets separated. If not, each time settings or onair preset are changed, the changes will be reflected to the other intances using same STATE_FILENAME.

You may use the same STATE_ONAIR for multiple instances sharing the folder, so that changing the on air preset on one immediatly changes the on air preset on other instances using the same STATE_ONAIR. If the instance has pending unsaved changes in the on air preset, it will not be updated automatically to avoid loosing changes.

Workaround for known problems

.NET (C#)

If you are using the library in a .NET program, you may trigger a SEGV due to .NET incompatibility with Go, referenced in dotnet issue 110368 (present at least up to .NET 10.0.107).

This library has a mitigation to avoid the crash. You need to set the variable SOUND4_DOTNET_MITIGATION=1 in environment before loading the library to activate it. You can check it is activated by setting SOUND4_DOTNET_MITIGATION_VERBOSE=1 the same way, which should output information on stderr.

If you intend to attach a debugger (managed or native) to the host, set SOUND4_DOTNET_MITIGATION_DEBUGGER=1 instead. It supersedes SOUND4_DOTNET_MITIGATION (no need to set both) and additionally clears SA_ONSTACK on SIGTRAP so the debugger attach does not kill the process.

Note
calling Environment.SetEnvironmentVariable from C# is not sufficient on Linux , you need to call setenv from libc.