Skip to main content

User Accounts

SPE has a simple built-in system of user accounts and user roles. This allows for flexible usage of SPE in your projects. For example, you can use it for different individual applications (where each application uses its own SPE user), or simply for different user roles within a single application (such as standard users and administrators).

Each user account has the following attributes:

  • Login name and password
  • Whether the account is active or not—accounts may be turned on or off
  • User role—any combination of:
    • user—allowed to use all SPE functionality, except for the /admin/... endpoints
    • admin—allowed to use all SPE functionality, including the /admin/... endpoints
    • prioritize—allowed to prioritize SPE tasks; see the Task prioritization section in the REST API documentation
  • Maximum pending requests—legacy REST Server 2.x attribute, ignored in SPE 3.x

It's important to realize that each SPE user account has its own home directory, where SPE stores the account's data, see the article SPE home directory article. It means that by default the accounts' data is isolated from each other.

Therefore, if different user accounts should have access to each other's data, you might want to use some filesystem trickery like a symlink to some shared directory, like in the following example:


├── user_1/
│ ├── data/   
│ └── storage/   
│ └── audio -> /shared_recordings/
├── user_2/
│  ├── data/
│    └── storage/  
│ └── audio -> /shared_recordings/
└── administrator/  
├── data/  
└── storage/
  └── audio -> /shared_recordings/

In the above example, we created a directory named audio in each SPE account's storage and created a symlink to a different directory called shared_recordings. If any of the SPE accounts uploads a file to the audio directory, that file will be accessible to the other SPE accounts.

note

When using such techniques, all "other" accounts still need to register the file to be able to actually use it in SPE. Otherwise, the file would be visible only to the account that originally uploaded it. This is because SPE stores some file metadata (name, timestamps, etc.) in its database, and files without a corresponding database record (which associates them with an SPE account) are not visible to SPE or to any account.

A similar technique can be used with the data directory, allowing the sharing of LID language models, language packs, SID speaker models, etc., between accounts.

User accounts management

SPE user accounts can be managed using REST API (see Administration section of the API documentation), or using command line administration utilities phxadmin or phxadmin2 (see the article about SPE executable files article).