MVP pronunciation assessment: phonemizer + alignment + scoring + AI feedback. Endpoint: POST /pronounce/assess

This commit is contained in:
“Naeel”
2026-05-23 17:34:45 +04:00
parent 2d94980038
commit 415b27edc2
3 changed files with 382 additions and 0 deletions
+7
View File
@@ -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)