Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
API_KEY=your_api_key_here
HOST=0.0.0.0
PORT=5050

DEFAULT_VOICE=en-US-AvaNeural
Expand All @@ -13,4 +14,4 @@ REMOVE_FILTER=False

EXPAND_API=True

DETAILED_ERROR_LOGGING=True
DETAILED_ERROR_LOGGING=True
3 changes: 2 additions & 1 deletion app/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

DEFAULT_CONFIGS = {
# Server settings
"HOST": '0.0.0.0',
"PORT": 5050,
"API_KEY": 'your_api_key_here', # Fallback API key

Expand All @@ -16,4 +17,4 @@
"REMOVE_FILTER": False,
"EXPAND_API": True,
"DETAILED_ERROR_LOGGING": True,
}
}
3 changes: 2 additions & 1 deletion app/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
load_dotenv()

API_KEY = os.getenv('API_KEY', DEFAULT_CONFIGS["API_KEY"])
HOST = os.getenv('HOST', DEFAULT_CONFIGS["HOST"])
PORT = int(os.getenv('PORT', str(DEFAULT_CONFIGS["PORT"])))

DEFAULT_VOICE = os.getenv('DEFAULT_VOICE', DEFAULT_CONFIGS["DEFAULT_VOICE"])
Expand Down Expand Up @@ -258,5 +259,5 @@ def azure_tts():
print(f" ")

if __name__ == '__main__':
http_server = WSGIServer(('0.0.0.0', PORT), app)
http_server = WSGIServer((HOST, PORT), app)
http_server.serve_forever()