File size: 4,364 Bytes
bc8e2a9
9a6be16
bc8e2a9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>Audio8 ASR</title>
    <link rel="stylesheet" href="/static/styles.css" />
  </head>
  <body>
    <main class="shell">
      <section class="workspace">
        <header class="topbar">
          <div>
            <h1>Audio8 ASR</h1>
            <p id="health">loading runtime...</p>
          </div>
          <div class="runtime-pill" id="recordStatus">Ready</div>
        </header>

        <div class="toolbar">
          <button id="recordBtn" class="primary" type="button">Record</button>
          <button id="stopBtn" type="button" disabled>Stop</button>
          <label>
            <span>Max Tokens</span>
            <input id="maxTokens" type="number" min="8" max="512" value="128" />
          </label>
        </div>

        <div class="controls">
          <div class="hotword-panel">
            <label>
              <span>Hotwords</span>
              <input id="hotwords" placeholder="Enter hotwords, separated by commas" />
            </label>
            <div class="hotword-options">
              <span>Hotword strength</span>
              <div class="segments compact" id="hotwordStrengthSegments">
                <button type="button" data-hotword-strength="normal">Normal</button>
                <button type="button" data-hotword-strength="strong">Strong</button>
              </div>
              <strong class="risk-note">Strong may force incorrect hotwords, hallucinate, or repeat text.</strong>
            </div>
          </div>
        </div>

        <div class="precision-row">
          <span>Decoder</span>
          <div class="segments" id="precisionSegments">
            <button type="button" data-precision="fp32">FP32</button>
            <button type="button" data-precision="int8">INT8</button>
            <button type="button" data-precision="int4">INT4</button>
          </div>
          <span class="precision-note" id="precisionNote">--</span>
        </div>

        <div class="precision-row">
          <span>Audio tower</span>
          <div class="segments" id="audioPrecisionSegments">
            <button type="button" data-audio-precision="fp32">FP32</button>
            <button type="button" data-audio-precision="int8">INT8</button>
          </div>
          <span class="precision-note" id="audioPrecisionNote">--</span>
        </div>

        <div class="upload-row">
          <input id="fileInput" type="file" accept="audio/*" />
          <button id="uploadBtn" type="button">Transcribe</button>
        </div>

        <audio id="preview" controls></audio>

        <section class="result-surface">
          <div class="result-head">
            <h2>Transcript</h2>
            <span id="latency">--</span>
          </div>
          <div class="transcript" id="transcript">Transcript will appear here.</div>
        </section>

        <details class="raw-box">
          <summary>Raw response</summary>
          <pre id="raw"></pre>
        </details>
      </section>

      <aside class="monitor">
        <section class="panel">
          <div class="panel-head">
            <h2>Runtime</h2>
            <span id="metricStamp">--</span>
          </div>
          <div class="kv-list">
            <div><span>Backend</span><strong id="backend">--</strong></div>
            <div><span>Precision</span><strong id="precision">--</strong></div>
            <div><span>Process RSS</span><strong id="rss">--</strong></div>
            <div><span>Peak RSS</span><strong id="peakRss">--</strong></div>
            <div><span>Request Peak</span><strong id="requestPeak">--</strong></div>
            <div><span>System Memory</span><strong id="sysmem">--</strong></div>
          </div>
        </section>

        <section class="panel">
          <div class="panel-head">
            <h2>GPU Memory</h2>
            <span id="gpuSummary">--</span>
          </div>
          <div class="gpu-list" id="gpuList"></div>
        </section>

        <section class="panel">
          <div class="panel-head">
            <h2>Providers</h2>
          </div>
          <pre id="metricsRaw"></pre>
        </section>
      </aside>
    </main>

    <script src="/static/app.js?v=hf-staging-error-handling-v1"></script>
  </body>
</html>