github / github/platform-samples
ai
- 主要言語
- Shell
- スター
- 2.2k
- フォーク
- 1.9k
- 平均マージ
- 7日 19時間
- マージ済み PR(30日)
- 1
説明
from flask import Flask, render_template_string, request, send_file
import pyttsx3
import os
import uuid
import webbrowser
import threading
app = Flask(__name__)
HTML_FORM = """
Voice Service
🎤 Voice Service
Convert to Voice
"""
@app.route('/')
def home():
return render_template_string(HTML_FORM)
@app.route('/speak', methods=['POST'])
def speak():
text = request.form['text']
username = request.form['username']
engine = pyttsx3.init()
filename = f"{uuid.uuid4()}.mp3"
engine.save_to_file(f"{username} says: {text}", filename)
engine.runAndWait()
return send_file(filename, as_attachment=True)
def open_browser():
webbrowser.get("chrome").open("http://127.0.0.1:5000")
if __name__ == '__main__':
threading.Timer(1.5, open_browser).start()
app.run(debug=True)
コントリビューションガイド
調査の方向性
The body contains an inline Flask application with the home and /speak routes, but names no repository file, test, or requested change. First clarify whether this code is intended as a new platform sample and what repository entry point should contain it; done should include an agreed sample scope and validation steps.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- flask, python
- 領域
- backend, web-dev
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 15/100