@elevenlabs/elevenlabs-js 2.20.0 → 2.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Client.d.ts +3 -0
- package/Client.js +9 -4
- package/api/resources/conversationalAi/conversation/Conversation.d.ts +2 -0
- package/api/resources/conversationalAi/conversation/Conversation.js +4 -0
- package/api/resources/conversationalAi/resources/conversations/client/Client.d.ts +2 -1
- package/api/resources/conversationalAi/resources/conversations/client/Client.js +6 -2
- package/api/resources/conversationalAi/resources/conversations/client/requests/ConversationsListRequest.d.ts +4 -1
- package/api/resources/conversationalAi/resources/index.d.ts +2 -1
- package/api/resources/conversationalAi/resources/index.js +3 -2
- package/api/resources/conversationalAi/resources/mcpServers/client/requests/McpServerConfigUpdateRequestModel.d.ts +4 -0
- package/api/resources/conversationalAi/resources/mcpServers/index.d.ts +1 -0
- package/api/resources/conversationalAi/resources/mcpServers/index.js +1 -0
- package/api/resources/conversationalAi/resources/mcpServers/types/McpServerConfigUpdateRequestModelRequestHeadersValue.d.ts +2 -0
- package/api/resources/conversationalAi/resources/mcpServers/types/index.d.ts +1 -0
- package/api/resources/conversationalAi/resources/mcpServers/types/index.js +17 -0
- package/api/resources/dubbing/client/Client.d.ts +1 -6
- package/api/resources/dubbing/client/Client.js +13 -10
- package/api/resources/dubbing/client/requests/BodyDubAVideoOrAnAudioFileV1DubbingPost.d.ts +5 -10
- package/api/resources/index.d.ts +1 -0
- package/api/resources/index.js +2 -1
- package/api/resources/music/client/requests/BodyComposeMusicV1MusicPost.d.ts +0 -6
- package/api/resources/music/client/requests/BodyComposeMusicWithADetailedResponseV1MusicDetailedPost.d.ts +0 -6
- package/api/resources/music/client/requests/BodyStreamComposedMusicV1MusicStreamPost.d.ts +0 -6
- package/api/resources/pronunciationDictionaries/client/Client.d.ts +0 -1
- package/api/resources/pronunciationDictionaries/client/Client.js +3 -2
- package/api/resources/pronunciationDictionaries/client/requests/BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromFilePost.d.ts +1 -2
- package/api/resources/speechToText/client/Client.d.ts +0 -1
- package/api/resources/speechToText/client/Client.js +3 -2
- package/api/resources/speechToText/client/requests/BodySpeechToTextV1SpeechToTextPost.d.ts +1 -3
- package/api/resources/studio/resources/projects/client/Client.d.ts +0 -1
- package/api/resources/studio/resources/projects/client/Client.js +3 -2
- package/api/resources/studio/resources/projects/client/requests/BodyCreateStudioProjectV1StudioProjectsPost.d.ts +1 -2
- package/api/resources/studio/resources/projects/resources/content/client/Client.d.ts +1 -3
- package/api/resources/studio/resources/projects/resources/content/client/Client.js +4 -4
- package/api/resources/studio/resources/projects/resources/content/client/requests/BodyUpdateStudioProjectContentV1StudioProjectsProjectIdContentPost.d.ts +2 -4
- package/api/resources/textToDialogue/client/Client.d.ts +27 -0
- package/api/resources/textToDialogue/client/Client.js +182 -0
- package/api/resources/textToDialogue/client/requests/BodyTextToDialogueFullWithTimestamps.d.ts +32 -0
- package/api/resources/textToDialogue/client/requests/BodyTextToDialogueStreamWithTimestamps.d.ts +32 -0
- package/api/resources/textToDialogue/client/requests/index.d.ts +2 -0
- package/api/resources/textToDialogue/types/BodyTextToDialogueFullWithTimestampsApplyTextNormalization.d.ts +7 -0
- package/api/resources/textToDialogue/types/BodyTextToDialogueFullWithTimestampsApplyTextNormalization.js +10 -0
- package/api/resources/textToDialogue/types/BodyTextToDialogueStreamWithTimestampsApplyTextNormalization.d.ts +7 -0
- package/api/resources/textToDialogue/types/BodyTextToDialogueStreamWithTimestampsApplyTextNormalization.js +10 -0
- package/api/resources/textToDialogue/types/TextToDialogueConvertWithTimestampsRequestOutputFormat.d.ts +25 -0
- package/api/resources/textToDialogue/types/TextToDialogueConvertWithTimestampsRequestOutputFormat.js +28 -0
- package/api/resources/textToDialogue/types/TextToDialogueStreamWithTimestampsRequestOutputFormat.d.ts +25 -0
- package/api/resources/textToDialogue/types/TextToDialogueStreamWithTimestampsRequestOutputFormat.js +28 -0
- package/api/resources/textToDialogue/types/index.d.ts +4 -0
- package/api/resources/textToDialogue/types/index.js +4 -0
- package/api/resources/tokens/client/Client.d.ts +20 -0
- package/api/resources/tokens/client/Client.js +15 -0
- package/api/resources/tokens/client/index.d.ts +1 -0
- package/api/resources/tokens/client/index.js +2 -0
- package/api/resources/tokens/index.d.ts +2 -0
- package/api/resources/tokens/index.js +18 -0
- package/api/resources/tokens/resources/index.d.ts +1 -0
- package/api/resources/tokens/resources/index.js +37 -0
- package/api/resources/tokens/resources/singleUse/client/Client.d.ts +45 -0
- package/api/resources/tokens/resources/singleUse/client/Client.js +130 -0
- package/api/resources/tokens/resources/singleUse/client/index.d.ts +1 -0
- package/api/resources/tokens/resources/singleUse/client/index.js +2 -0
- package/api/resources/tokens/resources/singleUse/index.d.ts +1 -0
- package/api/resources/tokens/resources/singleUse/index.js +17 -0
- package/api/types/AudioWithTimestampsAndVoiceSegmentsResponseModel.d.ts +11 -0
- package/api/types/ClientToolConfigInput.d.ts +4 -0
- package/api/types/ClientToolConfigOutput.d.ts +4 -0
- package/api/types/CreateTwilioPhoneNumberRequest.d.ts +3 -0
- package/api/types/GuardrailsV1Input.d.ts +5 -0
- package/api/types/GuardrailsV1Output.d.ts +5 -0
- package/api/types/Llm.d.ts +2 -0
- package/api/types/Llm.js +2 -0
- package/api/types/McpServerConfigInput.d.ts +2 -0
- package/api/types/McpServerConfigInputRequestHeadersValue.d.ts +1 -1
- package/api/types/McpServerConfigOutput.d.ts +2 -0
- package/api/types/McpServerConfigOutputRequestHeadersValue.d.ts +1 -1
- package/api/types/MetricType.d.ts +1 -0
- package/api/types/MetricType.js +1 -0
- package/api/types/ModerationConfig.d.ts +14 -0
- package/api/types/ModerationConfig.js +3 -0
- package/api/types/ModerationGuardrailInput.d.ts +4 -0
- package/api/types/ModerationGuardrailInput.js +3 -0
- package/api/types/ModerationGuardrailOutput.d.ts +4 -0
- package/api/types/ModerationGuardrailOutput.js +3 -0
- package/api/types/ReferencedToolCommonModel.d.ts +1 -1
- package/api/types/ReferencedToolCommonModelType.d.ts +8 -0
- package/api/types/ReferencedToolCommonModelType.js +11 -0
- package/api/types/RegionConfigRequest.d.ts +9 -0
- package/api/types/RegionConfigRequest.js +3 -0
- package/api/types/SingleUseTokenResponseModel.d.ts +4 -0
- package/api/types/SingleUseTokenResponseModel.js +3 -0
- package/api/types/SingleUseTokenType.d.ts +1 -0
- package/api/types/SingleUseTokenType.js +3 -0
- package/api/types/SongSection.d.ts +1 -1
- package/api/types/StreamingAudioChunkWithTimestampsAndVoiceSegmentsResponseModel.d.ts +11 -0
- package/api/types/StreamingAudioChunkWithTimestampsAndVoiceSegmentsResponseModel.js +3 -0
- package/api/types/SystemToolConfigInput.d.ts +4 -0
- package/api/types/SystemToolConfigOutput.d.ts +4 -0
- package/api/types/ThresholdGuardrail.d.ts +4 -0
- package/api/types/ThresholdGuardrail.js +3 -0
- package/api/types/ToolCallSoundBehavior.d.ts +6 -0
- package/api/types/ToolCallSoundBehavior.js +9 -0
- package/api/types/ToolCallSoundType.d.ts +9 -0
- package/api/types/ToolCallSoundType.js +12 -0
- package/api/types/ToolRequestModelToolConfig.d.ts +1 -5
- package/api/types/TurnConfig.d.ts +2 -2
- package/api/types/TurnConfigWorkflowOverride.d.ts +2 -2
- package/api/types/TurnEagerness.d.ts +7 -0
- package/api/types/TurnEagerness.js +10 -0
- package/api/types/TwilioEdgeLocation.d.ts +13 -0
- package/api/types/TwilioEdgeLocation.js +16 -0
- package/api/types/TwilioRegionId.d.ts +7 -0
- package/api/types/TwilioRegionId.js +10 -0
- package/api/types/User.d.ts +0 -2
- package/api/types/VadConfig.d.ts +0 -2
- package/api/types/VadConfigWorkflowOverride.d.ts +0 -2
- package/api/types/VoiceSegment.d.ts +12 -0
- package/api/types/VoiceSegment.js +3 -0
- package/api/types/WebhookToolConfigInput.d.ts +4 -0
- package/api/types/WebhookToolConfigOutput.d.ts +4 -0
- package/api/types/WorkspaceResourceType.d.ts +2 -0
- package/api/types/WorkspaceResourceType.js +2 -0
- package/api/types/index.d.ts +18 -5
- package/api/types/index.js +18 -5
- package/dist/Client.d.ts +3 -0
- package/dist/Client.js +9 -4
- package/dist/api/resources/conversationalAi/conversation/Conversation.d.ts +2 -0
- package/dist/api/resources/conversationalAi/conversation/Conversation.js +4 -0
- package/dist/api/resources/conversationalAi/resources/conversations/client/Client.d.ts +2 -1
- package/dist/api/resources/conversationalAi/resources/conversations/client/Client.js +6 -2
- package/dist/api/resources/conversationalAi/resources/conversations/client/requests/ConversationsListRequest.d.ts +4 -1
- package/dist/api/resources/conversationalAi/resources/index.d.ts +2 -1
- package/dist/api/resources/conversationalAi/resources/index.js +3 -2
- package/dist/api/resources/conversationalAi/resources/mcpServers/client/requests/McpServerConfigUpdateRequestModel.d.ts +4 -0
- package/dist/api/resources/conversationalAi/resources/mcpServers/index.d.ts +1 -0
- package/dist/api/resources/conversationalAi/resources/mcpServers/index.js +1 -0
- package/dist/api/resources/conversationalAi/resources/mcpServers/types/McpServerConfigUpdateRequestModelRequestHeadersValue.d.ts +2 -0
- package/dist/api/resources/conversationalAi/resources/mcpServers/types/McpServerConfigUpdateRequestModelRequestHeadersValue.js +3 -0
- package/dist/api/resources/conversationalAi/resources/mcpServers/types/index.d.ts +1 -0
- package/dist/api/resources/conversationalAi/resources/mcpServers/types/index.js +17 -0
- package/dist/api/resources/dubbing/client/Client.d.ts +1 -6
- package/dist/api/resources/dubbing/client/Client.js +13 -10
- package/dist/api/resources/dubbing/client/requests/BodyDubAVideoOrAnAudioFileV1DubbingPost.d.ts +5 -10
- package/dist/api/resources/index.d.ts +1 -0
- package/dist/api/resources/index.js +2 -1
- package/dist/api/resources/music/client/requests/BodyComposeMusicV1MusicPost.d.ts +0 -6
- package/dist/api/resources/music/client/requests/BodyComposeMusicWithADetailedResponseV1MusicDetailedPost.d.ts +0 -6
- package/dist/api/resources/music/client/requests/BodyStreamComposedMusicV1MusicStreamPost.d.ts +0 -6
- package/dist/api/resources/pronunciationDictionaries/client/Client.d.ts +0 -1
- package/dist/api/resources/pronunciationDictionaries/client/Client.js +3 -2
- package/dist/api/resources/pronunciationDictionaries/client/requests/BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromFilePost.d.ts +1 -2
- package/dist/api/resources/speechToText/client/Client.d.ts +0 -1
- package/dist/api/resources/speechToText/client/Client.js +3 -2
- package/dist/api/resources/speechToText/client/requests/BodySpeechToTextV1SpeechToTextPost.d.ts +1 -3
- package/dist/api/resources/studio/resources/projects/client/Client.d.ts +0 -1
- package/dist/api/resources/studio/resources/projects/client/Client.js +3 -2
- package/dist/api/resources/studio/resources/projects/client/requests/BodyCreateStudioProjectV1StudioProjectsPost.d.ts +1 -2
- package/dist/api/resources/studio/resources/projects/resources/content/client/Client.d.ts +1 -3
- package/dist/api/resources/studio/resources/projects/resources/content/client/Client.js +4 -4
- package/dist/api/resources/studio/resources/projects/resources/content/client/requests/BodyUpdateStudioProjectContentV1StudioProjectsProjectIdContentPost.d.ts +2 -4
- package/dist/api/resources/textToDialogue/client/Client.d.ts +27 -0
- package/dist/api/resources/textToDialogue/client/Client.js +182 -0
- package/dist/api/resources/textToDialogue/client/requests/BodyTextToDialogueFullWithTimestamps.d.ts +32 -0
- package/dist/api/resources/textToDialogue/client/requests/BodyTextToDialogueFullWithTimestamps.js +3 -0
- package/dist/api/resources/textToDialogue/client/requests/BodyTextToDialogueStreamWithTimestamps.d.ts +32 -0
- package/dist/api/resources/textToDialogue/client/requests/BodyTextToDialogueStreamWithTimestamps.js +3 -0
- package/dist/api/resources/textToDialogue/client/requests/index.d.ts +2 -0
- package/dist/api/resources/textToDialogue/types/BodyTextToDialogueFullWithTimestampsApplyTextNormalization.d.ts +7 -0
- package/dist/api/resources/textToDialogue/types/BodyTextToDialogueFullWithTimestampsApplyTextNormalization.js +10 -0
- package/dist/api/resources/textToDialogue/types/BodyTextToDialogueStreamWithTimestampsApplyTextNormalization.d.ts +7 -0
- package/dist/api/resources/textToDialogue/types/BodyTextToDialogueStreamWithTimestampsApplyTextNormalization.js +10 -0
- package/dist/api/resources/textToDialogue/types/TextToDialogueConvertWithTimestampsRequestOutputFormat.d.ts +25 -0
- package/dist/api/resources/textToDialogue/types/TextToDialogueConvertWithTimestampsRequestOutputFormat.js +28 -0
- package/dist/api/resources/textToDialogue/types/TextToDialogueStreamWithTimestampsRequestOutputFormat.d.ts +25 -0
- package/dist/api/resources/textToDialogue/types/TextToDialogueStreamWithTimestampsRequestOutputFormat.js +28 -0
- package/dist/api/resources/textToDialogue/types/index.d.ts +4 -0
- package/dist/api/resources/textToDialogue/types/index.js +4 -0
- package/dist/api/resources/tokens/client/Client.d.ts +20 -0
- package/dist/api/resources/tokens/client/Client.js +15 -0
- package/dist/api/resources/tokens/client/index.d.ts +1 -0
- package/dist/api/resources/tokens/client/index.js +2 -0
- package/dist/api/resources/tokens/index.d.ts +2 -0
- package/dist/api/resources/tokens/index.js +18 -0
- package/dist/api/resources/tokens/resources/index.d.ts +1 -0
- package/dist/api/resources/tokens/resources/index.js +37 -0
- package/dist/api/resources/tokens/resources/singleUse/client/Client.d.ts +45 -0
- package/dist/api/resources/tokens/resources/singleUse/client/Client.js +130 -0
- package/dist/api/resources/tokens/resources/singleUse/client/index.d.ts +1 -0
- package/dist/api/resources/tokens/resources/singleUse/client/index.js +2 -0
- package/dist/api/resources/tokens/resources/singleUse/index.d.ts +1 -0
- package/dist/api/resources/tokens/resources/singleUse/index.js +17 -0
- package/dist/api/types/AudioWithTimestampsAndVoiceSegmentsResponseModel.d.ts +11 -0
- package/dist/api/types/AudioWithTimestampsAndVoiceSegmentsResponseModel.js +3 -0
- package/dist/api/types/ClientToolConfigInput.d.ts +4 -0
- package/dist/api/types/ClientToolConfigOutput.d.ts +4 -0
- package/dist/api/types/CreateTwilioPhoneNumberRequest.d.ts +3 -0
- package/dist/api/types/GuardrailsV1Input.d.ts +5 -0
- package/dist/api/types/GuardrailsV1Input.js +3 -0
- package/dist/api/types/GuardrailsV1Output.d.ts +5 -0
- package/dist/api/types/GuardrailsV1Output.js +3 -0
- package/dist/api/types/Llm.d.ts +2 -0
- package/dist/api/types/Llm.js +2 -0
- package/dist/api/types/McpServerConfigInput.d.ts +2 -0
- package/dist/api/types/McpServerConfigInputRequestHeadersValue.d.ts +1 -1
- package/dist/api/types/McpServerConfigOutput.d.ts +2 -0
- package/dist/api/types/McpServerConfigOutputRequestHeadersValue.d.ts +1 -1
- package/dist/api/types/MetricType.d.ts +1 -0
- package/dist/api/types/MetricType.js +1 -0
- package/dist/api/types/ModerationConfig.d.ts +14 -0
- package/dist/api/types/ModerationConfig.js +3 -0
- package/dist/api/types/ModerationGuardrailInput.d.ts +4 -0
- package/dist/api/types/ModerationGuardrailInput.js +3 -0
- package/dist/api/types/ModerationGuardrailOutput.d.ts +4 -0
- package/dist/api/types/ModerationGuardrailOutput.js +3 -0
- package/dist/api/types/ReferencedToolCommonModel.d.ts +1 -1
- package/dist/api/types/ReferencedToolCommonModelType.d.ts +8 -0
- package/dist/api/types/ReferencedToolCommonModelType.js +11 -0
- package/dist/api/types/RegionConfigRequest.d.ts +9 -0
- package/dist/api/types/RegionConfigRequest.js +3 -0
- package/dist/api/types/SingleUseTokenResponseModel.d.ts +4 -0
- package/dist/api/types/SingleUseTokenResponseModel.js +3 -0
- package/dist/api/types/SingleUseTokenType.d.ts +1 -0
- package/dist/api/types/SingleUseTokenType.js +3 -0
- package/dist/api/types/SongSection.d.ts +1 -1
- package/dist/api/types/StreamingAudioChunkWithTimestampsAndVoiceSegmentsResponseModel.d.ts +11 -0
- package/dist/api/types/StreamingAudioChunkWithTimestampsAndVoiceSegmentsResponseModel.js +3 -0
- package/dist/api/types/SystemToolConfigInput.d.ts +4 -0
- package/dist/api/types/SystemToolConfigOutput.d.ts +4 -0
- package/dist/api/types/ThresholdGuardrail.d.ts +4 -0
- package/dist/api/types/ThresholdGuardrail.js +3 -0
- package/dist/api/types/ToolCallSoundBehavior.d.ts +6 -0
- package/dist/api/types/ToolCallSoundBehavior.js +9 -0
- package/dist/api/types/ToolCallSoundType.d.ts +9 -0
- package/dist/api/types/ToolCallSoundType.js +12 -0
- package/dist/api/types/ToolRequestModelToolConfig.d.ts +1 -5
- package/dist/api/types/TurnConfig.d.ts +2 -2
- package/dist/api/types/TurnConfigWorkflowOverride.d.ts +2 -2
- package/dist/api/types/TurnEagerness.d.ts +7 -0
- package/dist/api/types/TurnEagerness.js +10 -0
- package/dist/api/types/TwilioEdgeLocation.d.ts +13 -0
- package/dist/api/types/TwilioEdgeLocation.js +16 -0
- package/dist/api/types/TwilioRegionId.d.ts +7 -0
- package/dist/api/types/TwilioRegionId.js +10 -0
- package/dist/api/types/User.d.ts +0 -2
- package/dist/api/types/VadConfig.d.ts +0 -2
- package/dist/api/types/VadConfigWorkflowOverride.d.ts +0 -2
- package/dist/api/types/VoiceSegment.d.ts +12 -0
- package/dist/api/types/VoiceSegment.js +3 -0
- package/dist/api/types/WebhookToolConfigInput.d.ts +4 -0
- package/dist/api/types/WebhookToolConfigOutput.d.ts +4 -0
- package/dist/api/types/WorkspaceResourceType.d.ts +2 -0
- package/dist/api/types/WorkspaceResourceType.js +2 -0
- package/dist/api/types/index.d.ts +18 -5
- package/dist/api/types/index.js +18 -5
- package/dist/serialization/resources/conversationalAi/resources/index.d.ts +2 -1
- package/dist/serialization/resources/conversationalAi/resources/index.js +3 -2
- package/dist/serialization/resources/conversationalAi/resources/mcpServers/client/requests/McpServerConfigUpdateRequestModel.d.ts +4 -0
- package/dist/serialization/resources/conversationalAi/resources/mcpServers/client/requests/McpServerConfigUpdateRequestModel.js +6 -0
- package/dist/serialization/resources/conversationalAi/resources/mcpServers/index.d.ts +1 -0
- package/dist/serialization/resources/conversationalAi/resources/mcpServers/index.js +1 -0
- package/dist/serialization/resources/conversationalAi/resources/mcpServers/types/McpServerConfigUpdateRequestModelRequestHeadersValue.d.ts +9 -0
- package/dist/serialization/resources/conversationalAi/resources/mcpServers/types/McpServerConfigUpdateRequestModelRequestHeadersValue.js +41 -0
- package/dist/serialization/resources/conversationalAi/resources/mcpServers/types/index.d.ts +1 -0
- package/dist/serialization/resources/conversationalAi/resources/mcpServers/types/index.js +17 -0
- package/dist/serialization/resources/music/client/requests/BodyComposeMusicV1MusicPost.d.ts +0 -2
- package/dist/serialization/resources/music/client/requests/BodyComposeMusicV1MusicPost.js +0 -2
- package/dist/serialization/resources/music/client/requests/BodyComposeMusicWithADetailedResponseV1MusicDetailedPost.d.ts +0 -2
- package/dist/serialization/resources/music/client/requests/BodyComposeMusicWithADetailedResponseV1MusicDetailedPost.js +0 -2
- package/dist/serialization/resources/music/client/requests/BodyStreamComposedMusicV1MusicStreamPost.d.ts +0 -2
- package/dist/serialization/resources/music/client/requests/BodyStreamComposedMusicV1MusicStreamPost.js +0 -2
- package/dist/serialization/resources/textToDialogue/client/requests/BodyTextToDialogueFullWithTimestamps.d.ts +19 -0
- package/dist/serialization/resources/textToDialogue/client/requests/BodyTextToDialogueFullWithTimestamps.js +51 -0
- package/dist/serialization/resources/textToDialogue/client/requests/BodyTextToDialogueStreamWithTimestamps.d.ts +19 -0
- package/dist/serialization/resources/textToDialogue/client/requests/BodyTextToDialogueStreamWithTimestamps.js +51 -0
- package/dist/serialization/resources/textToDialogue/client/requests/index.d.ts +2 -0
- package/dist/serialization/resources/textToDialogue/client/requests/index.js +5 -1
- package/dist/serialization/resources/textToDialogue/types/BodyTextToDialogueFullWithTimestampsApplyTextNormalization.d.ts +7 -0
- package/dist/serialization/resources/textToDialogue/types/BodyTextToDialogueFullWithTimestampsApplyTextNormalization.js +39 -0
- package/dist/serialization/resources/textToDialogue/types/BodyTextToDialogueStreamWithTimestampsApplyTextNormalization.d.ts +7 -0
- package/dist/serialization/resources/textToDialogue/types/BodyTextToDialogueStreamWithTimestampsApplyTextNormalization.js +39 -0
- package/dist/serialization/resources/textToDialogue/types/TextToDialogueConvertWithTimestampsRequestOutputFormat.d.ts +7 -0
- package/dist/serialization/resources/textToDialogue/types/TextToDialogueConvertWithTimestampsRequestOutputFormat.js +61 -0
- package/dist/serialization/resources/textToDialogue/types/TextToDialogueStreamWithTimestampsRequestOutputFormat.d.ts +7 -0
- package/dist/serialization/resources/textToDialogue/types/TextToDialogueStreamWithTimestampsRequestOutputFormat.js +61 -0
- package/dist/serialization/resources/textToDialogue/types/index.d.ts +4 -0
- package/dist/serialization/resources/textToDialogue/types/index.js +4 -0
- package/dist/serialization/types/AudioWithTimestampsAndVoiceSegmentsResponseModel.d.ts +14 -0
- package/dist/serialization/types/AudioWithTimestampsAndVoiceSegmentsResponseModel.js +46 -0
- package/dist/serialization/types/ClientToolConfigInput.d.ts +4 -0
- package/dist/serialization/types/ClientToolConfigInput.js +4 -0
- package/dist/serialization/types/ClientToolConfigOutput.d.ts +4 -0
- package/dist/serialization/types/ClientToolConfigOutput.js +4 -0
- package/dist/serialization/types/CreateTwilioPhoneNumberRequest.d.ts +2 -0
- package/dist/serialization/types/CreateTwilioPhoneNumberRequest.js +2 -0
- package/dist/serialization/types/GuardrailsV1Input.d.ts +11 -0
- package/dist/serialization/types/GuardrailsV1Input.js +43 -0
- package/dist/serialization/types/GuardrailsV1Output.d.ts +11 -0
- package/dist/serialization/types/GuardrailsV1Output.js +43 -0
- package/dist/serialization/types/Llm.d.ts +1 -1
- package/dist/serialization/types/Llm.js +2 -0
- package/dist/serialization/types/McpServerConfigInput.d.ts +2 -0
- package/dist/serialization/types/McpServerConfigInput.js +2 -0
- package/dist/serialization/types/McpServerConfigInputRequestHeadersValue.d.ts +2 -1
- package/dist/serialization/types/McpServerConfigInputRequestHeadersValue.js +2 -1
- package/dist/serialization/types/McpServerConfigOutput.d.ts +2 -0
- package/dist/serialization/types/McpServerConfigOutput.js +2 -0
- package/dist/serialization/types/McpServerConfigOutputRequestHeadersValue.d.ts +2 -1
- package/dist/serialization/types/McpServerConfigOutputRequestHeadersValue.js +2 -1
- package/dist/serialization/types/MetricType.d.ts +1 -1
- package/dist/serialization/types/MetricType.js +1 -0
- package/dist/serialization/types/ModerationConfig.d.ts +20 -0
- package/{serialization/types/SubscriptionUsageResponseModel.js → dist/serialization/types/ModerationConfig.js} +14 -10
- package/dist/serialization/types/ModerationGuardrailInput.d.ts +10 -0
- package/dist/serialization/types/ModerationGuardrailInput.js +42 -0
- package/dist/serialization/types/ModerationGuardrailOutput.d.ts +10 -0
- package/dist/serialization/types/ModerationGuardrailOutput.js +42 -0
- package/dist/serialization/types/ReferencedToolCommonModel.d.ts +2 -2
- package/dist/serialization/types/ReferencedToolCommonModel.js +2 -2
- package/dist/serialization/types/ReferencedToolCommonModelType.d.ts +7 -0
- package/dist/serialization/types/{ModerationStatusResponseModelWarningStatus.js → ReferencedToolCommonModelType.js} +2 -2
- package/dist/serialization/types/RegionConfigRequest.d.ts +13 -0
- package/dist/serialization/types/RegionConfigRequest.js +45 -0
- package/dist/serialization/types/SingleUseTokenResponseModel.d.ts +9 -0
- package/{serialization/types/ModerationStatusResponseModelWarningStatus.js → dist/serialization/types/SingleUseTokenResponseModel.js} +4 -2
- package/dist/serialization/types/SingleUseTokenType.d.ts +7 -0
- package/dist/serialization/types/{ModerationStatusResponseModelSafetyStatus.js → SingleUseTokenType.js} +2 -2
- package/dist/serialization/types/StreamingAudioChunkWithTimestampsAndVoiceSegmentsResponseModel.d.ts +14 -0
- package/dist/serialization/types/StreamingAudioChunkWithTimestampsAndVoiceSegmentsResponseModel.js +46 -0
- package/dist/serialization/types/SystemToolConfigInput.d.ts +4 -0
- package/dist/serialization/types/SystemToolConfigInput.js +4 -0
- package/dist/serialization/types/SystemToolConfigOutput.d.ts +4 -0
- package/dist/serialization/types/SystemToolConfigOutput.js +4 -0
- package/dist/serialization/types/ThresholdGuardrail.d.ts +10 -0
- package/dist/serialization/types/ThresholdGuardrail.js +42 -0
- package/dist/serialization/types/ToolCallSoundBehavior.d.ts +7 -0
- package/{serialization/types/ModerationStatusResponseModelSafetyStatus.js → dist/serialization/types/ToolCallSoundBehavior.js} +2 -2
- package/dist/serialization/types/ToolCallSoundType.d.ts +7 -0
- package/dist/serialization/types/ToolCallSoundType.js +39 -0
- package/dist/serialization/types/ToolRequestModelToolConfig.d.ts +1 -5
- package/dist/serialization/types/ToolRequestModelToolConfig.js +0 -3
- package/dist/serialization/types/TurnConfig.d.ts +2 -2
- package/dist/serialization/types/TurnConfig.js +2 -2
- package/dist/serialization/types/TurnConfigWorkflowOverride.d.ts +2 -2
- package/dist/serialization/types/TurnConfigWorkflowOverride.js +2 -2
- package/dist/serialization/types/TurnEagerness.d.ts +7 -0
- package/dist/serialization/types/TurnEagerness.js +39 -0
- package/dist/serialization/types/TwilioEdgeLocation.d.ts +7 -0
- package/dist/serialization/types/TwilioEdgeLocation.js +49 -0
- package/dist/serialization/types/TwilioRegionId.d.ts +7 -0
- package/dist/serialization/types/TwilioRegionId.js +39 -0
- package/dist/serialization/types/User.d.ts +0 -2
- package/dist/serialization/types/User.js +0 -2
- package/dist/serialization/types/VadConfig.d.ts +0 -1
- package/dist/serialization/types/VadConfig.js +1 -3
- package/dist/serialization/types/VadConfigWorkflowOverride.d.ts +0 -1
- package/dist/serialization/types/VadConfigWorkflowOverride.js +1 -3
- package/dist/serialization/types/VoiceSegment.d.ts +13 -0
- package/dist/serialization/types/VoiceSegment.js +45 -0
- package/dist/serialization/types/WebhookToolConfigInput.d.ts +4 -0
- package/dist/serialization/types/WebhookToolConfigInput.js +4 -0
- package/dist/serialization/types/WebhookToolConfigOutput.d.ts +4 -0
- package/dist/serialization/types/WebhookToolConfigOutput.js +4 -0
- package/dist/serialization/types/WorkspaceResourceType.d.ts +1 -1
- package/dist/serialization/types/WorkspaceResourceType.js +2 -0
- package/dist/serialization/types/index.d.ts +18 -5
- package/dist/serialization/types/index.js +18 -5
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/wrapper/ElevenLabsClient.js +1 -1
- package/dist/wrapper/music.d.ts +74 -3
- package/dist/wrapper/music.js +127 -14
- package/dist/wrapper/realtime/connection.js +0 -1
- package/dist/wrapper/realtime/scribe.d.ts +5 -0
- package/dist/wrapper/realtime/scribe.js +3 -0
- package/package.json +3 -2
- package/reference.md +221 -18
- package/serialization/resources/conversationalAi/resources/index.d.ts +2 -1
- package/serialization/resources/conversationalAi/resources/index.js +3 -2
- package/serialization/resources/conversationalAi/resources/mcpServers/client/requests/McpServerConfigUpdateRequestModel.d.ts +4 -0
- package/serialization/resources/conversationalAi/resources/mcpServers/client/requests/McpServerConfigUpdateRequestModel.js +6 -0
- package/serialization/resources/conversationalAi/resources/mcpServers/index.d.ts +1 -0
- package/serialization/resources/conversationalAi/resources/mcpServers/index.js +1 -0
- package/serialization/resources/conversationalAi/resources/mcpServers/types/McpServerConfigUpdateRequestModelRequestHeadersValue.d.ts +9 -0
- package/serialization/resources/conversationalAi/resources/mcpServers/types/McpServerConfigUpdateRequestModelRequestHeadersValue.js +41 -0
- package/serialization/resources/conversationalAi/resources/mcpServers/types/index.d.ts +1 -0
- package/serialization/resources/conversationalAi/resources/mcpServers/types/index.js +17 -0
- package/serialization/resources/music/client/requests/BodyComposeMusicV1MusicPost.d.ts +0 -2
- package/serialization/resources/music/client/requests/BodyComposeMusicV1MusicPost.js +0 -2
- package/serialization/resources/music/client/requests/BodyComposeMusicWithADetailedResponseV1MusicDetailedPost.d.ts +0 -2
- package/serialization/resources/music/client/requests/BodyComposeMusicWithADetailedResponseV1MusicDetailedPost.js +0 -2
- package/serialization/resources/music/client/requests/BodyStreamComposedMusicV1MusicStreamPost.d.ts +0 -2
- package/serialization/resources/music/client/requests/BodyStreamComposedMusicV1MusicStreamPost.js +0 -2
- package/serialization/resources/textToDialogue/client/requests/BodyTextToDialogueFullWithTimestamps.d.ts +19 -0
- package/serialization/resources/textToDialogue/client/requests/BodyTextToDialogueFullWithTimestamps.js +51 -0
- package/serialization/resources/textToDialogue/client/requests/BodyTextToDialogueStreamWithTimestamps.d.ts +19 -0
- package/serialization/resources/textToDialogue/client/requests/BodyTextToDialogueStreamWithTimestamps.js +51 -0
- package/serialization/resources/textToDialogue/client/requests/index.d.ts +2 -0
- package/serialization/resources/textToDialogue/client/requests/index.js +5 -1
- package/serialization/resources/textToDialogue/types/BodyTextToDialogueFullWithTimestampsApplyTextNormalization.d.ts +7 -0
- package/serialization/resources/textToDialogue/types/BodyTextToDialogueFullWithTimestampsApplyTextNormalization.js +39 -0
- package/serialization/resources/textToDialogue/types/BodyTextToDialogueStreamWithTimestampsApplyTextNormalization.d.ts +7 -0
- package/serialization/resources/textToDialogue/types/BodyTextToDialogueStreamWithTimestampsApplyTextNormalization.js +39 -0
- package/serialization/resources/textToDialogue/types/TextToDialogueConvertWithTimestampsRequestOutputFormat.d.ts +7 -0
- package/serialization/resources/textToDialogue/types/TextToDialogueConvertWithTimestampsRequestOutputFormat.js +61 -0
- package/serialization/resources/textToDialogue/types/TextToDialogueStreamWithTimestampsRequestOutputFormat.d.ts +7 -0
- package/serialization/resources/textToDialogue/types/TextToDialogueStreamWithTimestampsRequestOutputFormat.js +61 -0
- package/serialization/resources/textToDialogue/types/index.d.ts +4 -0
- package/serialization/resources/textToDialogue/types/index.js +4 -0
- package/serialization/types/AudioWithTimestampsAndVoiceSegmentsResponseModel.d.ts +14 -0
- package/serialization/types/AudioWithTimestampsAndVoiceSegmentsResponseModel.js +46 -0
- package/serialization/types/ClientToolConfigInput.d.ts +4 -0
- package/serialization/types/ClientToolConfigInput.js +4 -0
- package/serialization/types/ClientToolConfigOutput.d.ts +4 -0
- package/serialization/types/ClientToolConfigOutput.js +4 -0
- package/serialization/types/CreateTwilioPhoneNumberRequest.d.ts +2 -0
- package/serialization/types/CreateTwilioPhoneNumberRequest.js +2 -0
- package/serialization/types/GuardrailsV1Input.d.ts +11 -0
- package/serialization/types/GuardrailsV1Input.js +43 -0
- package/serialization/types/GuardrailsV1Output.d.ts +11 -0
- package/serialization/types/GuardrailsV1Output.js +43 -0
- package/serialization/types/Llm.d.ts +1 -1
- package/serialization/types/Llm.js +2 -0
- package/serialization/types/McpServerConfigInput.d.ts +2 -0
- package/serialization/types/McpServerConfigInput.js +2 -0
- package/serialization/types/McpServerConfigInputRequestHeadersValue.d.ts +2 -1
- package/serialization/types/McpServerConfigInputRequestHeadersValue.js +2 -1
- package/serialization/types/McpServerConfigOutput.d.ts +2 -0
- package/serialization/types/McpServerConfigOutput.js +2 -0
- package/serialization/types/McpServerConfigOutputRequestHeadersValue.d.ts +2 -1
- package/serialization/types/McpServerConfigOutputRequestHeadersValue.js +2 -1
- package/serialization/types/MetricType.d.ts +1 -1
- package/serialization/types/MetricType.js +1 -0
- package/serialization/types/ModerationConfig.d.ts +20 -0
- package/{dist/serialization/types/SubscriptionUsageResponseModel.js → serialization/types/ModerationConfig.js} +14 -10
- package/serialization/types/ModerationGuardrailInput.d.ts +10 -0
- package/serialization/types/ModerationGuardrailInput.js +42 -0
- package/serialization/types/ModerationGuardrailOutput.d.ts +10 -0
- package/serialization/types/ModerationGuardrailOutput.js +42 -0
- package/serialization/types/ReferencedToolCommonModel.d.ts +2 -2
- package/serialization/types/ReferencedToolCommonModel.js +2 -2
- package/serialization/types/ReferencedToolCommonModelType.d.ts +7 -0
- package/serialization/types/ReferencedToolCommonModelType.js +39 -0
- package/serialization/types/RegionConfigRequest.d.ts +13 -0
- package/serialization/types/RegionConfigRequest.js +45 -0
- package/serialization/types/SingleUseTokenResponseModel.d.ts +9 -0
- package/serialization/types/SingleUseTokenResponseModel.js +41 -0
- package/serialization/types/SingleUseTokenType.d.ts +7 -0
- package/serialization/types/SingleUseTokenType.js +39 -0
- package/serialization/types/StreamingAudioChunkWithTimestampsAndVoiceSegmentsResponseModel.d.ts +14 -0
- package/serialization/types/StreamingAudioChunkWithTimestampsAndVoiceSegmentsResponseModel.js +46 -0
- package/serialization/types/SystemToolConfigInput.d.ts +4 -0
- package/serialization/types/SystemToolConfigInput.js +4 -0
- package/serialization/types/SystemToolConfigOutput.d.ts +4 -0
- package/serialization/types/SystemToolConfigOutput.js +4 -0
- package/serialization/types/ThresholdGuardrail.d.ts +10 -0
- package/serialization/types/ThresholdGuardrail.js +42 -0
- package/serialization/types/ToolCallSoundBehavior.d.ts +7 -0
- package/serialization/types/ToolCallSoundBehavior.js +39 -0
- package/serialization/types/ToolCallSoundType.d.ts +7 -0
- package/serialization/types/ToolCallSoundType.js +39 -0
- package/serialization/types/ToolRequestModelToolConfig.d.ts +1 -5
- package/serialization/types/ToolRequestModelToolConfig.js +0 -3
- package/serialization/types/TurnConfig.d.ts +2 -2
- package/serialization/types/TurnConfig.js +2 -2
- package/serialization/types/TurnConfigWorkflowOverride.d.ts +2 -2
- package/serialization/types/TurnConfigWorkflowOverride.js +2 -2
- package/serialization/types/TurnEagerness.d.ts +7 -0
- package/serialization/types/TurnEagerness.js +39 -0
- package/serialization/types/TwilioEdgeLocation.d.ts +7 -0
- package/serialization/types/TwilioEdgeLocation.js +49 -0
- package/serialization/types/TwilioRegionId.d.ts +7 -0
- package/serialization/types/TwilioRegionId.js +39 -0
- package/serialization/types/User.d.ts +0 -2
- package/serialization/types/User.js +0 -2
- package/serialization/types/VadConfig.d.ts +0 -1
- package/serialization/types/VadConfig.js +1 -3
- package/serialization/types/VadConfigWorkflowOverride.d.ts +0 -1
- package/serialization/types/VadConfigWorkflowOverride.js +1 -3
- package/serialization/types/VoiceSegment.d.ts +13 -0
- package/serialization/types/VoiceSegment.js +45 -0
- package/serialization/types/WebhookToolConfigInput.d.ts +4 -0
- package/serialization/types/WebhookToolConfigInput.js +4 -0
- package/serialization/types/WebhookToolConfigOutput.d.ts +4 -0
- package/serialization/types/WebhookToolConfigOutput.js +4 -0
- package/serialization/types/WorkspaceResourceType.d.ts +1 -1
- package/serialization/types/WorkspaceResourceType.js +2 -0
- package/serialization/types/index.d.ts +18 -5
- package/serialization/types/index.js +18 -5
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/wrapper/ElevenLabsClient.js +1 -1
- package/wrapper/music.d.ts +74 -3
- package/wrapper/music.js +127 -14
- package/wrapper/realtime/connection.js +0 -1
- package/wrapper/realtime/scribe.d.ts +5 -0
- package/wrapper/realtime/scribe.js +3 -0
- package/api/types/ModerationStatusResponseModel.d.ts +0 -21
- package/api/types/ModerationStatusResponseModelSafetyStatus.d.ts +0 -6
- package/api/types/ModerationStatusResponseModelSafetyStatus.js +0 -9
- package/api/types/ModerationStatusResponseModelWarningStatus.d.ts +0 -5
- package/api/types/ModerationStatusResponseModelWarningStatus.js +0 -8
- package/api/types/SubscriptionExtrasResponseModel.d.ts +0 -27
- package/api/types/SubscriptionUsageResponseModel.d.ts +0 -18
- package/dist/api/types/ModerationStatusResponseModel.d.ts +0 -21
- package/dist/api/types/ModerationStatusResponseModelSafetyStatus.d.ts +0 -6
- package/dist/api/types/ModerationStatusResponseModelSafetyStatus.js +0 -9
- package/dist/api/types/ModerationStatusResponseModelWarningStatus.d.ts +0 -5
- package/dist/api/types/ModerationStatusResponseModelWarningStatus.js +0 -8
- package/dist/api/types/SubscriptionExtrasResponseModel.d.ts +0 -27
- package/dist/api/types/SubscriptionUsageResponseModel.d.ts +0 -18
- package/dist/serialization/types/ModerationStatusResponseModel.d.ts +0 -19
- package/dist/serialization/types/ModerationStatusResponseModel.js +0 -51
- package/dist/serialization/types/ModerationStatusResponseModelSafetyStatus.d.ts +0 -7
- package/dist/serialization/types/ModerationStatusResponseModelWarningStatus.d.ts +0 -7
- package/dist/serialization/types/SubscriptionExtrasResponseModel.d.ts +0 -22
- package/dist/serialization/types/SubscriptionExtrasResponseModel.js +0 -54
- package/dist/serialization/types/SubscriptionUsageResponseModel.d.ts +0 -16
- package/serialization/types/ModerationStatusResponseModel.d.ts +0 -19
- package/serialization/types/ModerationStatusResponseModel.js +0 -51
- package/serialization/types/ModerationStatusResponseModelSafetyStatus.d.ts +0 -7
- package/serialization/types/ModerationStatusResponseModelWarningStatus.d.ts +0 -7
- package/serialization/types/SubscriptionExtrasResponseModel.d.ts +0 -22
- package/serialization/types/SubscriptionExtrasResponseModel.js +0 -54
- package/serialization/types/SubscriptionUsageResponseModel.d.ts +0 -16
- /package/api/{types/ModerationStatusResponseModel.js → resources/conversationalAi/resources/mcpServers/types/McpServerConfigUpdateRequestModelRequestHeadersValue.js} +0 -0
- /package/api/{types/SubscriptionExtrasResponseModel.js → resources/textToDialogue/client/requests/BodyTextToDialogueFullWithTimestamps.js} +0 -0
- /package/api/{types/SubscriptionUsageResponseModel.js → resources/textToDialogue/client/requests/BodyTextToDialogueStreamWithTimestamps.js} +0 -0
- /package/{dist/api/types/ModerationStatusResponseModel.js → api/types/AudioWithTimestampsAndVoiceSegmentsResponseModel.js} +0 -0
- /package/{dist/api/types/SubscriptionExtrasResponseModel.js → api/types/GuardrailsV1Input.js} +0 -0
- /package/{dist/api/types/SubscriptionUsageResponseModel.js → api/types/GuardrailsV1Output.js} +0 -0
|
@@ -182,12 +182,7 @@ class Dubbing {
|
|
|
182
182
|
*
|
|
183
183
|
* @example
|
|
184
184
|
* import { createReadStream } from "fs";
|
|
185
|
-
* await client.dubbing.create({
|
|
186
|
-
* file: fs.createReadStream("/path/to/your/file"),
|
|
187
|
-
* csvFile: fs.createReadStream("/path/to/your/file"),
|
|
188
|
-
* foregroundAudioFile: fs.createReadStream("/path/to/your/file"),
|
|
189
|
-
* backgroundAudioFile: fs.createReadStream("/path/to/your/file")
|
|
190
|
-
* })
|
|
185
|
+
* await client.dubbing.create({})
|
|
191
186
|
*/
|
|
192
187
|
create(request, requestOptions) {
|
|
193
188
|
return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));
|
|
@@ -196,10 +191,18 @@ class Dubbing {
|
|
|
196
191
|
return __awaiter(this, void 0, void 0, function* () {
|
|
197
192
|
var _a, _b, _c, _d, _e;
|
|
198
193
|
const _request = yield core.newFormData();
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
194
|
+
if (request.file != null) {
|
|
195
|
+
yield _request.appendFile("file", request.file);
|
|
196
|
+
}
|
|
197
|
+
if (request.csvFile != null) {
|
|
198
|
+
yield _request.appendFile("csv_file", request.csvFile);
|
|
199
|
+
}
|
|
200
|
+
if (request.foregroundAudioFile != null) {
|
|
201
|
+
yield _request.appendFile("foreground_audio_file", request.foregroundAudioFile);
|
|
202
|
+
}
|
|
203
|
+
if (request.backgroundAudioFile != null) {
|
|
204
|
+
yield _request.appendFile("background_audio_file", request.backgroundAudioFile);
|
|
205
|
+
}
|
|
203
206
|
if (request.name != null) {
|
|
204
207
|
_request.append("name", request.name);
|
|
205
208
|
}
|
package/dist/api/resources/dubbing/client/requests/BodyDubAVideoOrAnAudioFileV1DubbingPost.d.ts
CHANGED
|
@@ -2,22 +2,17 @@ import * as core from "../../../../../core";
|
|
|
2
2
|
import * as ElevenLabs from "../../../../index";
|
|
3
3
|
/**
|
|
4
4
|
* @example
|
|
5
|
-
* {
|
|
6
|
-
* file: fs.createReadStream("/path/to/your/file"),
|
|
7
|
-
* csvFile: fs.createReadStream("/path/to/your/file"),
|
|
8
|
-
* foregroundAudioFile: fs.createReadStream("/path/to/your/file"),
|
|
9
|
-
* backgroundAudioFile: fs.createReadStream("/path/to/your/file")
|
|
10
|
-
* }
|
|
5
|
+
* {}
|
|
11
6
|
*/
|
|
12
7
|
export interface BodyDubAVideoOrAnAudioFileV1DubbingPost {
|
|
13
8
|
/** A list of file paths to audio recordings intended for voice cloning */
|
|
14
|
-
file
|
|
9
|
+
file?: core.file.Uploadable.FileLike | undefined;
|
|
15
10
|
/** CSV file containing transcription/translation metadata */
|
|
16
|
-
csvFile
|
|
11
|
+
csvFile?: core.file.Uploadable.FileLike | undefined;
|
|
17
12
|
/** For use only with csv input */
|
|
18
|
-
foregroundAudioFile
|
|
13
|
+
foregroundAudioFile?: core.file.Uploadable.FileLike | undefined;
|
|
19
14
|
/** For use only with csv input */
|
|
20
|
-
backgroundAudioFile
|
|
15
|
+
backgroundAudioFile?: core.file.Uploadable.FileLike | undefined;
|
|
21
16
|
/** Name of the dubbing project. */
|
|
22
17
|
name?: string;
|
|
23
18
|
/** URL of the source video/audio file. */
|
|
@@ -39,6 +39,7 @@ export * as models from "./models";
|
|
|
39
39
|
export * as usage from "./usage";
|
|
40
40
|
export * as webhooks from "./webhooks";
|
|
41
41
|
export * as forcedAlignment from "./forcedAlignment";
|
|
42
|
+
export * as tokens from "./tokens";
|
|
42
43
|
export * from "./history/client/requests";
|
|
43
44
|
export * from "./textToSoundEffects/client/requests";
|
|
44
45
|
export * from "./audioIsolation/client/requests";
|
|
@@ -36,7 +36,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
36
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.forcedAlignment = exports.webhooks = exports.usage = exports.models = exports.user = exports.samples = exports.workspace = exports.serviceAccounts = exports.conversationalAi = exports.v1TextToSpeechVoiceIdMultiStreamInput = exports.v1TextToSpeechVoiceIdStreamInput = exports.music = exports.speechToText = exports.pronunciationDictionaries = exports.audioNative = exports.dubbing = exports.studio = exports.voices = exports.textToVoice = exports.speechToSpeech = exports.textToDialogue = exports.textToSpeech = exports.audioIsolation = exports.textToSoundEffects = exports.history = void 0;
|
|
39
|
+
exports.tokens = exports.forcedAlignment = exports.webhooks = exports.usage = exports.models = exports.user = exports.samples = exports.workspace = exports.serviceAccounts = exports.conversationalAi = exports.v1TextToSpeechVoiceIdMultiStreamInput = exports.v1TextToSpeechVoiceIdStreamInput = exports.music = exports.speechToText = exports.pronunciationDictionaries = exports.audioNative = exports.dubbing = exports.studio = exports.voices = exports.textToVoice = exports.speechToSpeech = exports.textToDialogue = exports.textToSpeech = exports.audioIsolation = exports.textToSoundEffects = exports.history = void 0;
|
|
40
40
|
exports.history = __importStar(require("./history"));
|
|
41
41
|
__exportStar(require("./history/types"), exports);
|
|
42
42
|
exports.textToSoundEffects = __importStar(require("./textToSoundEffects"));
|
|
@@ -78,6 +78,7 @@ exports.models = __importStar(require("./models"));
|
|
|
78
78
|
exports.usage = __importStar(require("./usage"));
|
|
79
79
|
exports.webhooks = __importStar(require("./webhooks"));
|
|
80
80
|
exports.forcedAlignment = __importStar(require("./forcedAlignment"));
|
|
81
|
+
exports.tokens = __importStar(require("./tokens"));
|
|
81
82
|
__exportStar(require("./history/client/requests"), exports);
|
|
82
83
|
__exportStar(require("./textToSoundEffects/client/requests"), exports);
|
|
83
84
|
__exportStar(require("./audioIsolation/client/requests"), exports);
|
|
@@ -3,11 +3,9 @@ import * as ElevenLabs from "../../../../index";
|
|
|
3
3
|
* @example
|
|
4
4
|
* {
|
|
5
5
|
* prompt: undefined,
|
|
6
|
-
* musicPrompt: undefined,
|
|
7
6
|
* compositionPlan: undefined,
|
|
8
7
|
* musicLengthMs: undefined,
|
|
9
8
|
* modelId: undefined,
|
|
10
|
-
* seed: undefined,
|
|
11
9
|
* forceInstrumental: undefined,
|
|
12
10
|
* respectSectionsDurations: undefined,
|
|
13
11
|
* storeForInpainting: undefined
|
|
@@ -18,16 +16,12 @@ export interface BodyComposeMusicV1MusicPost {
|
|
|
18
16
|
outputFormat?: ElevenLabs.MusicComposeRequestOutputFormat;
|
|
19
17
|
/** A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`. */
|
|
20
18
|
prompt?: string;
|
|
21
|
-
/** A music prompt. Deprecated. Use `composition_plan` instead. */
|
|
22
|
-
musicPrompt?: ElevenLabs.MusicPrompt;
|
|
23
19
|
/** A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. */
|
|
24
20
|
compositionPlan?: ElevenLabs.MusicPrompt;
|
|
25
21
|
/** The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. */
|
|
26
22
|
musicLengthMs?: number;
|
|
27
23
|
/** The model to use for the generation. */
|
|
28
24
|
modelId?: "music_v1";
|
|
29
|
-
/** The seed to use for the generation. */
|
|
30
|
-
seed?: number;
|
|
31
25
|
/** If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`. */
|
|
32
26
|
forceInstrumental?: boolean;
|
|
33
27
|
/** Controls how strictly section durations in the `composition_plan` are enforced. Only used with `composition_plan`. When set to true, the model will precisely respect each section's `duration_ms` from the plan. When set to false, the model may adjust individual section durations which will generally lead to better generation quality and improved latency, while always preserving the total song duration from the plan. */
|
|
@@ -3,11 +3,9 @@ import * as ElevenLabs from "../../../../index";
|
|
|
3
3
|
* @example
|
|
4
4
|
* {
|
|
5
5
|
* prompt: undefined,
|
|
6
|
-
* musicPrompt: undefined,
|
|
7
6
|
* compositionPlan: undefined,
|
|
8
7
|
* musicLengthMs: undefined,
|
|
9
8
|
* modelId: undefined,
|
|
10
|
-
* seed: undefined,
|
|
11
9
|
* forceInstrumental: undefined,
|
|
12
10
|
* storeForInpainting: undefined
|
|
13
11
|
* }
|
|
@@ -17,16 +15,12 @@ export interface BodyComposeMusicWithADetailedResponseV1MusicDetailedPost {
|
|
|
17
15
|
outputFormat?: ElevenLabs.MusicComposeDetailedRequestOutputFormat;
|
|
18
16
|
/** A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`. */
|
|
19
17
|
prompt?: string;
|
|
20
|
-
/** A music prompt. Deprecated. Use `composition_plan` instead. */
|
|
21
|
-
musicPrompt?: ElevenLabs.MusicPrompt;
|
|
22
18
|
/** A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. */
|
|
23
19
|
compositionPlan?: ElevenLabs.MusicPrompt;
|
|
24
20
|
/** The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. */
|
|
25
21
|
musicLengthMs?: number;
|
|
26
22
|
/** The model to use for the generation. */
|
|
27
23
|
modelId?: "music_v1";
|
|
28
|
-
/** The seed to use for the generation. */
|
|
29
|
-
seed?: number;
|
|
30
24
|
/** If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`. */
|
|
31
25
|
forceInstrumental?: boolean;
|
|
32
26
|
/** Whether to store the generated song for inpainting. Only available to enterprise clients with access to the inpainting API. */
|
package/dist/api/resources/music/client/requests/BodyStreamComposedMusicV1MusicStreamPost.d.ts
CHANGED
|
@@ -3,11 +3,9 @@ import * as ElevenLabs from "../../../../index";
|
|
|
3
3
|
* @example
|
|
4
4
|
* {
|
|
5
5
|
* prompt: undefined,
|
|
6
|
-
* musicPrompt: undefined,
|
|
7
6
|
* compositionPlan: undefined,
|
|
8
7
|
* musicLengthMs: undefined,
|
|
9
8
|
* modelId: undefined,
|
|
10
|
-
* seed: undefined,
|
|
11
9
|
* forceInstrumental: undefined,
|
|
12
10
|
* storeForInpainting: undefined
|
|
13
11
|
* }
|
|
@@ -17,16 +15,12 @@ export interface BodyStreamComposedMusicV1MusicStreamPost {
|
|
|
17
15
|
outputFormat?: ElevenLabs.MusicStreamRequestOutputFormat;
|
|
18
16
|
/** A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`. */
|
|
19
17
|
prompt?: string;
|
|
20
|
-
/** A music prompt. Deprecated. Use `composition_plan` instead. */
|
|
21
|
-
musicPrompt?: ElevenLabs.MusicPrompt;
|
|
22
18
|
/** A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. */
|
|
23
19
|
compositionPlan?: ElevenLabs.MusicPrompt;
|
|
24
20
|
/** The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. */
|
|
25
21
|
musicLengthMs?: number;
|
|
26
22
|
/** The model to use for the generation. */
|
|
27
23
|
modelId?: "music_v1";
|
|
28
|
-
/** The seed to use for the generation. */
|
|
29
|
-
seed?: number;
|
|
30
24
|
/** If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`. */
|
|
31
25
|
forceInstrumental?: boolean;
|
|
32
26
|
/** Whether to store the generated song for inpainting. Only available to enterprise clients with access to the inpainting API. */
|
|
@@ -70,7 +70,6 @@ class PronunciationDictionaries {
|
|
|
70
70
|
* @example
|
|
71
71
|
* import { createReadStream } from "fs";
|
|
72
72
|
* await client.pronunciationDictionaries.createFromFile({
|
|
73
|
-
* file: fs.createReadStream("/path/to/your/file"),
|
|
74
73
|
* name: "name"
|
|
75
74
|
* })
|
|
76
75
|
*/
|
|
@@ -82,7 +81,9 @@ class PronunciationDictionaries {
|
|
|
82
81
|
var _a, _b, _c, _d, _e;
|
|
83
82
|
const _request = yield core.newFormData();
|
|
84
83
|
_request.append("name", request.name);
|
|
85
|
-
|
|
84
|
+
if (request.file != null) {
|
|
85
|
+
yield _request.appendFile("file", request.file);
|
|
86
|
+
}
|
|
86
87
|
if (request.description != null) {
|
|
87
88
|
_request.append("description", request.description);
|
|
88
89
|
}
|
|
@@ -3,7 +3,6 @@ import * as ElevenLabs from "../../../../index";
|
|
|
3
3
|
/**
|
|
4
4
|
* @example
|
|
5
5
|
* {
|
|
6
|
-
* file: fs.createReadStream("/path/to/your/file"),
|
|
7
6
|
* name: "name"
|
|
8
7
|
* }
|
|
9
8
|
*/
|
|
@@ -11,7 +10,7 @@ export interface BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFr
|
|
|
11
10
|
/** The name of the pronunciation dictionary, used for identification only. */
|
|
12
11
|
name: string;
|
|
13
12
|
/** A lexicon .pls file which we will use to initialize the project with. */
|
|
14
|
-
file
|
|
13
|
+
file?: core.file.Uploadable.FileLike | undefined;
|
|
15
14
|
/** A description of the pronunciation dictionary, used for identification only. */
|
|
16
15
|
description?: string;
|
|
17
16
|
/** Should be one of 'admin', 'editor' or 'viewer'. If not provided, defaults to no access. */
|
|
@@ -71,7 +71,6 @@ class SpeechToText {
|
|
|
71
71
|
* @example
|
|
72
72
|
* import { createReadStream } from "fs";
|
|
73
73
|
* await client.speechToText.convert({
|
|
74
|
-
* file: fs.createReadStream("/path/to/your/file"),
|
|
75
74
|
* enableLogging: true,
|
|
76
75
|
* modelId: "model_id"
|
|
77
76
|
* })
|
|
@@ -88,7 +87,9 @@ class SpeechToText {
|
|
|
88
87
|
}
|
|
89
88
|
const _request = yield core.newFormData();
|
|
90
89
|
_request.append("model_id", request.modelId);
|
|
91
|
-
|
|
90
|
+
if (request.file != null) {
|
|
91
|
+
yield _request.appendFile("file", request.file);
|
|
92
|
+
}
|
|
92
93
|
if (request.languageCode != null) {
|
|
93
94
|
_request.append("language_code", request.languageCode);
|
|
94
95
|
}
|
package/dist/api/resources/speechToText/client/requests/BodySpeechToTextV1SpeechToTextPost.d.ts
CHANGED
|
@@ -3,14 +3,12 @@ import * as ElevenLabs from "../../../../index";
|
|
|
3
3
|
/**
|
|
4
4
|
* @example
|
|
5
5
|
* {
|
|
6
|
-
* file: fs.createReadStream("/path/to/your/file"),
|
|
7
6
|
* enableLogging: true,
|
|
8
7
|
* modelId: "model_id"
|
|
9
8
|
* }
|
|
10
9
|
*
|
|
11
10
|
* @example
|
|
12
11
|
* {
|
|
13
|
-
* file: fs.createReadStream("/path/to/your/file"),
|
|
14
12
|
* enableLogging: true,
|
|
15
13
|
* modelId: "model_id"
|
|
16
14
|
* }
|
|
@@ -21,7 +19,7 @@ export interface BodySpeechToTextV1SpeechToTextPost {
|
|
|
21
19
|
/** The ID of the model to use for transcription, currently only 'scribe_v1' and 'scribe_v1_experimental' are available. */
|
|
22
20
|
modelId: string;
|
|
23
21
|
/** The file to transcribe. All major audio and video formats are supported. Exactly one of the file or cloud_storage_url parameters must be provided. The file size must be less than 3.0GB. */
|
|
24
|
-
file
|
|
22
|
+
file?: core.file.Uploadable.FileLike | undefined;
|
|
25
23
|
/** An ISO-639-1 or ISO-639-3 language_code corresponding to the language of the audio file. Can sometimes improve transcription performance if known beforehand. Defaults to null, in this case the language is predicted automatically. */
|
|
26
24
|
languageCode?: string;
|
|
27
25
|
/** Whether to tag audio events like (laughter), (footsteps), etc. in the transcription. */
|
|
@@ -156,7 +156,6 @@ class Projects {
|
|
|
156
156
|
* @example
|
|
157
157
|
* import { createReadStream } from "fs";
|
|
158
158
|
* await client.studio.projects.create({
|
|
159
|
-
* fromDocument: fs.createReadStream("/path/to/your/file"),
|
|
160
159
|
* name: "name"
|
|
161
160
|
* })
|
|
162
161
|
*/
|
|
@@ -180,7 +179,9 @@ class Projects {
|
|
|
180
179
|
if (request.fromUrl != null) {
|
|
181
180
|
_request.append("from_url", request.fromUrl);
|
|
182
181
|
}
|
|
183
|
-
|
|
182
|
+
if (request.fromDocument != null) {
|
|
183
|
+
yield _request.appendFile("from_document", request.fromDocument);
|
|
184
|
+
}
|
|
184
185
|
if (request.fromContentJson != null) {
|
|
185
186
|
_request.append("from_content_json", request.fromContentJson);
|
|
186
187
|
}
|
|
@@ -3,7 +3,6 @@ import * as ElevenLabs from "../../../../../../index";
|
|
|
3
3
|
/**
|
|
4
4
|
* @example
|
|
5
5
|
* {
|
|
6
|
-
* fromDocument: fs.createReadStream("/path/to/your/file"),
|
|
7
6
|
* name: "name"
|
|
8
7
|
* }
|
|
9
8
|
*/
|
|
@@ -19,7 +18,7 @@ export interface BodyCreateStudioProjectV1StudioProjectsPost {
|
|
|
19
18
|
/** An optional URL from which we will extract content to initialize the Studio project. If this is set, 'from_url' and 'from_content' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. */
|
|
20
19
|
fromUrl?: string;
|
|
21
20
|
/** An optional .epub, .pdf, .txt or similar file can be provided. If provided, we will initialize the Studio project with its content. If this is set, 'from_url' and 'from_content' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. */
|
|
22
|
-
fromDocument
|
|
21
|
+
fromDocument?: core.file.Uploadable.FileLike | undefined;
|
|
23
22
|
/**
|
|
24
23
|
* An optional content to initialize the Studio project with. If this is set, 'from_url' and 'from_document' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank.
|
|
25
24
|
*
|
|
@@ -40,9 +40,7 @@ export declare class Content {
|
|
|
40
40
|
*
|
|
41
41
|
* @example
|
|
42
42
|
* import { createReadStream } from "fs";
|
|
43
|
-
* await client.studio.projects.content.update("21m00Tcm4TlvDq8ikWAM", {
|
|
44
|
-
* fromDocument: fs.createReadStream("/path/to/your/file")
|
|
45
|
-
* })
|
|
43
|
+
* await client.studio.projects.content.update("21m00Tcm4TlvDq8ikWAM", {})
|
|
46
44
|
*/
|
|
47
45
|
update(projectId: string, request: ElevenLabs.studio.projects.BodyUpdateStudioProjectContentV1StudioProjectsProjectIdContentPost, requestOptions?: Content.RequestOptions): core.HttpResponsePromise<ElevenLabs.EditProjectResponseModel>;
|
|
48
46
|
private __update;
|
|
@@ -65,9 +65,7 @@ class Content {
|
|
|
65
65
|
*
|
|
66
66
|
* @example
|
|
67
67
|
* import { createReadStream } from "fs";
|
|
68
|
-
* await client.studio.projects.content.update("21m00Tcm4TlvDq8ikWAM", {
|
|
69
|
-
* fromDocument: fs.createReadStream("/path/to/your/file")
|
|
70
|
-
* })
|
|
68
|
+
* await client.studio.projects.content.update("21m00Tcm4TlvDq8ikWAM", {})
|
|
71
69
|
*/
|
|
72
70
|
update(projectId, request, requestOptions) {
|
|
73
71
|
return core.HttpResponsePromise.fromPromise(this.__update(projectId, request, requestOptions));
|
|
@@ -79,7 +77,9 @@ class Content {
|
|
|
79
77
|
if (request.fromUrl != null) {
|
|
80
78
|
_request.append("from_url", request.fromUrl);
|
|
81
79
|
}
|
|
82
|
-
|
|
80
|
+
if (request.fromDocument != null) {
|
|
81
|
+
yield _request.appendFile("from_document", request.fromDocument);
|
|
82
|
+
}
|
|
83
83
|
if (request.fromContentJson != null) {
|
|
84
84
|
_request.append("from_content_json", request.fromContentJson);
|
|
85
85
|
}
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import * as core from "../../../../../../../../../core";
|
|
2
2
|
/**
|
|
3
3
|
* @example
|
|
4
|
-
* {
|
|
5
|
-
* fromDocument: fs.createReadStream("/path/to/your/file")
|
|
6
|
-
* }
|
|
4
|
+
* {}
|
|
7
5
|
*/
|
|
8
6
|
export interface BodyUpdateStudioProjectContentV1StudioProjectsProjectIdContentPost {
|
|
9
7
|
/** An optional URL from which we will extract content to initialize the Studio project. If this is set, 'from_url' and 'from_content' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. */
|
|
10
8
|
fromUrl?: string;
|
|
11
9
|
/** An optional .epub, .pdf, .txt or similar file can be provided. If provided, we will initialize the Studio project with its content. If this is set, 'from_url' and 'from_content' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank. */
|
|
12
|
-
fromDocument
|
|
10
|
+
fromDocument?: core.file.Uploadable.FileLike | undefined;
|
|
13
11
|
/**
|
|
14
12
|
* An optional content to initialize the Studio project with. If this is set, 'from_url' and 'from_document' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank.
|
|
15
13
|
*
|
|
@@ -41,4 +41,31 @@ export declare class TextToDialogue {
|
|
|
41
41
|
*/
|
|
42
42
|
stream(request: ElevenLabs.BodyTextToDialogueMultiVoiceStreamingV1TextToDialogueStreamPost, requestOptions?: TextToDialogue.RequestOptions): core.HttpResponsePromise<ReadableStream<Uint8Array>>;
|
|
43
43
|
private __stream;
|
|
44
|
+
/**
|
|
45
|
+
* Converts a list of text and voice ID pairs into speech (dialogue) and returns a stream of JSON blobs containing audio as a base64 encoded string and timestamps
|
|
46
|
+
*/
|
|
47
|
+
streamWithTimestamps(request: ElevenLabs.BodyTextToDialogueStreamWithTimestamps, requestOptions?: TextToDialogue.RequestOptions): core.HttpResponsePromise<core.Stream<ElevenLabs.StreamingAudioChunkWithTimestampsAndVoiceSegmentsResponseModel>>;
|
|
48
|
+
private __streamWithTimestamps;
|
|
49
|
+
/**
|
|
50
|
+
* Generate dialogue from text with precise character-level timing information for audio-text synchronization.
|
|
51
|
+
*
|
|
52
|
+
* @param {ElevenLabs.BodyTextToDialogueFullWithTimestamps} request
|
|
53
|
+
* @param {TextToDialogue.RequestOptions} requestOptions - Request-specific configuration.
|
|
54
|
+
*
|
|
55
|
+
* @throws {@link ElevenLabs.UnprocessableEntityError}
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* await client.textToDialogue.convertWithTimestamps({
|
|
59
|
+
* outputFormat: "mp3_22050_32",
|
|
60
|
+
* inputs: [{
|
|
61
|
+
* text: "Hello, how are you?",
|
|
62
|
+
* voiceId: "bYTqZQo3Jz7LQtmGTgwi"
|
|
63
|
+
* }, {
|
|
64
|
+
* text: "I'm doing well, thank you!",
|
|
65
|
+
* voiceId: "6lCwbsX1yVjD49QmpkTR"
|
|
66
|
+
* }]
|
|
67
|
+
* })
|
|
68
|
+
*/
|
|
69
|
+
convertWithTimestamps(request: ElevenLabs.BodyTextToDialogueFullWithTimestamps, requestOptions?: TextToDialogue.RequestOptions): core.HttpResponsePromise<ElevenLabs.AudioWithTimestampsAndVoiceSegmentsResponseModel>;
|
|
70
|
+
private __convertWithTimestamps;
|
|
44
71
|
}
|
|
@@ -201,5 +201,187 @@ class TextToDialogue {
|
|
|
201
201
|
}
|
|
202
202
|
});
|
|
203
203
|
}
|
|
204
|
+
/**
|
|
205
|
+
* Converts a list of text and voice ID pairs into speech (dialogue) and returns a stream of JSON blobs containing audio as a base64 encoded string and timestamps
|
|
206
|
+
*/
|
|
207
|
+
streamWithTimestamps(request, requestOptions) {
|
|
208
|
+
return core.HttpResponsePromise.fromPromise(this.__streamWithTimestamps(request, requestOptions));
|
|
209
|
+
}
|
|
210
|
+
__streamWithTimestamps(request, requestOptions) {
|
|
211
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
212
|
+
var _a, _b, _c, _d, _e;
|
|
213
|
+
const { outputFormat } = request, _body = __rest(request, ["outputFormat"]);
|
|
214
|
+
const _queryParams = {};
|
|
215
|
+
if (outputFormat != null) {
|
|
216
|
+
_queryParams["output_format"] =
|
|
217
|
+
serializers.TextToDialogueStreamWithTimestampsRequestOutputFormat.jsonOrThrow(outputFormat, {
|
|
218
|
+
unrecognizedObjectKeys: "strip",
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
let _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ "xi-api-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
222
|
+
const _response = yield core.fetcher({
|
|
223
|
+
url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.ElevenLabsEnvironment.Production, "v1/text-to-dialogue/stream/with-timestamps"),
|
|
224
|
+
method: "POST",
|
|
225
|
+
headers: _headers,
|
|
226
|
+
contentType: "application/json",
|
|
227
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
228
|
+
requestType: "json",
|
|
229
|
+
body: serializers.BodyTextToDialogueStreamWithTimestamps.jsonOrThrow(_body, {
|
|
230
|
+
unrecognizedObjectKeys: "strip",
|
|
231
|
+
}),
|
|
232
|
+
responseType: "sse",
|
|
233
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 240000,
|
|
234
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
235
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
236
|
+
});
|
|
237
|
+
if (_response.ok) {
|
|
238
|
+
return {
|
|
239
|
+
data: new core.Stream({
|
|
240
|
+
stream: _response.body,
|
|
241
|
+
parse: (data) => __awaiter(this, void 0, void 0, function* () {
|
|
242
|
+
return serializers.StreamingAudioChunkWithTimestampsAndVoiceSegmentsResponseModel.parseOrThrow(data, {
|
|
243
|
+
unrecognizedObjectKeys: "passthrough",
|
|
244
|
+
allowUnrecognizedUnionMembers: true,
|
|
245
|
+
allowUnrecognizedEnumValues: true,
|
|
246
|
+
breadcrumbsPrefix: ["response"],
|
|
247
|
+
});
|
|
248
|
+
}),
|
|
249
|
+
signal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
250
|
+
eventShape: {
|
|
251
|
+
type: "json",
|
|
252
|
+
messageTerminator: "\n",
|
|
253
|
+
},
|
|
254
|
+
}),
|
|
255
|
+
rawResponse: _response.rawResponse,
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
if (_response.error.reason === "status-code") {
|
|
259
|
+
switch (_response.error.statusCode) {
|
|
260
|
+
case 422:
|
|
261
|
+
throw new ElevenLabs.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
262
|
+
unrecognizedObjectKeys: "passthrough",
|
|
263
|
+
allowUnrecognizedUnionMembers: true,
|
|
264
|
+
allowUnrecognizedEnumValues: true,
|
|
265
|
+
breadcrumbsPrefix: ["response"],
|
|
266
|
+
}), _response.rawResponse);
|
|
267
|
+
default:
|
|
268
|
+
throw new errors.ElevenLabsError({
|
|
269
|
+
statusCode: _response.error.statusCode,
|
|
270
|
+
body: _response.error.body,
|
|
271
|
+
rawResponse: _response.rawResponse,
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
switch (_response.error.reason) {
|
|
276
|
+
case "non-json":
|
|
277
|
+
throw new errors.ElevenLabsError({
|
|
278
|
+
statusCode: _response.error.statusCode,
|
|
279
|
+
body: _response.error.rawBody,
|
|
280
|
+
rawResponse: _response.rawResponse,
|
|
281
|
+
});
|
|
282
|
+
case "timeout":
|
|
283
|
+
throw new errors.ElevenLabsTimeoutError("Timeout exceeded when calling POST /v1/text-to-dialogue/stream/with-timestamps.");
|
|
284
|
+
case "unknown":
|
|
285
|
+
throw new errors.ElevenLabsError({
|
|
286
|
+
message: _response.error.errorMessage,
|
|
287
|
+
rawResponse: _response.rawResponse,
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* Generate dialogue from text with precise character-level timing information for audio-text synchronization.
|
|
294
|
+
*
|
|
295
|
+
* @param {ElevenLabs.BodyTextToDialogueFullWithTimestamps} request
|
|
296
|
+
* @param {TextToDialogue.RequestOptions} requestOptions - Request-specific configuration.
|
|
297
|
+
*
|
|
298
|
+
* @throws {@link ElevenLabs.UnprocessableEntityError}
|
|
299
|
+
*
|
|
300
|
+
* @example
|
|
301
|
+
* await client.textToDialogue.convertWithTimestamps({
|
|
302
|
+
* outputFormat: "mp3_22050_32",
|
|
303
|
+
* inputs: [{
|
|
304
|
+
* text: "Hello, how are you?",
|
|
305
|
+
* voiceId: "bYTqZQo3Jz7LQtmGTgwi"
|
|
306
|
+
* }, {
|
|
307
|
+
* text: "I'm doing well, thank you!",
|
|
308
|
+
* voiceId: "6lCwbsX1yVjD49QmpkTR"
|
|
309
|
+
* }]
|
|
310
|
+
* })
|
|
311
|
+
*/
|
|
312
|
+
convertWithTimestamps(request, requestOptions) {
|
|
313
|
+
return core.HttpResponsePromise.fromPromise(this.__convertWithTimestamps(request, requestOptions));
|
|
314
|
+
}
|
|
315
|
+
__convertWithTimestamps(request, requestOptions) {
|
|
316
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
317
|
+
var _a, _b, _c, _d, _e;
|
|
318
|
+
const { outputFormat } = request, _body = __rest(request, ["outputFormat"]);
|
|
319
|
+
const _queryParams = {};
|
|
320
|
+
if (outputFormat != null) {
|
|
321
|
+
_queryParams["output_format"] =
|
|
322
|
+
serializers.TextToDialogueConvertWithTimestampsRequestOutputFormat.jsonOrThrow(outputFormat, {
|
|
323
|
+
unrecognizedObjectKeys: "strip",
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
let _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ "xi-api-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
327
|
+
const _response = yield core.fetcher({
|
|
328
|
+
url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.ElevenLabsEnvironment.Production, "v1/text-to-dialogue/with-timestamps"),
|
|
329
|
+
method: "POST",
|
|
330
|
+
headers: _headers,
|
|
331
|
+
contentType: "application/json",
|
|
332
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
333
|
+
requestType: "json",
|
|
334
|
+
body: serializers.BodyTextToDialogueFullWithTimestamps.jsonOrThrow(_body, {
|
|
335
|
+
unrecognizedObjectKeys: "strip",
|
|
336
|
+
}),
|
|
337
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 240000,
|
|
338
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
339
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
340
|
+
});
|
|
341
|
+
if (_response.ok) {
|
|
342
|
+
return {
|
|
343
|
+
data: serializers.AudioWithTimestampsAndVoiceSegmentsResponseModel.parseOrThrow(_response.body, {
|
|
344
|
+
unrecognizedObjectKeys: "passthrough",
|
|
345
|
+
allowUnrecognizedUnionMembers: true,
|
|
346
|
+
allowUnrecognizedEnumValues: true,
|
|
347
|
+
breadcrumbsPrefix: ["response"],
|
|
348
|
+
}),
|
|
349
|
+
rawResponse: _response.rawResponse,
|
|
350
|
+
};
|
|
351
|
+
}
|
|
352
|
+
if (_response.error.reason === "status-code") {
|
|
353
|
+
switch (_response.error.statusCode) {
|
|
354
|
+
case 422:
|
|
355
|
+
throw new ElevenLabs.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
356
|
+
unrecognizedObjectKeys: "passthrough",
|
|
357
|
+
allowUnrecognizedUnionMembers: true,
|
|
358
|
+
allowUnrecognizedEnumValues: true,
|
|
359
|
+
breadcrumbsPrefix: ["response"],
|
|
360
|
+
}), _response.rawResponse);
|
|
361
|
+
default:
|
|
362
|
+
throw new errors.ElevenLabsError({
|
|
363
|
+
statusCode: _response.error.statusCode,
|
|
364
|
+
body: _response.error.body,
|
|
365
|
+
rawResponse: _response.rawResponse,
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
switch (_response.error.reason) {
|
|
370
|
+
case "non-json":
|
|
371
|
+
throw new errors.ElevenLabsError({
|
|
372
|
+
statusCode: _response.error.statusCode,
|
|
373
|
+
body: _response.error.rawBody,
|
|
374
|
+
rawResponse: _response.rawResponse,
|
|
375
|
+
});
|
|
376
|
+
case "timeout":
|
|
377
|
+
throw new errors.ElevenLabsTimeoutError("Timeout exceeded when calling POST /v1/text-to-dialogue/with-timestamps.");
|
|
378
|
+
case "unknown":
|
|
379
|
+
throw new errors.ElevenLabsError({
|
|
380
|
+
message: _response.error.errorMessage,
|
|
381
|
+
rawResponse: _response.rawResponse,
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
});
|
|
385
|
+
}
|
|
204
386
|
}
|
|
205
387
|
exports.TextToDialogue = TextToDialogue;
|