MVP pronunciation assessment: phonemizer + alignment + scoring + AI feedback. Endpoint: POST /pronounce/assess
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
from flask import Flask, request, Response
|
||||
import requests
|
||||
import json
|
||||
|
||||
app = Flask(__name__)
|
||||
GROQ_BASE = "https://api.proxyapi.ru/openai"
|
||||
@@ -11,6 +12,12 @@ CORS = {
|
||||
"Access-Control-Allow-Headers": "Authorization, Content-Type",
|
||||
}
|
||||
|
||||
# Импорт pronounce после создания app
|
||||
import sys, os
|
||||
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
||||
from pronounce import register_routes
|
||||
register_routes(app)
|
||||
|
||||
@app.route("/<path:path>", methods=["OPTIONS"])
|
||||
def options(path):
|
||||
return Response(status=204, headers=CORS)
|
||||
|
||||
Reference in New Issue
Block a user