> This is a page from the ElevenLabs documentation. For a complete page index, fetch https://elevenlabs.io/docs/llms.txt. For the full documentation in a single file, fetch https://elevenlabs.io/docs/llms-full.txt.

# 音声エンジンを作成

POST https://api.elevenlabs.io/v1/speech-engine
Content-Type: application/json

新しいSpeech Engineリソースを作成します

Reference: https://elevenlabs.io/docs/api-reference/speech-engine/create

## Servers

- `https://api.elevenlabs.io` (Production, default)
- `https://api.us.elevenlabs.io` (Production US)
- `https://api.eu.residency.elevenlabs.io` (Production EU)
- `https://api.in.residency.elevenlabs.io` (Production India)
- `https://api.sg.residency.elevenlabs.io` (Production Singapore)

## Request

### Body (application/json)

This endpoint expects a CreateSpeechEngineRequest.

- `speech_engine` (SpeechEngineConfig, required) — Speech EngineのWebSocket設定
- `name` (string, optional, default: Speech Engine) — 音声エンジンの名前
- `asr` (ASRConversationalConfig, optional) — ASR設定
- `tts` (TTSConversationalConfig-Input, optional) — TTS設定
- `turn` (BaseTurnConfig, optional) — ターン検出設定
- `vad` (VADConfig, optional) — 音声アクティビティ検出の設定
- `conversation` (ConversationConfig-Input, optional) — 会話設定（クライアントイベントなど）
- `privacy` (PrivacyConfig-Input, optional) — プライバシー設定（録音、保持、ゼロ保持モード）
- `call_limits` (AgentCallLimits, optional) — この音声エンジンの同時実行数および1日の会話数制限
- `language` (string, optional, default: en) — 音声エンジンの言語
- `cascade_timeout_seconds` (double, optional, default: 4) — 試行を中止して再試行するまで、上流のスピーチエンジンエンドポイントの応答を待つ時間（秒）。2～15秒である必要があります。
- `tags` (list of string, optional) — 分類用タグ。
- `overrides` (SpeechEngineConversationInitiationClientDataConfig, optional) — 会話の開始時にクライアントが設定できるオーバーライド設定

## Response

### 201

成功レスポンス。

- `speech_engine_id` (string, required) — 音声エンジンリソースID
- `name` (string, required) — 人間が読めるSpeech Engine名
- `speech_engine` (SpeechEngineConfig, required) — アップストリーム文字起こしサーバーのWebSocket接続設定
- `asr` (ASRConversationalConfig, required) — 自動音声認識の設定
- `tts` (TTSConversationalConfig-Output, required) — テキスト読み上げの出力設定。
- `turn` (BaseTurnConfig, required) — ターン検出設定
- `vad` (VADConfig, required) — 音声アクティビティ検出の設定
- `conversation` (ConversationConfig-Output, required) — クライアントイベントや時間制限を含む会話レベルの設定
- `privacy` (PrivacyConfig-Output, required) — 録音、保持、PIIの取り扱いを制御するプライバシー設定
- `call_limits` (AgentCallLimits, required) — この音声エンジンの同時実行数および1日の会話数制限
- `language` (string, required) — 音声エンジンで使用するISO言語コード（例：'en'）
- `cascade_timeout_seconds` (double, required) — 試行を中止して再試行するまで、上流のスピーチエンジンエンドポイントの応答を待つ時間（秒）。2～15秒である必要があります。
- `tags` (list of string, required) — 分類とフィルタリングのための任意のタグ
- `overrides` (SpeechEngineConversationInitiationClientDataConfig, required) — 会話の開始時にクライアントが設定できるオーバーライド設定
- `metadata` (AgentMetadataDBModel, required) — ソース情報を含む作成および更新タイムスタンプ
- `access_info` (ResourceAccessInfo, optional, nullable) — ユーザーに対する音声エンジンのアクセス情報。

## Errors

### 422 Unprocessable Entity Error

検証エラー

- `detail` (list of ValidationError, optional)

## Types

### SpeechEngineConfig

- `ws_url` (string, required) — 文字起こしサーバーのWebSocket URL
- `request_headers` (map from string to SpeechEngineConfigRequestHeaders, optional) — WebSocket接続リクエストに含めるヘッダー

### ASRConversationalConfig

- `quality` (enum, optional, default: high) — 文字起こしの品質
  - Allowed values: `high`
- `provider` (enum, optional, default: scribe_realtime) — 文字起こしサービスのプロバイダー
  - Allowed values: `elevenlabs`, `scribe_realtime`, `scribe_v2_turbo`
- `user_input_audio_format` (enum, optional, default: pcm_16000) — 文字起こしするオーディオの形式
  - Allowed values: `pcm_8000`, `pcm_16000`, `pcm_22050`, `pcm_24000`, `pcm_44100`, `pcm_48000`, `ulaw_8000`
- `keywords` (list of string, optional) — 予測確率を高めるキーワード

### TTSConversationalConfig-Input

- `model_id` (enum, optional, default: eleven_v4_turbo) — TTSに使用するモデル。
  - Allowed values: `eleven_turbo_v2`, `eleven_turbo_v2_5`, `eleven_flash_v2`, `eleven_flash_v2_5`, `eleven_multilingual_v2`, `eleven_v3_conversational`, `eleven_v4`, `eleven_v4_turbo`
- `voice_id` (string, optional, default: cjVigY5qzO86Huf0OWal) — TTSに使用する音声ID
- `supported_voices` (list of SupportedVoice, optional) — エージェントで追加対応する音声
- `expressive_mode` (boolean, optional, default: true) — 有効にすると、表現豊かなオーディオタグのプロンプトを適用します。v3以外のモデルでは自動的に無効になります。
- `suggested_audio_tags` (list of SuggestedAudioTag, optional) — 表現力豊かな音声を強化するための推奨オーディオタグ（eleven_v3およびeleven_v3_conversationalモデル用）。エージェントは、ここに記載されていない他のタグも使用できます。
- `agent_output_audio_format` (enum, optional, default: pcm_16000) — TTSに使用するオーディオ形式
  - Allowed values: `pcm_8000`, `pcm_16000`, `pcm_22050`, `pcm_24000`, `pcm_44100`, `pcm_48000`, `ulaw_8000`
- `stability` (double, optional, default: 0.5) — 生成された音声の安定性
- `speed` (double, optional, default: 1) — 生成された音声の速度
- `similarity_boost` (double, optional, default: 0.8) — 生成された音声の類似性ブースト
- `text_normalisation_type` (enum, optional, default: system_prompt) — テキストを音声に変換する前に数字を単語に変換する方法。SYSTEM_PROMPTに設定すると、正規化の指示を含むようシステムプロンプトが更新されます。ELEVENLABSに設定すると、生成後にテキストが正規化されるため、わずかに追加のレイテンシーが発生します。
  - Allowed values: `system_prompt`, `elevenlabs`
- `pronunciation_dictionary_locators` (list of PydanticPronunciationDictionaryVersionLocator, optional) — 発音辞書ロケーター
- `enable_phoneme_tags` (boolean, optional, default: true) — V3モデルでのSSML音素タグ処理を有効にします。有効にすると、音素タグ（インラインおよび発音辞書由来）はモデルに送信される前にインラインIPAへ解析されます。
- `audio_effects` (EffectsSpec-Input, optional, nullable) — 任意のTTSエフェクト指定：フィルタープリセット、距離（近接EQ）、環境（コンボリューションリバーブ）。
- `optimize_streaming_latency` (enum, optional, deprecated) — 非推奨：このフィールドは何も行わず、無視されます。
  - Allowed values: `0`, `1`, `2`, `3`, `4`

### BaseTurnConfig

- `turn_timeout` (double, optional, default: 7) — ユーザーに再度働きかけるまでの、ユーザーからの返信の最大待機時間
- `initial_wait_time` (double, optional, nullable) — 最初のメッセージが空の場合に、エージェントがユーザーの会話開始を待機する時間です。設定しない場合は、通常のturn_timeoutを使用します。
- `silence_end_call_timeout` (double, optional, default: -1) — 通話を終了するまでの、ユーザーが最後に発話してからの最大待機時間
- `turn_eagerness` (enum, optional, default: normal) — エージェントがどの程度積極的に応答するかを制御します。Low＝積極性が低い（より長く待機）、Standard＝デフォルトの積極性、High＝積極性が高い（より早く応答）
  - Allowed values: `patient`, `normal`, `eager`
- `spelling_patience` (enum, optional, default: auto) — ユーザーが数字や固有表現をつづっている際に、エージェントがより長く待機するかどうかを制御します。Auto＝モデルに基づいて判断、Off＝追加で待機しません。
  - Allowed values: `auto`, `off`
- `speculative_turn` (boolean, optional, default: false) — 有効にすると、ターンの信頼度が完全に確定する前の無音中にLLM応答の生成を開始し、体感レイテンシーを削減します。LLMのコストが増加する可能性があります。
- `retranscribe_on_turn_timeout` (boolean, optional, default: false) — 有効にすると、VADが音声を検出しなかった場合、ターンのタイムアウト時に蓄積されたオーディオの再文字起こしを試みます。アクティブなエージェントまたはワークフローノードで有効な間は、無音割引の請求が無効になります。
- `turn_model` (enum, optional, default: turn_v3) — 使用するターン検出モデルのバージョン。
  - Allowed values: `turn_v2`, `turn_v3`
- `interruption_ignore_terms` (list of string, optional) — ユーザーが発話しても割り込みをトリガーしない用語のリスト（例：'gotcha'、'understood'）。大文字・小文字を区別しない完全一致を使用します。
- `interruption_ignore_term_languages` (list of string, optional) — プリセットの無視タームカテゴリが有効化されている言語コードです。表示がタームの重複から推測されないよう、明示的に保存されます。
- `merge_with_default_ignore_terms` (boolean, optional, default: false) — 有効にすると、interruption_ignore_termsに加えて、interruption_ignore_term_languages用に厳選されたデフォルト用語が使用されます。
- `transcribe_on_disabled_interruptions` (boolean, optional, default: false) — 割り込みが無効な場合でも、次のターンに引き継げるようユーザーの発話を文字起こしします。無効の場合、割り込み不可のターン中のユーザー発話は無視され、ターンは開始されません。

### VADConfig

### ConversationConfig-Input

- `text_only` (boolean, optional, default: false) — 有効にするとオーディオは処理されず、テキストのみが使用されます。オーディオ料金を回避するために使用します。
- `max_duration_seconds` (integer, optional, default: 600) — 会話の最大時間（秒）。
- `client_events` (list of enum, optional) — クライアントに送信されるイベント
  - Allowed values: `conversation_initiation_metadata`, `asr_initiation_metadata`, `ping`, `audio`, `interruption`, `user_transcript`, `tentative_user_transcript`, `agent_response`, `agent_response_correction`, `client_tool_call`, `mcp_tool_call`, `mcp_connection_status`, `agent_tool_request`, `agent_tool_response`, `agent_tool_response_full_payload`, `agent_response_metadata`, `vad_score`, `agent_chat_response_part`, `client_error`, `guardrail_triggered`, `dtmf_request`, `agent_response_complete`, `context_usage`, `internal_turn_probability`, `internal_tentative_agent_response`
- `file_input` (FileInputConfig, optional) — 会話中のファイル入力（画像／PDFアップロード）の設定。
- `monitoring_enabled` (boolean, optional, default: false) — WebSocket経由の会話のリアルタイム監視を有効にします
- `monitoring_events` (list of enum, optional) — モニタリング接続に送信されるイベント。
  - Allowed values: `conversation_initiation_metadata`, `asr_initiation_metadata`, `ping`, `audio`, `interruption`, `user_transcript`, `tentative_user_transcript`, `agent_response`, `agent_response_correction`, `client_tool_call`, `mcp_tool_call`, `mcp_connection_status`, `agent_tool_request`, `agent_tool_response`, `agent_tool_response_full_payload`, `agent_response_metadata`, `vad_score`, `agent_chat_response_part`, `client_error`, `guardrail_triggered`, `dtmf_request`, `agent_response_complete`, `context_usage`, `internal_turn_probability`, `internal_tentative_agent_response`
- `dtmf_input_settings` (DTMFInputConfig, optional, nullable) — 電話中のDTMF（キーパッド）入力収集を設定する
- `background_sound` (BackgroundSoundConfig, optional) — 会話中のバックグラウンドサウンドの設定。
- `source_attribution` (boolean, optional, default: false) — 有効にし、ナレッジベースのコンテンツが存在する場合、LLMは使用したソースを報告するよう指示されます。

### PrivacyConfig-Input

- `record_voice` (boolean, optional, default: true) — 会話を録音するかどうか
- `retention_days` (integer, optional, default: -1) — 会話を保持する日数。-1は保持期間の制限がないことを示します。
- `delete_transcript_and_pii` (boolean, optional, default: false) — 文字起こしとPIIを削除するかどうか
- `delete_audio` (boolean, optional, default: false) — オーディオを削除するかどうか
- `apply_to_existing_conversations` (boolean, optional, default: false) — 既存の会話にプライバシー設定を適用するかどうか
- `zero_retention_mode` (boolean, optional, default: false) — ゼロ保持モードを有効にするかどうか。PIIデータは保存されません
- `conversation_history_redaction` (ConversationHistoryRedactionConfig, optional) — 会話履歴のPII編集設定

### AgentCallLimits

- `agent_concurrency_limit` (integer, optional, default: -1) — 同時会話数の上限。-1は上限なしを示します。
- `daily_limit` (integer, optional, default: 100000) — 1日あたりの会話数の上限。
- `bursting_enabled` (boolean, optional, default: true) — バーストを有効にするかどうか。trueの場合、ワークスペースの同時実行数上限を最大で3倍まで超過できます。上限を超えた呼び出しには2倍の料金が適用されます。

### SpeechEngineConversationInitiationClientDataConfig

- `first_message` (boolean, optional, default: false) — クライアントが最初のメッセージを上書きできるかどうか。

### TTSConversationalConfig-Output

- `model_id` (enum, optional, default: eleven_v4_turbo) — TTSに使用するモデル。
  - Allowed values: `eleven_turbo_v2`, `eleven_turbo_v2_5`, `eleven_flash_v2`, `eleven_flash_v2_5`, `eleven_multilingual_v2`, `eleven_v3_conversational`, `eleven_v4`, `eleven_v4_turbo`
- `voice_id` (string, optional, default: cjVigY5qzO86Huf0OWal) — TTSに使用する音声ID
- `supported_voices` (list of SupportedVoice, optional) — エージェントで追加対応する音声
- `expressive_mode` (boolean, optional, default: true) — 有効にすると、表現豊かなオーディオタグのプロンプトを適用します。v3以外のモデルでは自動的に無効になります。
- `suggested_audio_tags` (list of SuggestedAudioTag, optional) — 表現力豊かな音声を強化するための推奨オーディオタグ（eleven_v3およびeleven_v3_conversationalモデル用）。エージェントは、ここに記載されていない他のタグも使用できます。
- `agent_output_audio_format` (enum, optional, default: pcm_16000) — TTSに使用するオーディオ形式
  - Allowed values: `pcm_8000`, `pcm_16000`, `pcm_22050`, `pcm_24000`, `pcm_44100`, `pcm_48000`, `ulaw_8000`
- `stability` (double, optional, default: 0.5) — 生成された音声の安定性
- `speed` (double, optional, default: 1) — 生成された音声の速度
- `similarity_boost` (double, optional, default: 0.8) — 生成された音声の類似性ブースト
- `text_normalisation_type` (enum, optional, default: system_prompt) — テキストを音声に変換する前に数字を単語に変換する方法。SYSTEM_PROMPTに設定すると、正規化の指示を含むようシステムプロンプトが更新されます。ELEVENLABSに設定すると、生成後にテキストが正規化されるため、わずかに追加のレイテンシーが発生します。
  - Allowed values: `system_prompt`, `elevenlabs`
- `pronunciation_dictionary_locators` (list of PydanticPronunciationDictionaryVersionLocator, optional) — 発音辞書ロケーター
- `enable_phoneme_tags` (boolean, optional, default: true) — V3モデルでのSSML音素タグ処理を有効にします。有効にすると、音素タグ（インラインおよび発音辞書由来）はモデルに送信される前にインラインIPAへ解析されます。
- `audio_effects` (EffectsSpec-Output, optional, nullable) — 任意のTTSエフェクト指定：フィルタープリセット、距離（近接EQ）、環境（コンボリューションリバーブ）。
- `optimize_streaming_latency` (enum, optional, deprecated) — 非推奨：このフィールドは何も行わず、無視されます。
  - Allowed values: `0`, `1`, `2`, `3`, `4`

### ConversationConfig-Output

- `text_only` (boolean, optional, default: false) — 有効にするとオーディオは処理されず、テキストのみが使用されます。オーディオ料金を回避するために使用します。
- `max_duration_seconds` (integer, optional, default: 600) — 会話の最大時間（秒）。
- `client_events` (list of enum, optional) — クライアントに送信されるイベント
  - Allowed values: `conversation_initiation_metadata`, `asr_initiation_metadata`, `ping`, `audio`, `interruption`, `user_transcript`, `tentative_user_transcript`, `agent_response`, `agent_response_correction`, `client_tool_call`, `mcp_tool_call`, `mcp_connection_status`, `agent_tool_request`, `agent_tool_response`, `agent_tool_response_full_payload`, `agent_response_metadata`, `vad_score`, `agent_chat_response_part`, `client_error`, `guardrail_triggered`, `dtmf_request`, `agent_response_complete`, `context_usage`, `internal_turn_probability`, `internal_tentative_agent_response`
- `file_input` (FileInputConfig, optional) — 会話中のファイル入力（画像／PDFアップロード）の設定。
- `monitoring_enabled` (boolean, optional, default: false) — WebSocket経由の会話のリアルタイム監視を有効にします
- `monitoring_events` (list of enum, optional) — モニタリング接続に送信されるイベント。
  - Allowed values: `conversation_initiation_metadata`, `asr_initiation_metadata`, `ping`, `audio`, `interruption`, `user_transcript`, `tentative_user_transcript`, `agent_response`, `agent_response_correction`, `client_tool_call`, `mcp_tool_call`, `mcp_connection_status`, `agent_tool_request`, `agent_tool_response`, `agent_tool_response_full_payload`, `agent_response_metadata`, `vad_score`, `agent_chat_response_part`, `client_error`, `guardrail_triggered`, `dtmf_request`, `agent_response_complete`, `context_usage`, `internal_turn_probability`, `internal_tentative_agent_response`
- `dtmf_input_settings` (DTMFInputConfig, optional, nullable) — 電話中のDTMF（キーパッド）入力収集を設定する
- `background_sound` (BackgroundSoundConfig, optional) — 会話中のバックグラウンドサウンドの設定。
- `source_attribution` (boolean, optional, default: false) — 有効にし、ナレッジベースのコンテンツが存在する場合、LLMは使用したソースを報告するよう指示されます。

### PrivacyConfig-Output

- `record_voice` (boolean, optional, default: true) — 会話を録音するかどうか
- `retention_days` (integer, optional, default: -1) — 会話を保持する日数。-1は保持期間の制限がないことを示します。
- `delete_transcript_and_pii` (boolean, optional, default: false) — 文字起こしとPIIを削除するかどうか
- `delete_audio` (boolean, optional, default: false) — オーディオを削除するかどうか
- `apply_to_existing_conversations` (boolean, optional, default: false) — 既存の会話にプライバシー設定を適用するかどうか
- `zero_retention_mode` (boolean, optional, default: false) — ゼロ保持モードを有効にするかどうか。PIIデータは保存されません
- `conversation_history_redaction` (ConversationHistoryRedactionConfig, optional) — 会話履歴のPII編集設定

### AgentMetadataDBModel

- `created_at_unix_secs` (integer, required)
- `updated_at_unix_secs` (integer, required)
- `created_from` (enum, optional, default: unknown)
  - Allowed values: `cli`, `ui`, `api`, `template`, `unknown`
- `last_updated_from` (enum, optional, default: unknown)
  - Allowed values: `cli`, `ui`, `api`, `template`, `unknown`

### ResourceAccessInfo

- `is_creator` (boolean, required) — リクエストを行うユーザーがエージェントの作成者かどうか
- `creator_name` (string, required) — エージェント作成者の名前
- `creator_email` (string, required) — エージェント作成者のメールアドレス
- `role` (enum, required) — リクエストを行うユーザーのロール
  - Allowed values: `admin`, `editor`, `commenter`, `viewer`
- `anonymous_access_level_override` (enum, optional, nullable) — 匿名ユーザーのアクセスレベル。Noneの場合、このリソースは公開共有されません。
  - Allowed values: `admin`, `editor`, `commenter`, `viewer`
- `access_source` (enum, optional, nullable) — リクエストしたユーザーがこのリソースにアクセスできる理由。'creator'＝呼び出し元がオーナーです。'explicit'＝呼び出し元（またはそのワークスペースグループのいずれか）が、ワークスペース全体のeveryoneグループ以外としてrole_to_group_idsに記載されています。'workspace_default'＝ワークスペース全体のeveryoneグループがrole_to_group_idsに記載されています（管理者を含む、匿名ではないすべてのワークスペースメンバーがこのリソースを閲覧できます）。'workspace_admin'＝呼び出し元がワークスペース管理者であり、管理者シートがアクセスする*唯一*の経路です。これは他の誰も閲覧できないドキュメント用に予約されています。管理者バイパスの閲覧者が明示的に共有されていないドキュメントを閲覧できる理由をUIで表示できます。
  - Allowed values: `creator`, `explicit`, `workspace_admin`, `workspace_default`

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)

### SpeechEngineConfigRequestHeaders

### SupportedVoice

- `label` (string, required)
- `voice_id` (string, required)
- `description` (string, optional, nullable)
- `language` (string, optional, nullable)
- `model_family` (enum, optional, nullable)
  - Allowed values: `turbo`, `flash`, `multilingual`, `v3_conversational`, `v4`, `v4_turbo`
- `optimize_streaming_latency` (enum, optional, nullable)
  - Allowed values: `0`, `1`, `2`, `3`, `4`
- `stability` (double, optional, nullable)
- `speed` (double, optional, nullable)
- `similarity_boost` (double, optional, nullable)

### SuggestedAudioTag

- `tag` (string, required) — 使用するオーディオタグ（最適なパフォーマンスのため、1～2語。例：'happy'、'excited'）
- `description` (string, optional, nullable) — このタグを使用するタイミングに関する任意の説明

### PydanticPronunciationDictionaryVersionLocator

他のドキュメントが特定の辞書とそのバージョンを参照できるようにするロケーターです。 これはPronunciationDictionaryVersionLocatorDBModelのPydanticバージョンです。 他のエージェントデータモデルとの互換性を確保するために必要です。

- `pronunciation_dictionary_id` (string, required) — 発音辞書のID
- `version_id` (string, required, nullable) — 発音辞書バージョンのID

### EffectsSpec-Input

生成された音声に適用するオーディオエフェクトです。フィルタープリセット、知覚距離、リバーブ 環境、バックグラウンドノイズベッド、ステレオパンニングを含みます。未処理のオーディオを取得するには、すべてのフィールドをデフォルト値のままにしてください。

- `filter_preset_id` (string, optional, nullable) — `phone` や `old_radio` など、音声の音色を変えるフィルタープリセットのID。有効なIDは `GET /v1/audio-effects/catalog` で取得できます。
- `distance` (double, optional, default: 0) — 話者がマイクからどの程度離れて聞こえるかを指定します。0（近い、変更なし）から1（遠い）までです。値を大きくすると低域と高域が減衰し、環境が設定されている場合は、ドライ音声からリバーブへのバランスが移動します。
- `environment_id` (string, optional, nullable) — `small_room` や `hall` など、音声を空間内に配置するリバーブ環境のID。有効なIDは `GET /v1/audio-effects/catalog` で取得できます。リバーブはステレオでレンダリングされ、音声終了後に最大数秒の残響が追加されます。
- `background_noise_id` (string, optional, nullable) — `cafe` や `keyboard` など、音声の下でループ再生するバックグラウンドノイズベッドのID。有効なIDは `GET /v1/audio-effects/catalog` で取得できます。
- `send_level` (double, optional, default: 1) — 音声をどの程度リバーブに送るかを指定します。0（なし）から1（最大）までです。`environment_id` が設定されている場合にのみ適用されます。0ではリバーブが無効になります。
- `pan` (double, optional, default: 0) — 音声のステレオ位置。-1（左端）から0（中央）を経て1（右端）まで指定します。パンニングされるのは音声のみで、リバーブとバックグラウンドノイズは中央のままです。

### FileInputConfig

- `enabled` (boolean, optional, default: true) — 有効にすると、LLMがマルチモーダル入力をサポートしている場合、ユーザーはチャットで画像、PDF、またはテキストファイルを添付できます。
- `max_files_in_memory` (integer, optional, default: 10) — 会話中にメモリに保持する最新ファイル数です。古いファイルは要約され、そのバイトデータは解放されます。
- `max_files_per_conversation` (integer, optional, default: 10) — 1回の会話でユーザーがアップロードできるファイルの合計数。アップロードはファイルごとに課金されます。無制限の場合は-1、またはmax_files_in_memory以上の値を使用します。

### DTMFInputConfig

電話中のDTMF（キーパッド）入力収集の設定。

- `dtmf_input_timeout` (double, optional, default: 2) — 追加のDTMF数字を待機するタイムアウト（秒）
- `hash_terminator` (boolean, optional, default: true) — trueの場合、#を押すと直ちにDTMF入力が完了します
- `redact_input` (boolean, optional, default: false) — trueの場合、発信者のDTMF（キーパッド）入力を文字起こし、会話ログ、分析内でマスキングマーカーに置き換えます。エージェントが復唱する数字やツールに渡す数字は影響を受けません。

### BackgroundSoundConfig

- `source_type` (enum, optional, nullable) — バックグラウンドサウンドのソースタイプです。
  - Allowed values: `preset`
- `source_id` (enum, optional, nullable) — サウンドソースの識別子。
  - Allowed values: `office2`, `office1`, `restaurant`, `city`, `typing`, `elevator1`, `elevator2`, `elevator3`, `elevator4`
- `volume` (double, optional, default: 0.15) — バックグラウンドサウンドの音量レベル（0.01～1.0）。
- `crossfade_loop` (boolean, optional, default: true) — サウンドのループ時にポップノイズが聞こえるのを防ぐため、ループ境界にクロスフェードを適用します。

### ConversationHistoryRedactionConfig

- `enabled` (boolean, optional, default: false) — 会話履歴の編集が有効かどうか。
- `entities` (list of enum, optional) — 会話の文字起こし、オーディオ、分析から編集するエンティティです。'name'や'email_address'などのトップレベルタイプ、または'name.full_name'のような特定のサブタイプにはドット記法を使用します。
  - Allowed values: `name`, `name.name_given`, `name.name_family`, `name.name_other`, `email_address`, `contact_number`, `dob`, `age`, `religious_belief`, `political_opinion`, `sexual_orientation`, `ethnicity_race`, `marital_status`, `occupation`, `physical_attribute`, `language`, `username`, `password`, `url`, `organization`, `financial_id`, `financial_id.payment_card`, `financial_id.payment_card.payment_card_number`, `financial_id.payment_card.payment_card_expiration_date`, `financial_id.payment_card.payment_card_cvv`, `financial_id.bank_account`, `financial_id.bank_account.bank_account_number`, `financial_id.bank_account.bank_routing_number`, `financial_id.bank_account.swift_bic_code`, `financial_id.financial_id_other`, `location`, `location.location_address`, `location.location_city`, `location.location_postal_code`, `location.location_coordinate`, `location.location_state`, `location.location_country`, `location.location_other`, `date`, `date_interval`, `unique_id`, `unique_id.government_issued_id`, `unique_id.account_number`, `unique_id.vehicle_id`, `unique_id.healthcare_number`, `unique_id.healthcare_number.medical_record_number`, `unique_id.healthcare_number.health_plan_beneficiary_number`, `unique_id.device_id`, `unique_id.unique_id_other`, `medical`, `medical.medical_condition`, `medical.medication`, `medical.medical_procedure`, `medical.medical_measurement`, `medical.medical_other`
- `excluded_data_collection_ids` (list of string, optional) — 抽出値がマスキングされないデータ収集項目IDです。根拠は引き続きマスキングされます。

### EffectsSpec-Output

生成された音声に適用するオーディオエフェクトです。フィルタープリセット、知覚距離、リバーブ 環境、バックグラウンドノイズベッド、ステレオパンニングを含みます。未処理のオーディオを取得するには、すべてのフィールドをデフォルト値のままにしてください。

- `filter_preset_id` (string, required, nullable) — `phone` や `old_radio` など、音声の音色を変えるフィルタープリセットのID。有効なIDは `GET /v1/audio-effects/catalog` で取得できます。
- `distance` (double, required, default: 0) — 話者がマイクからどの程度離れて聞こえるかを指定します。0（近い、変更なし）から1（遠い）までです。値を大きくすると低域と高域が減衰し、環境が設定されている場合は、ドライ音声からリバーブへのバランスが移動します。
- `environment_id` (string, required, nullable) — `small_room` や `hall` など、音声を空間内に配置するリバーブ環境のID。有効なIDは `GET /v1/audio-effects/catalog` で取得できます。リバーブはステレオでレンダリングされ、音声終了後に最大数秒の残響が追加されます。
- `background_noise_id` (string, required, nullable) — `cafe` や `keyboard` など、音声の下でループ再生するバックグラウンドノイズベッドのID。有効なIDは `GET /v1/audio-effects/catalog` で取得できます。
- `send_level` (double, required, default: 1) — 音声をどの程度リバーブに送るかを指定します。0（なし）から1（最大）までです。`environment_id` が設定されている場合にのみ適用されます。0ではリバーブが無効になります。
- `pan` (double, required, default: 0) — 音声のステレオ位置。-1（左端）から0（中央）を経て1（右端）まで指定します。パンニングされるのは音声のみで、リバーブとバックグラウンドノイズは中央のままです。

### ValidationErrorLocItems

### ConvAISecretLocator

エージェントのシークレットストア内のシークレットを参照するために使用します。

- `secret_id` (string, required)

### ConvAIDynamicVariable

動的変数を参照するために使用します。

- `variable_name` (string, required)

## Examples

**Request**

```json
{
  "speech_engine": {
    "ws_url": "string"
  }
}
```

**Response**

```json
{
  "speech_engine_id": "seng_3701k3ttaq12ewp8b7qv5rfyszkz",
  "name": "My Speech Engine",
  "speech_engine": {
    "ws_url": "wss://example.com/transcript",
    "request_headers": {}
  },
  "asr": {
    "quality": "high",
    "provider": "elevenlabs",
    "user_input_audio_format": "pcm_16000",
    "keywords": []
  },
  "tts": {
    "model_id": "eleven_flash_v2",
    "voice_id": "cjVigY5qzO86Huf0OWal",
    "agent_output_audio_format": "pcm_16000",
    "stability": 0.5,
    "speed": 1,
    "similarity_boost": 0.8,
    "optimize_streaming_latency": 3
  },
  "turn": {
    "turn_timeout": 7,
    "silence_end_call_timeout": -1,
    "turn_eagerness": "normal",
    "mode": "turn"
  },
  "vad": {
    "background_voice_detection": false
  },
  "conversation": {
    "max_duration_seconds": 600,
    "client_events": [
      "audio",
      "interruption",
      "agent_response",
      "user_transcript"
    ]
  },
  "privacy": {
    "record_voice": true,
    "retention_days": -1,
    "delete_transcript_and_pii": false,
    "delete_audio": false,
    "apply_to_existing_conversations": false,
    "zero_retention_mode": false
  },
  "call_limits": {
    "agent_concurrency_limit": -1,
    "daily_limit": 100000,
    "bursting_enabled": true
  },
  "language": "en",
  "cascade_timeout_seconds": 4,
  "tags": [
    "production",
    "v1"
  ],
  "overrides": {
    "first_message": false
  },
  "metadata": {
    "created_at_unix_secs": 1714000000,
    "updated_at_unix_secs": 1714000000,
    "created_from": "api",
    "last_updated_from": "api"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.elevenlabs.io/v1/speech-engine"

payload = { "speech_engine": { "ws_url": "string" } }
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.elevenlabs.io/v1/speech-engine';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"speech_engine":{"ws_url":"string"}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.elevenlabs.io/v1/speech-engine"

	payload := strings.NewReader("{\n  \"speech_engine\": {\n    \"ws_url\": \"string\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.elevenlabs.io/v1/speech-engine")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"speech_engine\": {\n    \"ws_url\": \"string\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.elevenlabs.io/v1/speech-engine")
  .header("Content-Type", "application/json")
  .body("{\n  \"speech_engine\": {\n    \"ws_url\": \"string\"\n  }\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.elevenlabs.io/v1/speech-engine', [
  'body' => '{
  "speech_engine": {
    "ws_url": "string"
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.elevenlabs.io/v1/speech-engine");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"speech_engine\": {\n    \"ws_url\": \"string\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = ["speech_engine": ["ws_url": "string"]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.elevenlabs.io/v1/speech-engine")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```