diff --git a/Dockerfile b/Dockerfile index 0fc7965..305961f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -45,5 +45,5 @@ RUN mkdir -p uploads ENV WHISPER_CPP_PATH="/app/whisper.cpp" ENV MODEL_PATH="/app/whisper.cpp/models/ggml-small.en.bin" -EXPOSE 5000 +EXPOSE 4002 CMD ["python3", "app.py"] diff --git a/app.py b/app.py index fe56f2b..d0a9908 100644 --- a/app.py +++ b/app.py @@ -8,7 +8,7 @@ app = Flask(__name__) WHISPER_CPP_PATH = os.getenv("WHISPER_CPP_PATH", "/app/whisper.cpp/main") # Absolute path MODEL_PATH = os.getenv("MODEL_PATH", "/app/whisper.cpp/models/ggml-small.en.bin") # Absolute path -@app.route('/transcribe', methods=['POST']) +@app.route('/stt', methods=['POST']) def transcribe_audio(): if 'audio' not in request.files: return jsonify({"error": "No audio file provided"}), 400 @@ -56,4 +56,4 @@ def transcribe_audio(): os.remove(tmp_path + ".txt") if __name__ == '__main__': - app.run(host='0.0.0.0', port=5000) + app.run(host='0.0.0.0', port=4002)