first commit
This commit is contained in:
51
docs/index.html
Normal file
51
docs/index.html
Normal file
@@ -0,0 +1,51 @@
|
||||
<!doctype html>
|
||||
<html lang="en-GB">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>whisper-transcript demo</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
|
||||
<style>
|
||||
body {
|
||||
background: #fafafa;
|
||||
font-size: 1.5em;
|
||||
font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Inter,Helvetica,Arial,sans-serif;
|
||||
margin: 2% 10% 5% 10%;
|
||||
}
|
||||
|
||||
h1 {
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
<script type="module" src="https://cdn.jsdelivr.net/npm/whisper-transcript@latest/dist/index.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1><whisper-transcript></h1>
|
||||
|
||||
<p>This is an example of using the <a
|
||||
href="https://github.com/edsu/whisper-transcript">whisper-transcript</a>
|
||||
<a href="https://en.wikipedia.org/wiki/Web_Components">web component</a> to
|
||||
display a <a href="http://github.com/openai/whisper">Whisper</a>
|
||||
speech-to-text transcript that was generated using word
|
||||
timestamps in order to visualize the confidence scores in the context of the
|
||||
words and their sound:</p>
|
||||
|
||||
<pre><code>$ whisper --model small audio.mp3 --word_timestamps True</code></pre>
|
||||
|
||||
<p>Running this command generates an <a href="audio.json">audio.json</a> file which contains
|
||||
detailed timestamp information for each word, and also a probability score
|
||||
that indicates the confidence in Whisper's transcription. Note: I
|
||||
intentionally ran with the small model in order to get more varied
|
||||
probabilities in this example.</p>
|
||||
|
||||
<p>View the HTML source to see how to use the whisper-transcript web
|
||||
component in your own pages. But it's basically: </p>
|
||||
|
||||
<pre><code>
|
||||
<script type="module" src="https://cdn.jsdelivr.net/npm/whisper-transcript@latest/dist/index.js"></script>
|
||||
<whisper-transcript audio="audio.mp3" url="audio.json"></whisper-transcript>
|
||||
</code></pre>
|
||||
|
||||
<whisper-transcript audio="audio.mp3" url="audio.json"></whisper-transcript>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user