Add Tauri integration and server management features. Introduced auto-start functionality for the bundled server in Tauri environment, added configuration management for data directories, and refactored backend components to utilize the new config module. Updated dependencies and improved project structure for better organization.

This commit is contained in:
Jamie Pine
2026-01-25 04:25:45 -08:00
parent 6164877f7f
commit d14aca2267
19 changed files with 432 additions and 60 deletions
+49
View File
@@ -0,0 +1,49 @@
"""
Entry point for PyInstaller-bundled voicebox server.
This module provides an entry point that works with PyInstaller by using
absolute imports instead of relative imports.
"""
import argparse
import uvicorn
# Import the FastAPI app from the backend package
from backend.main import app
from backend import config, database
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="voicebox backend server")
parser.add_argument(
"--host",
type=str,
default="127.0.0.1",
help="Host to bind to (use 0.0.0.0 for remote access)",
)
parser.add_argument(
"--port",
type=int,
default=8000,
help="Port to bind to",
)
parser.add_argument(
"--data-dir",
type=str,
default=None,
help="Data directory for database, profiles, and generated audio",
)
args = parser.parse_args()
# Set data directory if provided
if args.data_dir:
config.set_data_dir(args.data_dir)
# Initialize database after data directory is set
database.init_db()
uvicorn.run(
app,
host=args.host,
port=args.port,
log_level="info",
)