高度な​音声認識

音声認識API

業界を​リードする​パフォーマンスで​日本語の​高精度音声テキスト変換。​日本語音声に​最適化された​精度と​スピードで​音声を​テキストに​変換します。

業界を​リードする​精度

実際の​日本語音声で​ベンチマークされた​パフォーマンス

98.5%
総合精度
クリーンな​音声環境
95.2%
騒音環境
背景ノイズ処理
<0.5秒
レスポンスタイム
1分間の​音声あたり
97.8%
混合言語
日英コードスイッチング
ドメイン別精度比較
カスタマーサービス通話96.5%
ビジネスミーティング97.2%
医療相談95.8%
法的手続き98.1%
技術的な​議論96.9%

日本語音声向けに​構築

日本語音声認識専用に​設計された​機能

複数方​言サポート
標準日本語、​関西弁、​東北弁、​その​他の​地域方​言を​正確に​認識
リアルタイムストリーミング
リアルタイムで​音声ストリームを​処理し、​ライブ文字起こしと​即座の​結果を​提供
話者ダイアライゼーション
会話内の​複数の​話者を​自動的に​識別して​分離
超高速
最適化された​推論パイプラインで​数時間の​音声を​数分で​処理
エンタープライズセキュリティ
エンドツーエンド暗号化と​セキュアな​音声処理で​SOC 2準拠
カスタム語彙
業界固有の​用語、​ブランド名、​カスタムフレーズを​追加して​精度を​向上

信頼される​ユースケース

企業が​ASR APIを​どのように​活用しているかを​ご覧ください

コールセンター文字起こし
品質保証、​コンプライアンス、​インサイトの​ために​カスタマーサービスの​通話を​自動的に​文字起こし。
  • 品質監視
  • コンプライアンス記録
  • エージェントトレーニング
  • 顧客センチメント分析
会議メモ
会議、​インタビュー、​ディスカッションを​検索可能で​実用的な​テキスト文書に​変換。
  • ビジネスミーティング
  • インタビュー記録
  • 会議録音
  • チームスタンドアップ
字幕と​キャプション
ビデオ、​ライブストリーム、​放送用の​正確な​字幕を​リアルタイムまたは​バッチモードで​生成。
  • ビデオ字幕
  • ライブイベントキャプション
  • 放送文字起こし
  • アクセシビリティ準拠

自分で​試してみてください

この​インタラクティブな​デモで​音声認識APIを​体験してください。​音声を​記録して​リアルタイムで​文字起こしを​確認します。

音声認識デモ
オーディオを​録音して、​すぐに​テキスト化
💡 ヒント:1~10秒の​間で​録音してください。​停止後、​自動的に​テキスト化が​開始されます。

API Key

APIキーを​設定
以下に​APIキーを​入力すると、​この​ページの​すべての​コード例が​自動的に​更新されます

クイックスタートガイド

3つの​簡単な​ステップで​音声認識APIを​開始

1. APIキーを​取得

Shisa AIアカウントに​サインアップし、​開発者ダッシュボードから​APIキーを​取得します。​Authorizationヘッダーに​'shsk:'プレフィックスを​付けて​含めます:

Authorization: Bearer shsk:YOUR_API_KEY
2. 音声を​準備

APIは​様々な​形式の​base64エンコードされた​音声を​受け付けます。​サポートされている​音声形式は​次の​とおりです:

  • OGG​(Opus、​Vorbis)
  • WAV​(PCM、​16ビット)
  • MP3、​WebM、​M4A、​FLAC
3. 最初の​リクエストを​送信

音声データと​設定を​含むPOSTリクエストを​APIエンドポイントに​送信します。​cURLを​使用した​基本的な​例:

curl --location 'https://api.shisa.ai/asr/srt/audio_llm' \
  --header 'Authorization: Bearer shsk:YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "shisa-ai/shisa-asr-v0.1b",
    "temperature": 0.0,
    "top_p": 0.85,
    "frequency_penalty": 0.5,
    "repetition_penalty": 1.05,
    "messages": [
      {
        "role": "user",
        "content": [
          {
            "type": "text",
            "text": "Transcribe the Japanese audio clip into text. Here are hotwords that may appear: Shisa AI, API, 音声認識"
          },
          {
            "type": "audio_url",
            "audio_url": {
              "url": "data:audio/ogg;base64,'$(base64 -w0 audio.ogg)'"
            }
          }
        ]
      }
    ]
  }'

Recommended starting parameters

Start with these values before tuning for your use case:

temperature: 0.0top_p: 0.85frequency_penalty: 0.5repetition_penalty: 1.05
Expected Response

The API will return a JSON response with the transcribed text in the message content.

{
  "language": "auto",
  "text": "祖母はおおむね機嫌よくさえころころがしている。"
}

APIエンドポイント

音声認識APIは、​最大限の​柔軟性と​コンテキスト認識の​ために​チャット形式の​インターフェースを​使用します

音声認識エンドポイント
POSThttps://api.shisa.ai/asr/srt/audio_llm

この​マルチモーダルエンドポイントは、​テキストの​指示と​音声コンテンツの​両方を​受け付け、​精度向上の​ために​コンテキストと​カスタム語彙​(ホットワード)を​提供できます。

リクエストパラメータ

これらの​パラメータで​文字起こしリクエストを​設定

リクエストボディパラメータ
パラメータ必須説明
modelstringRequiredモデル識別子。​現在: "shisa-ai/shisa-asr-v0.1b"
messagesarrayRequiredマルチモーダルコンテンツ​(テキスト+音声)を​含むメッセージオブジェクトの​配列
temperaturefloatRequiredサンプリング温度​(0.0-2.0)。​低い値は​出力を​より​決定的にします。​デフォルト: 0.0
Recommended: 0.0
top_pfloatRequiredニュークレアスサンプリングパラメータ​(0.0-1.0)。​出力の​多様性を​制御。​デフォルト: 0.85
Recommended: 0.85
frequency_penaltyfloatRequired頻出トークンに​ペナルティ​(-2.0〜2.0)。​繰り返しを​減らします。​デフォルト: 0.5
Recommended: 0.5
repetition_penaltyfloatRequiredトークンの​繰り返しに​ペナルティ​(1.0-2.0)。​1.0より​大きい値は​繰り返しを​抑制。​デフォルト: 1.05
Recommended: 1.05
メッセージ形式

メッセージ配列には、​2つの​コンテンツアイテムを​含む単一の​ユーザーメッセージが​含まれている​必要が​あります:

  • テキストコンテンツ

    言語と​出現する​可能性の​ある​ホットワードを​含む文字起こしの​指示

  • 音声コンテンツ

    base64エンコードされた​データURLと​しての​音声データ

音声入力形式

音声は​次の​形式の​base64エンコードされた​データURLと​して​提供する​必要が​あります:

data:audio/ogg;base64,SGVsbG8gV29ybGQ...

サポートされている​音声形式:

FormatMIME TypeDetection
WAVaudio/wavRIFF header
OGGaudio/oggOggS header
MP3audio/mpegID3 tag or MPEG sync bytes
FLACaudio/flacfLaC header
WebMaudio/webmEBML header
M4A/MP4audio/mp4ftyp box

音声を​Base64に​エンコード

次の​コマンドを​使用して​音声ファイルを​base64に​変換します:

# WAV
data:audio/wav;base64,$(base64 -w0 audio.wav)

# OGG
data:audio/ogg;base64,$(base64 -w0 audio.ogg)

# MP3
data:audio/mpeg;base64,$(base64 -w0 audio.mp3)

# FLAC
data:audio/flac;base64,$(base64 -w0 audio.flac)

# WebM
data:audio/webm;base64,$(base64 -w0 audio.webm)

# M4A
data:audio/mp4;base64,$(base64 -w0 audio.m4a)
ホットワードと​カスタム語彙

テキストプロンプトに​ホットワードを​含める​ことで、​専門用語の​文字起こし精度を​向上させます。​ホットワードは、​モデルが​次の​ものを​正しく​認識するのに​役立ちます:

"Transcribe the Japanese audio. Here are hotwords that may appear: Shisa AI, API, 音声認識, 機械学習"

ホットワードを​使用する​タイミング:

  • 固有名詞: 企業名、​人名、​ブランド名
  • 専門用語: 業界固有の​専門用語、​製品名
  • 外来語: 対象言語で​馴染みの​ない​用語
Supported Languages (LID)

The API supports automatic language identification (LID) for the following languages. The detected language is returned in the language field of the response.

Primary Languages

jaJapanese
enEnglish
zhChinese

レスポンス形式

APIレスポンス構造の​理解

成功レスポンス
{
  "language": "auto",
  "text": "祖母はおおむね機嫌よくさえころころがしている。"
}

レスポンスフィールド:

  • language: The detected or specified language of the audio
  • text: The transcribed text from the audio

エラー処理

一般的な​エラーと​解決方​法

エラーレスポンス形式
{
  "code": 400,
  "error": "No audio data provided"
}
401 Authentication Error

Returned when the API key is missing, invalid, or expired. Check that your Authorization header includes a valid token.

{
  "context": ["authMiddleware"],
  "code": 104,
  "name": "ErrAuthenticationFailed",
  "error": "Authentication error: Invalid token"
}
Error Codes
CodeCauseError Message
400No audio_url in messagesNo audio_url found in messages
400Audio decodes to emptyNo audio data provided
400URL doesn't start with data:audio_url must be a data: URL
400Missing comma in data URLInvalid data URL format
400Not base64 encodedaudio_url must be base64 encoded
400Base64 decode failsInvalid base64 audio data
500Services not readyTranscription service not available
500Backend failureTranscription failed: ...

コード例

人気の​ある​プログラミング言語での​統合例

cURL - クイックスタート
cURLを​使用して​音声ファイルを​文字起こしする​基本的な​例
curl --location 'https://api.shisa.ai/asr/srt/audio_llm' \
  --header 'Authorization: Bearer shsk:YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "shisa-ai/shisa-asr-v0.1b",
    "temperature": 0.0,
    "top_p": 0.85,
    "frequency_penalty": 0.5,
    "repetition_penalty": 1.05,
    "messages": [
      {
        "role": "user",
        "content": [
          {
            "type": "text",
            "text": "Transcribe the Japanese audio clip into text. Here are hotwords that may appear: Shisa AI, API, 音声認識"
          },
          {
            "type": "audio_url",
            "audio_url": {
              "url": "data:audio/ogg;base64,'$(base64 -w0 audio.ogg)'"
            }
          }
        ]
      }
    ]
  }'
Python - 完全な​例
base64エンコードと​ホットワードサポートを​含む完全な​Python関数
import base64
import json
import requests

def transcribe_audio(audio_path, language="Japanese", hotwords=None):
    """Transcribe audio file using Shisa AI ASR API"""

    # Read and encode audio file
    with open(audio_path, 'rb') as audio_file:
        audio_data = base64.b64encode(audio_file.read()).decode('utf-8')

    # Determine audio format from file extension
    audio_format = audio_path.split('.')[-1]

    # Build hotwords text
    hotwords_text = ""
    if hotwords:
        hotwords_text = f"Here are hotwords that may appear: {', '.join(hotwords)}"

    # Prepare request
    url = "https://api.shisa.ai/asr/srt/audio_llm"
    headers = {
        "Authorization": "Bearer shsk:YOUR_API_KEY",
        "Content-Type": "application/json"
    }

    payload = {
        "model": "shisa-ai/shisa-asr-v0.1b",
        "temperature": 0.0,
        "top_p": 0.85,
        "frequency_penalty": 0.5,
        "repetition_penalty": 1.05,
        "messages": [
            {
                "role": "user",
                "content": [
                    {
                        "type": "text",
                        "text": f"Transcribe the {language} audio clip into text. {hotwords_text}"
                    },
                    {
                        "type": "audio_url",
                        "audio_url": {
                            "url": f"data:audio/{audio_format};base64,{audio_data}"
                        }
                    }
                ]
            }
        ]
    }

    # Make request
    response = requests.post(url, headers=headers, json=payload)
    response.raise_for_status()

    return response.json()

# Example usage
result = transcribe_audio(
    "meeting_recording.ogg",
    language="Japanese",
    hotwords=["Shisa AI", "API", "音声認識"]
)

print(result)
JavaScript - ブラウザ統合
FileReader APIを​使用した​クライアント側JavaScript例
async function transcribeAudio(audioFile, language = 'Japanese', hotwords = []) {
  // Read file and convert to base64
  const fileBuffer = await audioFile.arrayBuffer();
  const base64Audio = btoa(
    new Uint8Array(fileBuffer).reduce(
      (data, byte) => data + String.fromCharCode(byte),
      ''
    )
  );

  // Get audio format from file type
  const audioFormat = audioFile.type.split('/')[1];

  // Build hotwords text
  const hotwordsText = hotwords.length > 0
    ? `Here are hotwords that may appear: ${hotwords.join(', ')}`
    : '';

  // Prepare request
  const response = await fetch('https://api.shisa.ai/asr/srt/audio_llm', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer shsk:YOUR_API_KEY',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      model: 'shisa-ai/shisa-asr-v0.1b',
      temperature: 0.0,
      top_p: 0.85,
      frequency_penalty: 0.5,
      repetition_penalty: 1.05,
      messages: [
        {
          role: 'user',
          content: [
            {
              type: 'text',
              text: `Transcribe the ${language} audio clip into text. ${hotwordsText}`
            },
            {
              type: 'audio_url',
              audio_url: {
                url: `data:audio/${audioFormat};base64,${base64Audio}`
              }
            }
          ]
        }
      ]
    })
  });

  if (!response.ok) {
    throw new Error(`API request failed: ${response.status}`);
  }

  return await response.json();
}

// Example usage with file input
document.querySelector('#audioInput').addEventListener('change', async (e) => {
  const file = e.target.files[0];
  if (file) {
    const result = await transcribeAudio(
      file,
      'Japanese',
      ['Shisa AI', 'API', '音声認識']
    );
    console.log('Transcription:', result);
  }
});

音声を​精密に​テキストに​変換

月間180分​(3時間)の​無料文字起こしから​始められます。​成長に​合わせて​スケール。