init
All checks were successful
Build and Push whisper-client / build-and-push (push) Successful in 58s
All checks were successful
Build and Push whisper-client / build-and-push (push) Successful in 58s
This commit is contained in:
77
templates/index.html
Normal file
77
templates/index.html
Normal file
@@ -0,0 +1,77 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Whisper Client</title>
|
||||
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<h1>Whisper Client</h1>
|
||||
<div style="margin-top: 100px">
|
||||
<h2>Transcrire un fichier audio</h2>
|
||||
<form action="/upload" method="post" enctype="multipart/form-data">
|
||||
<div class="form-group">
|
||||
<input type="file" name="file" required>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</form>
|
||||
{% if transcription %}
|
||||
<div class="alert alert-success" role="alert">
|
||||
<h4 class="alert-heading">Transcription Result:</h4>
|
||||
<p>{{ transcription|safe }}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
<div style="margin-top: 100px">
|
||||
<h2>Synthétiser du texte</h2>
|
||||
<form action="/synthesize" method="post">
|
||||
|
||||
<textarea name="text-to-synthesize" class="form-control" rows="3"></textarea>
|
||||
<button type="submit" class="btn btn-primary mt-2">Synthesize</button>
|
||||
<div class="form-group">
|
||||
<label for="voice-select">Choisir une voix</label>:</label>
|
||||
<select class="form-control" id="voice-select" name="voice">
|
||||
<option value="alloy">Alloy</option>
|
||||
<option value="echo">Echo</option>
|
||||
<option value="fable">Fable</option>
|
||||
<option value="onyx">Onyx</option>
|
||||
<option value="nova" selected>Nova</option>
|
||||
<option value="shimmer">Shimmer</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div id="download-link-container">
|
||||
</div>
|
||||
<h2>Fichier mp3 disponibles</h2>
|
||||
{% for file in files %}
|
||||
<div>
|
||||
<a href="{{ url_for('static', filename='downloads/' ~ file) }}" download="{{ file }}">Download MP3 - {{ file }}</a>
|
||||
<audio controls>
|
||||
<source src="{{ url_for('static', filename='downloads/' ~ file) }}" type="audio/mp3">
|
||||
Your browser does not support the audio element.
|
||||
</audio>
|
||||
</div>
|
||||
{% endfor %}
|
||||
<div style="margin-top: 100px">
|
||||
<h2>Transcrire et résumer youtube</h2>
|
||||
<form action="/youtube" method="post">
|
||||
<div class="form-group">
|
||||
<label for="youtube-url">YouTube URL:</label>
|
||||
<input type="text" class="form-control" id="youtube-url" name="youtube_url" placeholder="Enter YouTube URL here" required>
|
||||
</div>
|
||||
<label for="summarize">Résumer:</label><input type="checkbox" id="summarize" name="summarize"/>
|
||||
<button type="submit" class="btn btn-primary">Transcrire vidéo</button>
|
||||
</div>
|
||||
</form>
|
||||
{% if youtube_transcript %}
|
||||
<div class="alert alert-success" role="alert">
|
||||
<h4 class="alert-heading">Transcription Result:</h4>
|
||||
<p>{{ youtube_transcript|safe }}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user