mingyang91 commited on
Commit
fb5758b
·
verified ·
1 Parent(s): 8b6063a

clean warning, clean code

Browse files
Files changed (2) hide show
  1. src/lesson.rs +1 -0
  2. static/index.html +1 -1
src/lesson.rs CHANGED
@@ -272,6 +272,7 @@ impl LangLesson {
272
  tokio::spawn(async move {
273
  let fut = async {
274
  while let Ok(evt) = transcript_rx.recv().await {
 
275
  let output = translate_client
276
  .translate_text()
277
  .text(evt.transcript)
 
272
  tokio::spawn(async move {
273
  let fut = async {
274
  while let Ok(evt) = transcript_rx.recv().await {
275
+ if !evt.is_final { continue }
276
  let output = translate_client
277
  .translate_text()
278
  .text(evt.transcript)
static/index.html CHANGED
@@ -5,7 +5,7 @@
5
  <link rel="icon" type="image/svg+xml" href="/vite.svg" />
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
  <title>Vite + React</title>
8
- <script type="module" crossorigin src="/assets/index-b40ca4ea.js"></script>
9
  <link rel="stylesheet" href="/assets/index-983f9492.css">
10
  </head>
11
  <body>
 
5
  <link rel="icon" type="image/svg+xml" href="/vite.svg" />
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
  <title>Vite + React</title>
8
+ <script type="module" crossorigin src="/assets/index-1bd6d507.js"></script>
9
  <link rel="stylesheet" href="/assets/index-983f9492.css">
10
  </head>
11
  <body>