Environment Variables
All environment variables are optional. The defaults provide sensible behavior for local usage.
Audio Routing
Variable |
Default |
Description |
|---|---|---|
|
|
Audio mode: |
|
(auto) |
Full relay URL (e.g., |
|
(none) |
Relay host (combined with port to build URL) |
|
|
Relay server port |
|
|
Relay server bind host |
Backend Configuration
Variable |
Default |
Description |
|---|---|---|
|
(none) |
ElevenLabs API key for premium TTS |
|
(none) |
Alternative ElevenLabs API key variable |
General
Variable |
Default |
Description |
|---|---|---|
|
|
Base directory for audio cache and reference files |
|
(none) |
Set to |
Port Convention
The default port 31293 encodes “sa-i-te-ku-su” (サイテクス) in Japanese phone keypad mapping. Other SciTeX ports follow the same scheme:
Port |
Service |
|---|---|
31291 |
crossref-local API |
31292 |
openalex-local API |
31293 |
Audio relay |
31294 |
scitex-cloud staging |
ENV_SRC Pattern
Instead of setting individual environment variables, you can use a .src file:
# Generate a template
scitex-audio env-template -o ~/.scitex/audio/local.src
# Point to it
export SCITEX_AUDIO_ENV_SRC=~/.scitex/audio/local.src
The loader (_env_loader.py) parses export VAR=value lines, expands
$VAR / ${VAR} references, and strips quotes. This is especially useful
for MCP servers where you can set a single env var in .mcp.json:
{
"mcpServers": {
"scitex-audio": {
"command": "scitex-audio",
"args": ["mcp", "start"],
"env": {
"SCITEX_AUDIO_ENV_SRC": "${SCITEX_AUDIO_ENV_SRC}"
}
}
}
}
Switch environments via your shell profile:
# Local machine (has speakers)
export SCITEX_AUDIO_ENV_SRC=~/.scitex/audio/local.src
# Remote server (no speakers, uses relay)
export SCITEX_AUDIO_ENV_SRC=~/.scitex/audio/remote.src
Variable |
Description |
|---|---|
|
Path to a |
Example Shell Configuration
# Local machine (has speakers)
export SCITEX_AUDIO_MODE=local
export SCITEX_AUDIO_RELAY_PORT=31293
# Remote server (no speakers, uses SSH tunnel)
export SCITEX_AUDIO_MODE=remote
export SCITEX_AUDIO_RELAY_PORT=31293
# ElevenLabs (optional, for premium quality)
export SCITEX_AUDIO_ELEVENLABS_API_KEY="your-key-here"