Phoe2004 commited on
Commit
5fc0f2e
·
verified ·
1 Parent(s): 11d3b2d

Upload 5 files

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -4,8 +4,9 @@ import asyncio
4
  import tempfile
5
 
6
  import edge_tts
7
- from flask import Flask, request, jsonify, send_file, render_template, after_this_request
8
 
 
9
  app = Flask(__name__)
10
 
11
  # --- Myanmar voices available in Edge TTS ---
@@ -31,7 +32,7 @@ def clamp_pct(value, lo=-50, hi=50):
31
 
32
  @app.route("/")
33
  def index():
34
- return render_template("index.html", voices=VOICES, default_voice=DEFAULT_VOICE)
35
 
36
 
37
  @app.route("/api/voices")
 
4
  import tempfile
5
 
6
  import edge_tts
7
+ from flask import Flask, request, jsonify, send_file, after_this_request
8
 
9
+ BASE_DIR = os.path.dirname(os.path.abspath(__file__))
10
  app = Flask(__name__)
11
 
12
  # --- Myanmar voices available in Edge TTS ---
 
32
 
33
  @app.route("/")
34
  def index():
35
+ return send_file(os.path.join(BASE_DIR, "index.html"))
36
 
37
 
38
  @app.route("/api/voices")