first commit

This commit is contained in:
Chan
2025-01-08 14:01:53 +09:00
commit e387382951
21 changed files with 72432 additions and 0 deletions

64278
docs/audio.json Normal file

File diff suppressed because one or more lines are too long

BIN
docs/audio.mp3 Normal file

Binary file not shown.

51
docs/index.html Normal file
View 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>&lt;whisper-transcript&gt;</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>
&lt;script type="module" src="https://cdn.jsdelivr.net/npm/whisper-transcript@latest/dist/index.js"&gt;&lt;/script&gt;
&lt;whisper-transcript audio="audio.mp3" url="audio.json"&gt;&lt;/whisper-transcript&gt;
</code></pre>
<whisper-transcript audio="audio.mp3" url="audio.json"></whisper-transcript>
</body>
</html>

1
docs/index.js.map Normal file

File diff suppressed because one or more lines are too long

322
docs/whisper-transcript.min.js vendored Normal file

File diff suppressed because one or more lines are too long