<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>TadaoYamaoka</author_name>
  <author_url>https://blog.hatena.ne.jp/TadaoYamaoka/</author_url>
  <blog_title>TadaoYamaokaの開発日記</blog_title>
  <blog_url>https://tadaoyamaoka.hatenablog.com/</blog_url>
  <categories>
    <anon>Whisper</anon>
    <anon>C#</anon>
  </categories>
  <description>前回、WhisperのモデルをONNXにする方法について記述した。Whisperのモデルは、単体では音声認識はできず、音声をメルスペクトログラムにする前処理と、トークンをデコードして文字列にする後処理が必要になる。 今回は、前処理と後処理をC#で実装する方法について記述する。 音声認識の流れ 以下のような流れで音声をテキストに変換する。 音声を16kHzにリサンプリングする 対数メルスペクトログラムに変換する ONNXモデルで推論する 推論結果をトークン列にする トークン列をデコードしてUTF8の文字列にする 以下ではそれぞれの処理の実装方法について記述する。 音声を16kHzにリサンプリング…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftadaoyamaoka.hatenablog.com%2Fentry%2F2023%2F01%2F26%2F210641&quot; title=&quot;WhisperのモデルをONNXにする その２ - TadaoYamaokaの開発日記&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2023-01-26 21:06:41</published>
  <title>WhisperのモデルをONNXにする その２</title>
  <type>rich</type>
  <url>https://tadaoyamaoka.hatenablog.com/entry/2023/01/26/210641</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
