sarvamai 1.1.19-alpha.2 → 1.1.19
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/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/Client.d.ts +0 -6
- package/dist/cjs/Client.js +34 -44
- package/dist/cjs/api/errors/index.d.ts +0 -3
- package/dist/cjs/api/errors/index.js +0 -3
- package/dist/cjs/api/resources/index.d.ts +0 -4
- package/dist/cjs/api/resources/index.js +1 -5
- package/dist/cjs/api/resources/voiceCloning/client/Client.d.ts +32 -2
- package/dist/cjs/api/resources/voiceCloning/client/Client.js +110 -24
- package/dist/cjs/api/resources/voiceCloning/client/requests/CreateVoiceRequest.d.ts +2 -0
- package/dist/cjs/api/resources/voiceCloning/client/requests/DetectWatermarkRequest.d.ts +11 -0
- package/dist/cjs/api/resources/voiceCloning/client/requests/VoiceCloningRequest.d.ts +2 -0
- package/dist/cjs/api/resources/voiceCloning/client/requests/VoiceCloningStreamRequest.d.ts +2 -0
- package/dist/cjs/api/resources/voiceCloning/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/types/DocAiClassifyCategory.d.ts +9 -5
- package/dist/cjs/api/types/DocAiClassifyConfig.d.ts +9 -21
- package/dist/cjs/api/types/DocAiClassifyConfig.js +1 -6
- package/dist/cjs/api/types/DocAiClassifyJobRequest.d.ts +22 -9
- package/dist/cjs/api/types/DocAiClassifyJobRequest.js +3 -1
- package/dist/cjs/api/types/DocAiClassifyOutput.d.ts +1 -1
- package/dist/cjs/api/types/DocAiExample.d.ts +7 -0
- package/dist/cjs/api/types/DocAiPageRanges.d.ts +11 -0
- package/dist/cjs/api/types/DocAiProcessor.d.ts +8 -0
- package/dist/cjs/api/types/DocAiReviewPolicy.d.ts +9 -0
- package/dist/cjs/api/types/DocAiRoutingProfile.d.ts +7 -0
- package/dist/cjs/api/types/DocAiSplitConfig.d.ts +7 -29
- package/dist/cjs/api/types/DocAiSplitConfig.js +0 -15
- package/dist/cjs/api/types/DocAiSplitConstraints.d.ts +7 -0
- package/dist/cjs/api/types/DocAiSplitJobRequest.d.ts +17 -7
- package/dist/cjs/api/types/DocAiSplitJobRequest.js +1 -0
- package/dist/cjs/api/types/VoiceCloningConfigureConnection.d.ts +7 -0
- package/dist/cjs/api/types/VoiceLibraryCreateData.d.ts +2 -0
- package/dist/cjs/api/types/VoiceLibraryDetail.d.ts +1 -1
- package/dist/cjs/api/types/WatermarkDetectData.d.ts +27 -0
- package/dist/cjs/api/types/WatermarkDetectData.js +13 -0
- package/dist/cjs/api/types/WatermarkDetectResponse.d.ts +6 -0
- package/dist/cjs/api/types/index.d.ts +8 -51
- package/dist/cjs/api/types/index.js +8 -51
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/Client.d.mts +0 -6
- package/dist/esm/Client.mjs +0 -10
- package/dist/esm/api/errors/index.d.mts +0 -3
- package/dist/esm/api/errors/index.mjs +0 -3
- package/dist/esm/api/resources/index.d.mts +0 -4
- package/dist/esm/api/resources/index.mjs +0 -4
- package/dist/esm/api/resources/voiceCloning/client/Client.d.mts +32 -2
- package/dist/esm/api/resources/voiceCloning/client/Client.mjs +110 -24
- package/dist/esm/api/resources/voiceCloning/client/requests/CreateVoiceRequest.d.mts +2 -0
- package/dist/esm/api/resources/voiceCloning/client/requests/DetectWatermarkRequest.d.mts +11 -0
- package/dist/esm/api/resources/voiceCloning/client/requests/VoiceCloningRequest.d.mts +2 -0
- package/dist/esm/api/resources/voiceCloning/client/requests/VoiceCloningStreamRequest.d.mts +2 -0
- package/dist/esm/api/resources/voiceCloning/client/requests/index.d.mts +1 -0
- package/dist/esm/api/types/DocAiClassifyCategory.d.mts +9 -5
- package/dist/esm/api/types/DocAiClassifyConfig.d.mts +9 -21
- package/dist/esm/api/types/DocAiClassifyConfig.mjs +1 -6
- package/dist/esm/api/types/DocAiClassifyJobRequest.d.mts +22 -9
- package/dist/esm/api/types/DocAiClassifyJobRequest.mjs +3 -1
- package/dist/esm/api/types/DocAiClassifyOutput.d.mts +1 -1
- package/dist/esm/api/types/DocAiExample.d.mts +7 -0
- package/dist/esm/api/types/DocAiPageRanges.d.mts +11 -0
- package/dist/esm/api/types/DocAiProcessor.d.mts +8 -0
- package/dist/esm/api/types/DocAiReviewPolicy.d.mts +9 -0
- package/dist/esm/api/types/DocAiRoutingProfile.d.mts +7 -0
- package/dist/esm/api/types/DocAiSplitConfig.d.mts +7 -29
- package/dist/esm/api/types/DocAiSplitConfig.mjs +1 -14
- package/dist/esm/api/types/DocAiSplitConstraints.d.mts +7 -0
- package/dist/esm/api/types/DocAiSplitJobRequest.d.mts +17 -7
- package/dist/esm/api/types/DocAiSplitJobRequest.mjs +1 -0
- package/dist/esm/api/types/VoiceCloningConfigureConnection.d.mts +7 -0
- package/dist/esm/api/types/VoiceLibraryCreateData.d.mts +2 -0
- package/dist/esm/api/types/VoiceLibraryDetail.d.mts +1 -1
- package/dist/esm/api/types/WatermarkDetectData.d.mts +27 -0
- package/dist/esm/api/types/WatermarkDetectData.mjs +10 -0
- package/dist/esm/api/types/WatermarkDetectResponse.d.mts +6 -0
- package/dist/esm/api/types/index.d.mts +8 -51
- package/dist/esm/api/types/index.mjs +8 -51
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -37
- package/reference.md +78 -319
- package/dist/cjs/api/errors/LengthRequiredError.d.ts +0 -5
- package/dist/cjs/api/errors/LengthRequiredError.js +0 -54
- package/dist/cjs/api/errors/MethodNotAllowedError.d.ts +0 -6
- package/dist/cjs/api/errors/MethodNotAllowedError.js +0 -54
- package/dist/cjs/api/errors/RequestTimeoutError.d.ts +0 -5
- package/dist/cjs/api/errors/RequestTimeoutError.js +0 -54
- package/dist/cjs/api/resources/dictate/client/Client.d.ts +0 -78
- package/dist/cjs/api/resources/dictate/client/Client.js +0 -205
- package/dist/cjs/api/resources/dictate/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/dictate/client/index.js +0 -17
- package/dist/cjs/api/resources/dictate/client/requests/DictateRequest.d.ts +0 -37
- package/dist/cjs/api/resources/dictate/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/dictate/client/requests/index.js +0 -2
- package/dist/cjs/api/resources/dictate/exports.d.ts +0 -3
- package/dist/cjs/api/resources/dictate/exports.js +0 -22
- package/dist/cjs/api/resources/dictate/index.d.ts +0 -2
- package/dist/cjs/api/resources/dictate/index.js +0 -18
- package/dist/cjs/api/resources/dictate/resources/index.d.ts +0 -2
- package/dist/cjs/api/resources/dictate/resources/index.js +0 -41
- package/dist/cjs/api/resources/dictate/resources/jobs/client/Client.d.ts +0 -117
- package/dist/cjs/api/resources/dictate/resources/jobs/client/Client.js +0 -342
- package/dist/cjs/api/resources/dictate/resources/jobs/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/dictate/resources/jobs/client/index.js +0 -17
- package/dist/cjs/api/resources/dictate/resources/jobs/client/requests/DictateJobRequest.d.ts +0 -37
- package/dist/cjs/api/resources/dictate/resources/jobs/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/dictate/resources/jobs/client/requests/index.js +0 -2
- package/dist/cjs/api/resources/dictate/resources/jobs/exports.d.ts +0 -2
- package/dist/cjs/api/resources/dictate/resources/jobs/exports.js +0 -21
- package/dist/cjs/api/resources/dictate/resources/jobs/index.d.ts +0 -1
- package/dist/cjs/api/resources/dictate/resources/jobs/index.js +0 -17
- package/dist/cjs/api/resources/dictateStreaming/client/Client.d.ts +0 -35
- package/dist/cjs/api/resources/dictateStreaming/client/Client.js +0 -86
- package/dist/cjs/api/resources/dictateStreaming/client/Socket.d.ts +0 -55
- package/dist/cjs/api/resources/dictateStreaming/client/Socket.js +0 -174
- package/dist/cjs/api/resources/dictateStreaming/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/dictateStreaming/client/index.js +0 -2
- package/dist/cjs/api/resources/dictateStreaming/exports.d.ts +0 -2
- package/dist/cjs/api/resources/dictateStreaming/exports.js +0 -21
- package/dist/cjs/api/resources/dictateStreaming/index.d.ts +0 -2
- package/dist/cjs/api/resources/dictateStreaming/index.js +0 -18
- package/dist/cjs/api/resources/dictateStreaming/types/DictateStreamingEncoding.d.ts +0 -11
- package/dist/cjs/api/resources/dictateStreaming/types/DictateStreamingEncoding.js +0 -14
- package/dist/cjs/api/resources/dictateStreaming/types/DictateStreamingEndpointing.d.ts +0 -11
- package/dist/cjs/api/resources/dictateStreaming/types/DictateStreamingEndpointing.js +0 -14
- package/dist/cjs/api/resources/dictateStreaming/types/DictateStreamingLanguageCode.d.ts +0 -58
- package/dist/cjs/api/resources/dictateStreaming/types/DictateStreamingLanguageCode.js +0 -61
- package/dist/cjs/api/resources/dictateStreaming/types/DictateStreamingMode.d.ts +0 -15
- package/dist/cjs/api/resources/dictateStreaming/types/DictateStreamingMode.js +0 -18
- package/dist/cjs/api/resources/dictateStreaming/types/DictateStreamingReturnTimestamps.d.ts +0 -6
- package/dist/cjs/api/resources/dictateStreaming/types/DictateStreamingReturnTimestamps.js +0 -9
- package/dist/cjs/api/resources/dictateStreaming/types/DictateStreamingStreamType.d.ts +0 -13
- package/dist/cjs/api/resources/dictateStreaming/types/DictateStreamingStreamType.js +0 -16
- package/dist/cjs/api/resources/dictateStreaming/types/index.d.ts +0 -6
- package/dist/cjs/api/resources/dictateStreaming/types/index.js +0 -22
- package/dist/cjs/api/types/DictateAudioInput.d.ts +0 -8
- package/dist/cjs/api/types/DictateCallback.d.ts +0 -9
- package/dist/cjs/api/types/DictateConfigUpdate.d.ts +0 -47
- package/dist/cjs/api/types/DictateConfigUpdate.js +0 -17
- package/dist/cjs/api/types/DictateConfigUpdated.d.ts +0 -10
- package/dist/cjs/api/types/DictateContext.d.ts +0 -9
- package/dist/cjs/api/types/DictateCorrection.d.ts +0 -11
- package/dist/cjs/api/types/DictateCorrectionSource.d.ts +0 -6
- package/dist/cjs/api/types/DictateCorrectionSource.js +0 -9
- package/dist/cjs/api/types/DictateDegradedReason.d.ts +0 -19
- package/dist/cjs/api/types/DictateDegradedReason.js +0 -22
- package/dist/cjs/api/types/DictateDictationFinal.d.ts +0 -53
- package/dist/cjs/api/types/DictateDictationFinal.js +0 -25
- package/dist/cjs/api/types/DictateEnd.d.ts +0 -6
- package/dist/cjs/api/types/DictateError.d.ts +0 -43
- package/dist/cjs/api/types/DictateError.js +0 -3
- package/dist/cjs/api/types/DictateFlush.d.ts +0 -6
- package/dist/cjs/api/types/DictateFlush.js +0 -3
- package/dist/cjs/api/types/DictateJob.d.ts +0 -15
- package/dist/cjs/api/types/DictateJob.js +0 -3
- package/dist/cjs/api/types/DictateJobCreateResponse.d.ts +0 -5
- package/dist/cjs/api/types/DictateJobCreateResponse.js +0 -3
- package/dist/cjs/api/types/DictateJobError.d.ts +0 -17
- package/dist/cjs/api/types/DictateJobError.js +0 -3
- package/dist/cjs/api/types/DictateJobResult.d.ts +0 -23
- package/dist/cjs/api/types/DictateJobResult.js +0 -3
- package/dist/cjs/api/types/DictateJobState.d.ts +0 -15
- package/dist/cjs/api/types/DictateJobState.js +0 -18
- package/dist/cjs/api/types/DictateLanguageCode.d.ts +0 -32
- package/dist/cjs/api/types/DictateLanguageCode.js +0 -35
- package/dist/cjs/api/types/DictateMode.d.ts +0 -17
- package/dist/cjs/api/types/DictateMode.js +0 -20
- package/dist/cjs/api/types/DictateModel.d.ts +0 -6
- package/dist/cjs/api/types/DictateModel.js +0 -3
- package/dist/cjs/api/types/DictateOutput.d.ts +0 -11
- package/dist/cjs/api/types/DictateOutput.js +0 -3
- package/dist/cjs/api/types/DictateOutputDegradedReason.d.ts +0 -17
- package/dist/cjs/api/types/DictateOutputDegradedReason.js +0 -20
- package/dist/cjs/api/types/DictateOutputFinal.d.ts +0 -51
- package/dist/cjs/api/types/DictateOutputFinal.js +0 -23
- package/dist/cjs/api/types/DictateOutputRules.d.ts +0 -13
- package/dist/cjs/api/types/DictateOutputRules.js +0 -3
- package/dist/cjs/api/types/DictateOutputUsage.d.ts +0 -6
- package/dist/cjs/api/types/DictateOutputUsage.js +0 -3
- package/dist/cjs/api/types/DictatePing.d.ts +0 -6
- package/dist/cjs/api/types/DictatePing.js +0 -3
- package/dist/cjs/api/types/DictatePong.d.ts +0 -6
- package/dist/cjs/api/types/DictatePong.js +0 -3
- package/dist/cjs/api/types/DictateResponse.d.ts +0 -20
- package/dist/cjs/api/types/DictateResponse.js +0 -3
- package/dist/cjs/api/types/DictateSection.d.ts +0 -24
- package/dist/cjs/api/types/DictateSection.js +0 -3
- package/dist/cjs/api/types/DictateSegment.d.ts +0 -13
- package/dist/cjs/api/types/DictateSegment.js +0 -3
- package/dist/cjs/api/types/DictateSessionBegin.d.ts +0 -10
- package/dist/cjs/api/types/DictateSessionBegin.js +0 -3
- package/dist/cjs/api/types/DictateSessionEnd.d.ts +0 -16
- package/dist/cjs/api/types/DictateSessionEnd.js +0 -3
- package/dist/cjs/api/types/DictateSpeechEnd.d.ts +0 -6
- package/dist/cjs/api/types/DictateSpeechEnd.js +0 -3
- package/dist/cjs/api/types/DictateSpeechStart.d.ts +0 -6
- package/dist/cjs/api/types/DictateSpeechStart.js +0 -3
- package/dist/cjs/api/types/DictateStreamingContext.d.ts +0 -9
- package/dist/cjs/api/types/DictateStreamingContext.js +0 -3
- package/dist/cjs/api/types/DictateStreamingCorrection.d.ts +0 -17
- package/dist/cjs/api/types/DictateStreamingCorrection.js +0 -11
- package/dist/cjs/api/types/DictateStreamingStyle.d.ts +0 -44
- package/dist/cjs/api/types/DictateStreamingStyle.js +0 -21
- package/dist/cjs/api/types/DictateStreamingUsage.d.ts +0 -24
- package/dist/cjs/api/types/DictateStreamingUsage.js +0 -3
- package/dist/cjs/api/types/DictateStreamingVocabularyEntry.d.ts +0 -11
- package/dist/cjs/api/types/DictateStreamingVocabularyEntry.js +0 -3
- package/dist/cjs/api/types/DictateStyle.d.ts +0 -13
- package/dist/cjs/api/types/DictateStyle.js +0 -3
- package/dist/cjs/api/types/DictateStylePreset.d.ts +0 -15
- package/dist/cjs/api/types/DictateStylePreset.js +0 -18
- package/dist/cjs/api/types/DictateTranscriptFinal.d.ts +0 -18
- package/dist/cjs/api/types/DictateTranscriptFinal.js +0 -3
- package/dist/cjs/api/types/DictateTranscriptPartial.d.ts +0 -15
- package/dist/cjs/api/types/DictateTranscriptPartial.js +0 -3
- package/dist/cjs/api/types/DictateUsage.d.ts +0 -13
- package/dist/cjs/api/types/DictateUsage.js +0 -3
- package/dist/cjs/api/types/DictateVadSpeechEnd.d.ts +0 -9
- package/dist/cjs/api/types/DictateVadSpeechEnd.js +0 -3
- package/dist/cjs/api/types/DictateVadSpeechStart.d.ts +0 -9
- package/dist/cjs/api/types/DictateVadSpeechStart.js +0 -3
- package/dist/cjs/api/types/DictateVocabulary.d.ts +0 -5
- package/dist/cjs/api/types/DictateVocabulary.js +0 -3
- package/dist/cjs/api/types/DictateVocabularyEntry.d.ts +0 -11
- package/dist/cjs/api/types/DictateVocabularyEntry.js +0 -3
- package/dist/cjs/api/types/DocAiClassifyInspection.d.ts +0 -27
- package/dist/cjs/api/types/DocAiClassifyInspection.js +0 -15
- package/dist/cjs/api/types/DocAiSplitTrigger.d.ts +0 -59
- package/dist/cjs/api/types/DocAiSplitTrigger.js +0 -42
- package/dist/cjs/api/types/DocAiSplitTriggerMatch.d.ts +0 -8
- package/dist/cjs/api/types/DocAiSplitTriggerMatch.js +0 -3
- package/dist/esm/api/errors/LengthRequiredError.d.mts +0 -5
- package/dist/esm/api/errors/LengthRequiredError.mjs +0 -17
- package/dist/esm/api/errors/MethodNotAllowedError.d.mts +0 -6
- package/dist/esm/api/errors/MethodNotAllowedError.mjs +0 -17
- package/dist/esm/api/errors/RequestTimeoutError.d.mts +0 -5
- package/dist/esm/api/errors/RequestTimeoutError.mjs +0 -17
- package/dist/esm/api/resources/dictate/client/Client.d.mts +0 -78
- package/dist/esm/api/resources/dictate/client/Client.mjs +0 -168
- package/dist/esm/api/resources/dictate/client/index.d.mts +0 -1
- package/dist/esm/api/resources/dictate/client/index.mjs +0 -1
- package/dist/esm/api/resources/dictate/client/requests/DictateRequest.d.mts +0 -37
- package/dist/esm/api/resources/dictate/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/dictate/client/requests/index.mjs +0 -1
- package/dist/esm/api/resources/dictate/exports.d.mts +0 -3
- package/dist/esm/api/resources/dictate/exports.mjs +0 -4
- package/dist/esm/api/resources/dictate/index.d.mts +0 -2
- package/dist/esm/api/resources/dictate/index.mjs +0 -2
- package/dist/esm/api/resources/dictate/resources/index.d.mts +0 -2
- package/dist/esm/api/resources/dictate/resources/index.mjs +0 -2
- package/dist/esm/api/resources/dictate/resources/jobs/client/Client.d.mts +0 -117
- package/dist/esm/api/resources/dictate/resources/jobs/client/Client.mjs +0 -305
- package/dist/esm/api/resources/dictate/resources/jobs/client/index.d.mts +0 -1
- package/dist/esm/api/resources/dictate/resources/jobs/client/index.mjs +0 -1
- package/dist/esm/api/resources/dictate/resources/jobs/client/requests/DictateJobRequest.d.mts +0 -37
- package/dist/esm/api/resources/dictate/resources/jobs/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/dictate/resources/jobs/client/requests/index.mjs +0 -1
- package/dist/esm/api/resources/dictate/resources/jobs/exports.d.mts +0 -2
- package/dist/esm/api/resources/dictate/resources/jobs/exports.mjs +0 -3
- package/dist/esm/api/resources/dictate/resources/jobs/index.d.mts +0 -1
- package/dist/esm/api/resources/dictate/resources/jobs/index.mjs +0 -1
- package/dist/esm/api/resources/dictateStreaming/client/Client.d.mts +0 -35
- package/dist/esm/api/resources/dictateStreaming/client/Client.mjs +0 -49
- package/dist/esm/api/resources/dictateStreaming/client/Socket.d.mts +0 -55
- package/dist/esm/api/resources/dictateStreaming/client/Socket.mjs +0 -137
- package/dist/esm/api/resources/dictateStreaming/client/index.d.mts +0 -1
- package/dist/esm/api/resources/dictateStreaming/client/index.mjs +0 -1
- package/dist/esm/api/resources/dictateStreaming/exports.d.mts +0 -2
- package/dist/esm/api/resources/dictateStreaming/exports.mjs +0 -3
- package/dist/esm/api/resources/dictateStreaming/index.d.mts +0 -2
- package/dist/esm/api/resources/dictateStreaming/index.mjs +0 -2
- package/dist/esm/api/resources/dictateStreaming/types/DictateStreamingEncoding.d.mts +0 -11
- package/dist/esm/api/resources/dictateStreaming/types/DictateStreamingEncoding.mjs +0 -11
- package/dist/esm/api/resources/dictateStreaming/types/DictateStreamingEndpointing.d.mts +0 -11
- package/dist/esm/api/resources/dictateStreaming/types/DictateStreamingEndpointing.mjs +0 -11
- package/dist/esm/api/resources/dictateStreaming/types/DictateStreamingLanguageCode.d.mts +0 -58
- package/dist/esm/api/resources/dictateStreaming/types/DictateStreamingLanguageCode.mjs +0 -58
- package/dist/esm/api/resources/dictateStreaming/types/DictateStreamingMode.d.mts +0 -15
- package/dist/esm/api/resources/dictateStreaming/types/DictateStreamingMode.mjs +0 -15
- package/dist/esm/api/resources/dictateStreaming/types/DictateStreamingReturnTimestamps.d.mts +0 -6
- package/dist/esm/api/resources/dictateStreaming/types/DictateStreamingReturnTimestamps.mjs +0 -6
- package/dist/esm/api/resources/dictateStreaming/types/DictateStreamingStreamType.d.mts +0 -13
- package/dist/esm/api/resources/dictateStreaming/types/DictateStreamingStreamType.mjs +0 -13
- package/dist/esm/api/resources/dictateStreaming/types/index.d.mts +0 -6
- package/dist/esm/api/resources/dictateStreaming/types/index.mjs +0 -6
- package/dist/esm/api/types/DictateAudioInput.d.mts +0 -8
- package/dist/esm/api/types/DictateCallback.d.mts +0 -9
- package/dist/esm/api/types/DictateConfigUpdate.d.mts +0 -47
- package/dist/esm/api/types/DictateConfigUpdate.mjs +0 -14
- package/dist/esm/api/types/DictateConfigUpdated.d.mts +0 -10
- package/dist/esm/api/types/DictateContext.d.mts +0 -9
- package/dist/esm/api/types/DictateCorrection.d.mts +0 -11
- package/dist/esm/api/types/DictateCorrectionSource.d.mts +0 -6
- package/dist/esm/api/types/DictateCorrectionSource.mjs +0 -6
- package/dist/esm/api/types/DictateDegradedReason.d.mts +0 -19
- package/dist/esm/api/types/DictateDegradedReason.mjs +0 -19
- package/dist/esm/api/types/DictateDictationFinal.d.mts +0 -53
- package/dist/esm/api/types/DictateDictationFinal.mjs +0 -22
- package/dist/esm/api/types/DictateEnd.d.mts +0 -6
- package/dist/esm/api/types/DictateError.d.mts +0 -43
- package/dist/esm/api/types/DictateError.mjs +0 -2
- package/dist/esm/api/types/DictateFlush.d.mts +0 -6
- package/dist/esm/api/types/DictateFlush.mjs +0 -2
- package/dist/esm/api/types/DictateJob.d.mts +0 -15
- package/dist/esm/api/types/DictateJob.mjs +0 -2
- package/dist/esm/api/types/DictateJobCreateResponse.d.mts +0 -5
- package/dist/esm/api/types/DictateJobCreateResponse.mjs +0 -2
- package/dist/esm/api/types/DictateJobError.d.mts +0 -17
- package/dist/esm/api/types/DictateJobError.mjs +0 -2
- package/dist/esm/api/types/DictateJobResult.d.mts +0 -23
- package/dist/esm/api/types/DictateJobResult.mjs +0 -2
- package/dist/esm/api/types/DictateJobState.d.mts +0 -15
- package/dist/esm/api/types/DictateJobState.mjs +0 -15
- package/dist/esm/api/types/DictateLanguageCode.d.mts +0 -32
- package/dist/esm/api/types/DictateLanguageCode.mjs +0 -32
- package/dist/esm/api/types/DictateMode.d.mts +0 -17
- package/dist/esm/api/types/DictateMode.mjs +0 -17
- package/dist/esm/api/types/DictateModel.d.mts +0 -6
- package/dist/esm/api/types/DictateModel.mjs +0 -2
- package/dist/esm/api/types/DictateOutput.d.mts +0 -11
- package/dist/esm/api/types/DictateOutput.mjs +0 -2
- package/dist/esm/api/types/DictateOutputDegradedReason.d.mts +0 -17
- package/dist/esm/api/types/DictateOutputDegradedReason.mjs +0 -17
- package/dist/esm/api/types/DictateOutputFinal.d.mts +0 -51
- package/dist/esm/api/types/DictateOutputFinal.mjs +0 -20
- package/dist/esm/api/types/DictateOutputRules.d.mts +0 -13
- package/dist/esm/api/types/DictateOutputRules.mjs +0 -2
- package/dist/esm/api/types/DictateOutputUsage.d.mts +0 -6
- package/dist/esm/api/types/DictateOutputUsage.mjs +0 -2
- package/dist/esm/api/types/DictatePing.d.mts +0 -6
- package/dist/esm/api/types/DictatePing.mjs +0 -2
- package/dist/esm/api/types/DictatePong.d.mts +0 -6
- package/dist/esm/api/types/DictatePong.mjs +0 -2
- package/dist/esm/api/types/DictateResponse.d.mts +0 -20
- package/dist/esm/api/types/DictateResponse.mjs +0 -2
- package/dist/esm/api/types/DictateSection.d.mts +0 -24
- package/dist/esm/api/types/DictateSection.mjs +0 -2
- package/dist/esm/api/types/DictateSegment.d.mts +0 -13
- package/dist/esm/api/types/DictateSegment.mjs +0 -2
- package/dist/esm/api/types/DictateSessionBegin.d.mts +0 -10
- package/dist/esm/api/types/DictateSessionBegin.mjs +0 -2
- package/dist/esm/api/types/DictateSessionEnd.d.mts +0 -16
- package/dist/esm/api/types/DictateSessionEnd.mjs +0 -2
- package/dist/esm/api/types/DictateSpeechEnd.d.mts +0 -6
- package/dist/esm/api/types/DictateSpeechEnd.mjs +0 -2
- package/dist/esm/api/types/DictateSpeechStart.d.mts +0 -6
- package/dist/esm/api/types/DictateSpeechStart.mjs +0 -2
- package/dist/esm/api/types/DictateStreamingContext.d.mts +0 -9
- package/dist/esm/api/types/DictateStreamingContext.mjs +0 -2
- package/dist/esm/api/types/DictateStreamingCorrection.d.mts +0 -17
- package/dist/esm/api/types/DictateStreamingCorrection.mjs +0 -8
- package/dist/esm/api/types/DictateStreamingStyle.d.mts +0 -44
- package/dist/esm/api/types/DictateStreamingStyle.mjs +0 -18
- package/dist/esm/api/types/DictateStreamingUsage.d.mts +0 -24
- package/dist/esm/api/types/DictateStreamingUsage.mjs +0 -2
- package/dist/esm/api/types/DictateStreamingVocabularyEntry.d.mts +0 -11
- package/dist/esm/api/types/DictateStreamingVocabularyEntry.mjs +0 -2
- package/dist/esm/api/types/DictateStyle.d.mts +0 -13
- package/dist/esm/api/types/DictateStyle.mjs +0 -2
- package/dist/esm/api/types/DictateStylePreset.d.mts +0 -15
- package/dist/esm/api/types/DictateStylePreset.mjs +0 -15
- package/dist/esm/api/types/DictateTranscriptFinal.d.mts +0 -18
- package/dist/esm/api/types/DictateTranscriptFinal.mjs +0 -2
- package/dist/esm/api/types/DictateTranscriptPartial.d.mts +0 -15
- package/dist/esm/api/types/DictateTranscriptPartial.mjs +0 -2
- package/dist/esm/api/types/DictateUsage.d.mts +0 -13
- package/dist/esm/api/types/DictateUsage.mjs +0 -2
- package/dist/esm/api/types/DictateVadSpeechEnd.d.mts +0 -9
- package/dist/esm/api/types/DictateVadSpeechEnd.mjs +0 -2
- package/dist/esm/api/types/DictateVadSpeechStart.d.mts +0 -9
- package/dist/esm/api/types/DictateVadSpeechStart.mjs +0 -2
- package/dist/esm/api/types/DictateVocabulary.d.mts +0 -5
- package/dist/esm/api/types/DictateVocabulary.mjs +0 -2
- package/dist/esm/api/types/DictateVocabularyEntry.d.mts +0 -11
- package/dist/esm/api/types/DictateVocabularyEntry.mjs +0 -2
- package/dist/esm/api/types/DocAiClassifyInspection.d.mts +0 -27
- package/dist/esm/api/types/DocAiClassifyInspection.mjs +0 -12
- package/dist/esm/api/types/DocAiSplitTrigger.d.mts +0 -59
- package/dist/esm/api/types/DocAiSplitTrigger.mjs +0 -39
- package/dist/esm/api/types/DocAiSplitTriggerMatch.d.mts +0 -8
- package/dist/esm/api/types/DocAiSplitTriggerMatch.mjs +0 -2
- /package/dist/cjs/api/resources/{dictate/client/requests/DictateRequest.js → voiceCloning/client/requests/DetectWatermarkRequest.js} +0 -0
- /package/dist/cjs/api/{resources/dictate/resources/jobs/client/requests/DictateJobRequest.js → types/DocAiExample.js} +0 -0
- /package/dist/cjs/api/types/{DictateAudioInput.js → DocAiPageRanges.js} +0 -0
- /package/dist/cjs/api/types/{DictateCallback.js → DocAiProcessor.js} +0 -0
- /package/dist/cjs/api/types/{DictateConfigUpdated.js → DocAiReviewPolicy.js} +0 -0
- /package/dist/cjs/api/types/{DictateContext.js → DocAiRoutingProfile.js} +0 -0
- /package/dist/cjs/api/types/{DictateCorrection.js → DocAiSplitConstraints.js} +0 -0
- /package/dist/cjs/api/types/{DictateEnd.js → WatermarkDetectResponse.js} +0 -0
- /package/dist/esm/api/resources/{dictate/client/requests/DictateRequest.mjs → voiceCloning/client/requests/DetectWatermarkRequest.mjs} +0 -0
- /package/dist/esm/api/{resources/dictate/resources/jobs/client/requests/DictateJobRequest.mjs → types/DocAiExample.mjs} +0 -0
- /package/dist/esm/api/types/{DictateAudioInput.mjs → DocAiPageRanges.mjs} +0 -0
- /package/dist/esm/api/types/{DictateCallback.mjs → DocAiProcessor.mjs} +0 -0
- /package/dist/esm/api/types/{DictateConfigUpdated.mjs → DocAiReviewPolicy.mjs} +0 -0
- /package/dist/esm/api/types/{DictateContext.mjs → DocAiRoutingProfile.mjs} +0 -0
- /package/dist/esm/api/types/{DictateCorrection.mjs → DocAiSplitConstraints.mjs} +0 -0
- /package/dist/esm/api/types/{DictateEnd.mjs → WatermarkDetectResponse.mjs} +0 -0
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
|
|
|
43
43
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
44
44
|
"X-Fern-Language": "JavaScript",
|
|
45
45
|
"X-Fern-SDK-Name": "sarvamai",
|
|
46
|
-
"X-Fern-SDK-Version": "1.1.19
|
|
47
|
-
"User-Agent": "sarvamai/1.1.19
|
|
46
|
+
"X-Fern-SDK-Version": "1.1.19",
|
|
47
|
+
"User-Agent": "sarvamai/1.1.19",
|
|
48
48
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
49
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
50
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
package/dist/cjs/Client.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { ChatClient } from "./api/resources/chat/client/Client.js";
|
|
2
2
|
import { ChatCompletionClient } from "./api/resources/chatCompletion/client/Client.js";
|
|
3
3
|
import { DecisionsClient } from "./api/resources/decisions/client/Client.js";
|
|
4
|
-
import { DictateClient } from "./api/resources/dictate/client/Client.js";
|
|
5
|
-
import { DictateStreamingClient } from "./api/resources/dictateStreaming/client/Client.js";
|
|
6
4
|
import { DocAiClient } from "./api/resources/docAi/client/Client.js";
|
|
7
5
|
import { DocumentIntelligenceClient } from "./api/resources/documentIntelligence/client/Client.js";
|
|
8
6
|
import { DocumentTranslationClient } from "./api/resources/documentTranslation/client/Client.js";
|
|
@@ -44,11 +42,9 @@ export declare class SarvamAIClient {
|
|
|
44
42
|
protected _responses: ResponsesClient | undefined;
|
|
45
43
|
protected _chatCompletion: ChatCompletionClient | undefined;
|
|
46
44
|
protected _decisions: DecisionsClient | undefined;
|
|
47
|
-
protected _dictate: DictateClient | undefined;
|
|
48
45
|
protected _speechToTextStreaming: SpeechToTextStreamingClient | undefined;
|
|
49
46
|
protected _speechToTextTranslateStreaming: SpeechToTextTranslateStreamingClient | undefined;
|
|
50
47
|
protected _speechToTextRealtimeStreaming: SpeechToTextRealtimeStreamingClient | undefined;
|
|
51
|
-
protected _dictateStreaming: DictateStreamingClient | undefined;
|
|
52
48
|
protected _textToSpeechStreaming: TextToSpeechStreamingClient | undefined;
|
|
53
49
|
protected _voiceCloningStreaming: VoiceCloningStreamingClient | undefined;
|
|
54
50
|
constructor(options?: SarvamAIClient.Options);
|
|
@@ -67,11 +63,9 @@ export declare class SarvamAIClient {
|
|
|
67
63
|
get responses(): ResponsesClient;
|
|
68
64
|
get chatCompletion(): ChatCompletionClient;
|
|
69
65
|
get decisions(): DecisionsClient;
|
|
70
|
-
get dictate(): DictateClient;
|
|
71
66
|
get speechToTextStreaming(): SpeechToTextStreamingClient;
|
|
72
67
|
get speechToTextTranslateStreaming(): SpeechToTextTranslateStreamingClient;
|
|
73
68
|
get speechToTextRealtimeStreaming(): SpeechToTextRealtimeStreamingClient;
|
|
74
|
-
get dictateStreaming(): DictateStreamingClient;
|
|
75
69
|
get textToSpeechStreaming(): TextToSpeechStreamingClient;
|
|
76
70
|
get voiceCloningStreaming(): VoiceCloningStreamingClient;
|
|
77
71
|
}
|
package/dist/cjs/Client.js
CHANGED
|
@@ -5,25 +5,23 @@ exports.SarvamAIClient = void 0;
|
|
|
5
5
|
const Client_js_1 = require("./api/resources/chat/client/Client.js");
|
|
6
6
|
const Client_js_2 = require("./api/resources/chatCompletion/client/Client.js");
|
|
7
7
|
const Client_js_3 = require("./api/resources/decisions/client/Client.js");
|
|
8
|
-
const Client_js_4 = require("./api/resources/
|
|
9
|
-
const Client_js_5 = require("./api/resources/
|
|
10
|
-
const Client_js_6 = require("./api/resources/
|
|
11
|
-
const Client_js_7 = require("./api/resources/
|
|
12
|
-
const Client_js_8 = require("./api/resources/
|
|
13
|
-
const Client_js_9 = require("./api/resources/
|
|
14
|
-
const Client_js_10 = require("./api/resources/
|
|
15
|
-
const Client_js_11 = require("./api/resources/
|
|
16
|
-
const Client_js_12 = require("./api/resources/
|
|
17
|
-
const Client_js_13 = require("./api/resources/
|
|
18
|
-
const Client_js_14 = require("./api/resources/
|
|
19
|
-
const Client_js_15 = require("./api/resources/
|
|
20
|
-
const Client_js_16 = require("./api/resources/
|
|
21
|
-
const Client_js_17 = require("./api/resources/
|
|
22
|
-
const Client_js_18 = require("./api/resources/
|
|
23
|
-
const Client_js_19 = require("./api/resources/
|
|
24
|
-
const Client_js_20 = require("./api/resources/
|
|
25
|
-
const Client_js_21 = require("./api/resources/voiceCloning/client/Client.js");
|
|
26
|
-
const Client_js_22 = require("./api/resources/voiceCloningStreaming/client/Client.js");
|
|
8
|
+
const Client_js_4 = require("./api/resources/docAi/client/Client.js");
|
|
9
|
+
const Client_js_5 = require("./api/resources/documentIntelligence/client/Client.js");
|
|
10
|
+
const Client_js_6 = require("./api/resources/documentTranslation/client/Client.js");
|
|
11
|
+
const Client_js_7 = require("./api/resources/dubbing/client/Client.js");
|
|
12
|
+
const Client_js_8 = require("./api/resources/pronunciationDictionary/client/Client.js");
|
|
13
|
+
const Client_js_9 = require("./api/resources/responses/client/Client.js");
|
|
14
|
+
const Client_js_10 = require("./api/resources/speechToText/client/Client.js");
|
|
15
|
+
const Client_js_11 = require("./api/resources/speechToTextJob/client/Client.js");
|
|
16
|
+
const Client_js_12 = require("./api/resources/speechToTextRealtimeStreaming/client/Client.js");
|
|
17
|
+
const Client_js_13 = require("./api/resources/speechToTextStreaming/client/Client.js");
|
|
18
|
+
const Client_js_14 = require("./api/resources/speechToTextTranslateJob/client/Client.js");
|
|
19
|
+
const Client_js_15 = require("./api/resources/speechToTextTranslateStreaming/client/Client.js");
|
|
20
|
+
const Client_js_16 = require("./api/resources/text/client/Client.js");
|
|
21
|
+
const Client_js_17 = require("./api/resources/textToSpeech/client/Client.js");
|
|
22
|
+
const Client_js_18 = require("./api/resources/textToSpeechStreaming/client/Client.js");
|
|
23
|
+
const Client_js_19 = require("./api/resources/voiceCloning/client/Client.js");
|
|
24
|
+
const Client_js_20 = require("./api/resources/voiceCloningStreaming/client/Client.js");
|
|
27
25
|
const BaseClient_js_1 = require("./BaseClient.js");
|
|
28
26
|
class SarvamAIClient {
|
|
29
27
|
constructor(options = {}) {
|
|
@@ -31,31 +29,31 @@ class SarvamAIClient {
|
|
|
31
29
|
}
|
|
32
30
|
get dubbing() {
|
|
33
31
|
var _a;
|
|
34
|
-
return ((_a = this._dubbing) !== null && _a !== void 0 ? _a : (this._dubbing = new
|
|
32
|
+
return ((_a = this._dubbing) !== null && _a !== void 0 ? _a : (this._dubbing = new Client_js_7.DubbingClient(this._options)));
|
|
35
33
|
}
|
|
36
34
|
get documentTranslation() {
|
|
37
35
|
var _a;
|
|
38
|
-
return ((_a = this._documentTranslation) !== null && _a !== void 0 ? _a : (this._documentTranslation = new
|
|
36
|
+
return ((_a = this._documentTranslation) !== null && _a !== void 0 ? _a : (this._documentTranslation = new Client_js_6.DocumentTranslationClient(this._options)));
|
|
39
37
|
}
|
|
40
38
|
get text() {
|
|
41
39
|
var _a;
|
|
42
|
-
return ((_a = this._text) !== null && _a !== void 0 ? _a : (this._text = new
|
|
40
|
+
return ((_a = this._text) !== null && _a !== void 0 ? _a : (this._text = new Client_js_16.TextClient(this._options)));
|
|
43
41
|
}
|
|
44
42
|
get speechToText() {
|
|
45
43
|
var _a;
|
|
46
|
-
return ((_a = this._speechToText) !== null && _a !== void 0 ? _a : (this._speechToText = new
|
|
44
|
+
return ((_a = this._speechToText) !== null && _a !== void 0 ? _a : (this._speechToText = new Client_js_10.SpeechToTextClient(this._options)));
|
|
47
45
|
}
|
|
48
46
|
get textToSpeech() {
|
|
49
47
|
var _a;
|
|
50
|
-
return ((_a = this._textToSpeech) !== null && _a !== void 0 ? _a : (this._textToSpeech = new
|
|
48
|
+
return ((_a = this._textToSpeech) !== null && _a !== void 0 ? _a : (this._textToSpeech = new Client_js_17.TextToSpeechClient(this._options)));
|
|
51
49
|
}
|
|
52
50
|
get voiceCloning() {
|
|
53
51
|
var _a;
|
|
54
|
-
return ((_a = this._voiceCloning) !== null && _a !== void 0 ? _a : (this._voiceCloning = new
|
|
52
|
+
return ((_a = this._voiceCloning) !== null && _a !== void 0 ? _a : (this._voiceCloning = new Client_js_19.VoiceCloningClient(this._options)));
|
|
55
53
|
}
|
|
56
54
|
get pronunciationDictionary() {
|
|
57
55
|
var _a;
|
|
58
|
-
return ((_a = this._pronunciationDictionary) !== null && _a !== void 0 ? _a : (this._pronunciationDictionary = new
|
|
56
|
+
return ((_a = this._pronunciationDictionary) !== null && _a !== void 0 ? _a : (this._pronunciationDictionary = new Client_js_8.PronunciationDictionaryClient(this._options)));
|
|
59
57
|
}
|
|
60
58
|
get chat() {
|
|
61
59
|
var _a;
|
|
@@ -63,23 +61,23 @@ class SarvamAIClient {
|
|
|
63
61
|
}
|
|
64
62
|
get speechToTextJob() {
|
|
65
63
|
var _a;
|
|
66
|
-
return ((_a = this._speechToTextJob) !== null && _a !== void 0 ? _a : (this._speechToTextJob = new
|
|
64
|
+
return ((_a = this._speechToTextJob) !== null && _a !== void 0 ? _a : (this._speechToTextJob = new Client_js_11.SpeechToTextJobClient(this._options)));
|
|
67
65
|
}
|
|
68
66
|
get speechToTextTranslateJob() {
|
|
69
67
|
var _a;
|
|
70
|
-
return ((_a = this._speechToTextTranslateJob) !== null && _a !== void 0 ? _a : (this._speechToTextTranslateJob = new
|
|
68
|
+
return ((_a = this._speechToTextTranslateJob) !== null && _a !== void 0 ? _a : (this._speechToTextTranslateJob = new Client_js_14.SpeechToTextTranslateJobClient(this._options)));
|
|
71
69
|
}
|
|
72
70
|
get documentIntelligence() {
|
|
73
71
|
var _a;
|
|
74
|
-
return ((_a = this._documentIntelligence) !== null && _a !== void 0 ? _a : (this._documentIntelligence = new
|
|
72
|
+
return ((_a = this._documentIntelligence) !== null && _a !== void 0 ? _a : (this._documentIntelligence = new Client_js_5.DocumentIntelligenceClient(this._options)));
|
|
75
73
|
}
|
|
76
74
|
get docAi() {
|
|
77
75
|
var _a;
|
|
78
|
-
return ((_a = this._docAi) !== null && _a !== void 0 ? _a : (this._docAi = new
|
|
76
|
+
return ((_a = this._docAi) !== null && _a !== void 0 ? _a : (this._docAi = new Client_js_4.DocAiClient(this._options)));
|
|
79
77
|
}
|
|
80
78
|
get responses() {
|
|
81
79
|
var _a;
|
|
82
|
-
return ((_a = this._responses) !== null && _a !== void 0 ? _a : (this._responses = new
|
|
80
|
+
return ((_a = this._responses) !== null && _a !== void 0 ? _a : (this._responses = new Client_js_9.ResponsesClient(this._options)));
|
|
83
81
|
}
|
|
84
82
|
get chatCompletion() {
|
|
85
83
|
var _a;
|
|
@@ -89,33 +87,25 @@ class SarvamAIClient {
|
|
|
89
87
|
var _a;
|
|
90
88
|
return ((_a = this._decisions) !== null && _a !== void 0 ? _a : (this._decisions = new Client_js_3.DecisionsClient(this._options)));
|
|
91
89
|
}
|
|
92
|
-
get dictate() {
|
|
93
|
-
var _a;
|
|
94
|
-
return ((_a = this._dictate) !== null && _a !== void 0 ? _a : (this._dictate = new Client_js_4.DictateClient(this._options)));
|
|
95
|
-
}
|
|
96
90
|
get speechToTextStreaming() {
|
|
97
91
|
var _a;
|
|
98
|
-
return ((_a = this._speechToTextStreaming) !== null && _a !== void 0 ? _a : (this._speechToTextStreaming = new
|
|
92
|
+
return ((_a = this._speechToTextStreaming) !== null && _a !== void 0 ? _a : (this._speechToTextStreaming = new Client_js_13.SpeechToTextStreamingClient(this._options)));
|
|
99
93
|
}
|
|
100
94
|
get speechToTextTranslateStreaming() {
|
|
101
95
|
var _a;
|
|
102
|
-
return ((_a = this._speechToTextTranslateStreaming) !== null && _a !== void 0 ? _a : (this._speechToTextTranslateStreaming = new
|
|
96
|
+
return ((_a = this._speechToTextTranslateStreaming) !== null && _a !== void 0 ? _a : (this._speechToTextTranslateStreaming = new Client_js_15.SpeechToTextTranslateStreamingClient(this._options)));
|
|
103
97
|
}
|
|
104
98
|
get speechToTextRealtimeStreaming() {
|
|
105
99
|
var _a;
|
|
106
|
-
return ((_a = this._speechToTextRealtimeStreaming) !== null && _a !== void 0 ? _a : (this._speechToTextRealtimeStreaming = new
|
|
107
|
-
}
|
|
108
|
-
get dictateStreaming() {
|
|
109
|
-
var _a;
|
|
110
|
-
return ((_a = this._dictateStreaming) !== null && _a !== void 0 ? _a : (this._dictateStreaming = new Client_js_5.DictateStreamingClient(this._options)));
|
|
100
|
+
return ((_a = this._speechToTextRealtimeStreaming) !== null && _a !== void 0 ? _a : (this._speechToTextRealtimeStreaming = new Client_js_12.SpeechToTextRealtimeStreamingClient(this._options)));
|
|
111
101
|
}
|
|
112
102
|
get textToSpeechStreaming() {
|
|
113
103
|
var _a;
|
|
114
|
-
return ((_a = this._textToSpeechStreaming) !== null && _a !== void 0 ? _a : (this._textToSpeechStreaming = new
|
|
104
|
+
return ((_a = this._textToSpeechStreaming) !== null && _a !== void 0 ? _a : (this._textToSpeechStreaming = new Client_js_18.TextToSpeechStreamingClient(this._options)));
|
|
115
105
|
}
|
|
116
106
|
get voiceCloningStreaming() {
|
|
117
107
|
var _a;
|
|
118
|
-
return ((_a = this._voiceCloningStreaming) !== null && _a !== void 0 ? _a : (this._voiceCloningStreaming = new
|
|
108
|
+
return ((_a = this._voiceCloningStreaming) !== null && _a !== void 0 ? _a : (this._voiceCloningStreaming = new Client_js_20.VoiceCloningStreamingClient(this._options)));
|
|
119
109
|
}
|
|
120
110
|
}
|
|
121
111
|
exports.SarvamAIClient = SarvamAIClient;
|
|
@@ -5,11 +5,8 @@ export * from "./ContentTooLargeError.js";
|
|
|
5
5
|
export * from "./ForbiddenError.js";
|
|
6
6
|
export * from "./GatewayTimeoutError.js";
|
|
7
7
|
export * from "./InternalServerError.js";
|
|
8
|
-
export * from "./LengthRequiredError.js";
|
|
9
|
-
export * from "./MethodNotAllowedError.js";
|
|
10
8
|
export * from "./NotFoundError.js";
|
|
11
9
|
export * from "./PaymentRequiredError.js";
|
|
12
|
-
export * from "./RequestTimeoutError.js";
|
|
13
10
|
export * from "./ServiceUnavailableError.js";
|
|
14
11
|
export * from "./TooManyRequestsError.js";
|
|
15
12
|
export * from "./UnauthorizedError.js";
|
|
@@ -21,11 +21,8 @@ __exportStar(require("./ContentTooLargeError.js"), exports);
|
|
|
21
21
|
__exportStar(require("./ForbiddenError.js"), exports);
|
|
22
22
|
__exportStar(require("./GatewayTimeoutError.js"), exports);
|
|
23
23
|
__exportStar(require("./InternalServerError.js"), exports);
|
|
24
|
-
__exportStar(require("./LengthRequiredError.js"), exports);
|
|
25
|
-
__exportStar(require("./MethodNotAllowedError.js"), exports);
|
|
26
24
|
__exportStar(require("./NotFoundError.js"), exports);
|
|
27
25
|
__exportStar(require("./PaymentRequiredError.js"), exports);
|
|
28
|
-
__exportStar(require("./RequestTimeoutError.js"), exports);
|
|
29
26
|
__exportStar(require("./ServiceUnavailableError.js"), exports);
|
|
30
27
|
__exportStar(require("./TooManyRequestsError.js"), exports);
|
|
31
28
|
__exportStar(require("./UnauthorizedError.js"), exports);
|
|
@@ -3,10 +3,6 @@ export * as chat from "./chat/index.js";
|
|
|
3
3
|
export * as chatCompletion from "./chatCompletion/index.js";
|
|
4
4
|
export * from "./decisions/client/requests/index.js";
|
|
5
5
|
export * as decisions from "./decisions/index.js";
|
|
6
|
-
export * from "./dictate/client/requests/index.js";
|
|
7
|
-
export * as dictate from "./dictate/index.js";
|
|
8
|
-
export * as dictateStreaming from "./dictateStreaming/index.js";
|
|
9
|
-
export * from "./dictateStreaming/types/index.js";
|
|
10
6
|
export * from "./docAi/client/requests/index.js";
|
|
11
7
|
export * as docAi from "./docAi/index.js";
|
|
12
8
|
export * from "./docAi/types/index.js";
|
|
@@ -36,16 +36,12 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
};
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.voiceCloningStreaming = exports.voiceCloning = exports.textToSpeechStreaming = exports.textToSpeech = exports.text = exports.speechToTextTranslateStreaming = exports.speechToTextTranslateJob = exports.speechToTextStreaming = exports.speechToTextRealtimeStreaming = exports.speechToTextJob = exports.speechToText = exports.responses = exports.pronunciationDictionary = exports.dubbing = exports.documentTranslation = exports.documentIntelligence = exports.docAi = exports.
|
|
39
|
+
exports.voiceCloningStreaming = exports.voiceCloning = exports.textToSpeechStreaming = exports.textToSpeech = exports.text = exports.speechToTextTranslateStreaming = exports.speechToTextTranslateJob = exports.speechToTextStreaming = exports.speechToTextRealtimeStreaming = exports.speechToTextJob = exports.speechToText = exports.responses = exports.pronunciationDictionary = exports.dubbing = exports.documentTranslation = exports.documentIntelligence = exports.docAi = exports.decisions = exports.chatCompletion = exports.chat = void 0;
|
|
40
40
|
__exportStar(require("./chat/client/requests/index.js"), exports);
|
|
41
41
|
exports.chat = __importStar(require("./chat/index.js"));
|
|
42
42
|
exports.chatCompletion = __importStar(require("./chatCompletion/index.js"));
|
|
43
43
|
__exportStar(require("./decisions/client/requests/index.js"), exports);
|
|
44
44
|
exports.decisions = __importStar(require("./decisions/index.js"));
|
|
45
|
-
__exportStar(require("./dictate/client/requests/index.js"), exports);
|
|
46
|
-
exports.dictate = __importStar(require("./dictate/index.js"));
|
|
47
|
-
exports.dictateStreaming = __importStar(require("./dictateStreaming/index.js"));
|
|
48
|
-
__exportStar(require("./dictateStreaming/types/index.js"), exports);
|
|
49
45
|
__exportStar(require("./docAi/client/requests/index.js"), exports);
|
|
50
46
|
exports.docAi = __importStar(require("./docAi/index.js"));
|
|
51
47
|
__exportStar(require("./docAi/types/index.js"), exports);
|
|
@@ -82,9 +82,9 @@ export declare class VoiceCloningClient {
|
|
|
82
82
|
convertStream(request: SarvamAI.VoiceCloningStreamRequest, requestOptions?: VoiceCloningClient.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
|
|
83
83
|
private __convertStream;
|
|
84
84
|
/**
|
|
85
|
-
* **Beta.** Creates a cloned voice from a reference audio clip in **one shot**. The whole pipeline runs inline: the audio is stored, validated for quality, transcribed via ASR, and cloned - the response returns the new `voice_id` and the auto-generated transcript (`reference_text`) together.
|
|
85
|
+
* **Beta.** Creates a cloned voice from a reference audio clip in **one shot**. The whole pipeline runs inline: the audio is stored, validated for quality, transcribed via ASR, and cloned - the response returns the new `voice_id` and the auto-generated transcript (`reference_text`) together.
|
|
86
86
|
*
|
|
87
|
-
*
|
|
87
|
+
* `remove_background_noise` defaults to `true`: background noise is removed from the reference audio using ML vocal extraction before the voice is saved. Pass `false` to keep the original clip. The response includes `background_noise_removed` to indicate whether denoise was actually applied.
|
|
88
88
|
*
|
|
89
89
|
* Accepts `multipart/form-data` - send the audio as the `file` upload and everything else as form fields.
|
|
90
90
|
*
|
|
@@ -117,6 +117,36 @@ export declare class VoiceCloningClient {
|
|
|
117
117
|
*/
|
|
118
118
|
createVoice(request: SarvamAI.CreateVoiceRequest, requestOptions?: VoiceCloningClient.RequestOptions): core.HttpResponsePromise<SarvamAI.VoiceLibraryCreateResponse>;
|
|
119
119
|
private __createVoice;
|
|
120
|
+
/**
|
|
121
|
+
* **Beta.** Detects whether an audio clip carries the Sarvam STFT watermark embedded by Instant Voice Cloning generation.
|
|
122
|
+
*
|
|
123
|
+
* Upload a clip produced by `POST /voices/clone` (or stream / WebSocket) to check whether Sarvam generated it. Clips shorter than about 5 seconds usually return `inconclusive` — there is not enough signal to be confident.
|
|
124
|
+
*
|
|
125
|
+
* Accepts `multipart/form-data` with a single `file` upload.
|
|
126
|
+
*
|
|
127
|
+
* **Base URL:** `https://api.sarvam.ai`.
|
|
128
|
+
* **Auth:** send your key in the `api-subscription-key` header.
|
|
129
|
+
*
|
|
130
|
+
* **Limits:** max file size 10 MB; analysis is capped at 120 seconds of audio. Rate limited to 5 requests per minute.
|
|
131
|
+
*
|
|
132
|
+
* **Billing:** free — this endpoint consumes no credits.
|
|
133
|
+
*
|
|
134
|
+
* @param {SarvamAI.DetectWatermarkRequest} request
|
|
135
|
+
* @param {VoiceCloningClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
136
|
+
*
|
|
137
|
+
* @throws {@link SarvamAI.BadRequestError}
|
|
138
|
+
* @throws {@link SarvamAI.UnauthorizedError}
|
|
139
|
+
* @throws {@link SarvamAI.TooManyRequestsError}
|
|
140
|
+
* @throws {@link SarvamAI.InternalServerError}
|
|
141
|
+
*
|
|
142
|
+
* @example
|
|
143
|
+
* import { createReadStream } from "fs";
|
|
144
|
+
* await client.voiceCloning.detectWatermark({
|
|
145
|
+
* file: fs.createReadStream("/path/to/your/file")
|
|
146
|
+
* })
|
|
147
|
+
*/
|
|
148
|
+
detectWatermark(request: SarvamAI.DetectWatermarkRequest, requestOptions?: VoiceCloningClient.RequestOptions): core.HttpResponsePromise<SarvamAI.WatermarkDetectResponse>;
|
|
149
|
+
private __detectWatermark;
|
|
120
150
|
/**
|
|
121
151
|
* **Beta.** Lists the cloned voices in your workspace, newest first. Use the returned `id` with POST /voices/clone (`voice_id`) or GET /voices/{voice_id}.
|
|
122
152
|
*
|
|
@@ -98,7 +98,7 @@ class VoiceCloningClient {
|
|
|
98
98
|
}
|
|
99
99
|
__convert(request, requestOptions) {
|
|
100
100
|
return __awaiter(this, void 0, void 0, function* () {
|
|
101
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
101
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
|
102
102
|
const _body = yield core.newFormData();
|
|
103
103
|
if (request.voice_id != null) {
|
|
104
104
|
_body.append("voice_id", request.voice_id);
|
|
@@ -131,33 +131,36 @@ class VoiceCloningClient {
|
|
|
131
131
|
if (request.enable_vad != null) {
|
|
132
132
|
_body.append("enable_vad", (_e = request.enable_vad) === null || _e === void 0 ? void 0 : _e.toString());
|
|
133
133
|
}
|
|
134
|
+
if (request.remove_background_noise != null) {
|
|
135
|
+
_body.append("remove_background_noise", (_f = request.remove_background_noise) === null || _f === void 0 ? void 0 : _f.toString());
|
|
136
|
+
}
|
|
134
137
|
if (request.enable_text_normalization != null) {
|
|
135
|
-
_body.append("enable_text_normalization", (
|
|
138
|
+
_body.append("enable_text_normalization", (_g = request.enable_text_normalization) === null || _g === void 0 ? void 0 : _g.toString());
|
|
136
139
|
}
|
|
137
140
|
if (request.min_audio_duration != null) {
|
|
138
|
-
_body.append("min_audio_duration", (
|
|
141
|
+
_body.append("min_audio_duration", (_h = request.min_audio_duration) === null || _h === void 0 ? void 0 : _h.toString());
|
|
139
142
|
}
|
|
140
143
|
if (request.max_audio_duration != null) {
|
|
141
|
-
_body.append("max_audio_duration", (
|
|
144
|
+
_body.append("max_audio_duration", (_j = request.max_audio_duration) === null || _j === void 0 ? void 0 : _j.toString());
|
|
142
145
|
}
|
|
143
146
|
if (request.ref_audio_duration != null) {
|
|
144
|
-
_body.append("ref_audio_duration", (
|
|
147
|
+
_body.append("ref_audio_duration", (_k = request.ref_audio_duration) === null || _k === void 0 ? void 0 : _k.toString());
|
|
145
148
|
}
|
|
146
149
|
const _maybeEncodedRequest = yield _body.getRequest();
|
|
147
150
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
148
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (
|
|
151
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_l = this._options) === null || _l === void 0 ? void 0 : _l.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, _maybeEncodedRequest.headers)), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
149
152
|
const _response = yield core.fetcher({
|
|
150
|
-
url: core.url.join((
|
|
153
|
+
url: core.url.join((_m = (yield core.Supplier.get(this._options.baseUrl))) !== null && _m !== void 0 ? _m : ((_o = (yield core.Supplier.get(this._options.environment))) !== null && _o !== void 0 ? _o : environments.SarvamAIEnvironment.Production).base, "voices/clone"),
|
|
151
154
|
method: "POST",
|
|
152
155
|
headers: _headers,
|
|
153
156
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
154
157
|
requestType: "file",
|
|
155
158
|
duplex: _maybeEncodedRequest.duplex,
|
|
156
159
|
body: _maybeEncodedRequest.body,
|
|
157
|
-
timeoutMs: ((
|
|
158
|
-
maxRetries: (
|
|
160
|
+
timeoutMs: ((_r = (_p = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _p !== void 0 ? _p : (_q = this._options) === null || _q === void 0 ? void 0 : _q.timeoutInSeconds) !== null && _r !== void 0 ? _r : 60) * 1000,
|
|
161
|
+
maxRetries: (_s = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _s !== void 0 ? _s : (_t = this._options) === null || _t === void 0 ? void 0 : _t.maxRetries,
|
|
159
162
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
160
|
-
fetchFn: (
|
|
163
|
+
fetchFn: (_u = this._options) === null || _u === void 0 ? void 0 : _u.fetch,
|
|
161
164
|
logging: this._options.logging,
|
|
162
165
|
});
|
|
163
166
|
if (_response.ok) {
|
|
@@ -228,7 +231,7 @@ class VoiceCloningClient {
|
|
|
228
231
|
}
|
|
229
232
|
__convertStream(request, requestOptions) {
|
|
230
233
|
return __awaiter(this, void 0, void 0, function* () {
|
|
231
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
234
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
232
235
|
const _body = yield core.newFormData();
|
|
233
236
|
if (request.voice_id != null) {
|
|
234
237
|
_body.append("voice_id", request.voice_id);
|
|
@@ -258,11 +261,14 @@ class VoiceCloningClient {
|
|
|
258
261
|
if (request.enable_text_normalization != null) {
|
|
259
262
|
_body.append("enable_text_normalization", (_c = request.enable_text_normalization) === null || _c === void 0 ? void 0 : _c.toString());
|
|
260
263
|
}
|
|
264
|
+
if (request.remove_background_noise != null) {
|
|
265
|
+
_body.append("remove_background_noise", (_d = request.remove_background_noise) === null || _d === void 0 ? void 0 : _d.toString());
|
|
266
|
+
}
|
|
261
267
|
const _maybeEncodedRequest = yield _body.getRequest();
|
|
262
268
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
263
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (
|
|
269
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_e = this._options) === null || _e === void 0 ? void 0 : _e.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, _maybeEncodedRequest.headers)), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
264
270
|
const _response = yield core.fetcher({
|
|
265
|
-
url: core.url.join((
|
|
271
|
+
url: core.url.join((_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : ((_g = (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.SarvamAIEnvironment.Production).base, "voices/clone/stream"),
|
|
266
272
|
method: "POST",
|
|
267
273
|
headers: _headers,
|
|
268
274
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -270,10 +276,10 @@ class VoiceCloningClient {
|
|
|
270
276
|
duplex: _maybeEncodedRequest.duplex,
|
|
271
277
|
body: _maybeEncodedRequest.body,
|
|
272
278
|
responseType: "binary-response",
|
|
273
|
-
timeoutMs: ((
|
|
274
|
-
maxRetries: (
|
|
279
|
+
timeoutMs: ((_k = (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.timeoutInSeconds) !== null && _k !== void 0 ? _k : 60) * 1000,
|
|
280
|
+
maxRetries: (_l = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _l !== void 0 ? _l : (_m = this._options) === null || _m === void 0 ? void 0 : _m.maxRetries,
|
|
275
281
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
276
|
-
fetchFn: (
|
|
282
|
+
fetchFn: (_o = this._options) === null || _o === void 0 ? void 0 : _o.fetch,
|
|
277
283
|
logging: this._options.logging,
|
|
278
284
|
});
|
|
279
285
|
if (_response.ok) {
|
|
@@ -311,9 +317,9 @@ class VoiceCloningClient {
|
|
|
311
317
|
});
|
|
312
318
|
}
|
|
313
319
|
/**
|
|
314
|
-
* **Beta.** Creates a cloned voice from a reference audio clip in **one shot**. The whole pipeline runs inline: the audio is stored, validated for quality, transcribed via ASR, and cloned - the response returns the new `voice_id` and the auto-generated transcript (`reference_text`) together.
|
|
320
|
+
* **Beta.** Creates a cloned voice from a reference audio clip in **one shot**. The whole pipeline runs inline: the audio is stored, validated for quality, transcribed via ASR, and cloned - the response returns the new `voice_id` and the auto-generated transcript (`reference_text`) together.
|
|
315
321
|
*
|
|
316
|
-
*
|
|
322
|
+
* `remove_background_noise` defaults to `true`: background noise is removed from the reference audio using ML vocal extraction before the voice is saved. Pass `false` to keep the original clip. The response includes `background_noise_removed` to indicate whether denoise was actually applied.
|
|
317
323
|
*
|
|
318
324
|
* Accepts `multipart/form-data` - send the audio as the `file` upload and everything else as form fields.
|
|
319
325
|
*
|
|
@@ -349,7 +355,7 @@ class VoiceCloningClient {
|
|
|
349
355
|
}
|
|
350
356
|
__createVoice(request, requestOptions) {
|
|
351
357
|
return __awaiter(this, void 0, void 0, function* () {
|
|
352
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
358
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
353
359
|
const _body = yield core.newFormData();
|
|
354
360
|
yield _body.appendFile("file", request.file);
|
|
355
361
|
_body.append("name", request.name);
|
|
@@ -360,21 +366,24 @@ class VoiceCloningClient {
|
|
|
360
366
|
if (request.gender != null) {
|
|
361
367
|
_body.append("gender", request.gender);
|
|
362
368
|
}
|
|
369
|
+
if (request.remove_background_noise != null) {
|
|
370
|
+
_body.append("remove_background_noise", (_a = request.remove_background_noise) === null || _a === void 0 ? void 0 : _a.toString());
|
|
371
|
+
}
|
|
363
372
|
const _maybeEncodedRequest = yield _body.getRequest();
|
|
364
373
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
365
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (
|
|
374
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_b = this._options) === null || _b === void 0 ? void 0 : _b.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, _maybeEncodedRequest.headers)), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
366
375
|
const _response = yield core.fetcher({
|
|
367
|
-
url: core.url.join((
|
|
376
|
+
url: core.url.join((_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : ((_d = (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.SarvamAIEnvironment.Production).base, "voices/create"),
|
|
368
377
|
method: "POST",
|
|
369
378
|
headers: _headers,
|
|
370
379
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
371
380
|
requestType: "file",
|
|
372
381
|
duplex: _maybeEncodedRequest.duplex,
|
|
373
382
|
body: _maybeEncodedRequest.body,
|
|
374
|
-
timeoutMs: ((
|
|
375
|
-
maxRetries: (
|
|
383
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
384
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
376
385
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
377
|
-
fetchFn: (
|
|
386
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
378
387
|
logging: this._options.logging,
|
|
379
388
|
});
|
|
380
389
|
if (_response.ok) {
|
|
@@ -409,6 +418,83 @@ class VoiceCloningClient {
|
|
|
409
418
|
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/voices/create");
|
|
410
419
|
});
|
|
411
420
|
}
|
|
421
|
+
/**
|
|
422
|
+
* **Beta.** Detects whether an audio clip carries the Sarvam STFT watermark embedded by Instant Voice Cloning generation.
|
|
423
|
+
*
|
|
424
|
+
* Upload a clip produced by `POST /voices/clone` (or stream / WebSocket) to check whether Sarvam generated it. Clips shorter than about 5 seconds usually return `inconclusive` — there is not enough signal to be confident.
|
|
425
|
+
*
|
|
426
|
+
* Accepts `multipart/form-data` with a single `file` upload.
|
|
427
|
+
*
|
|
428
|
+
* **Base URL:** `https://api.sarvam.ai`.
|
|
429
|
+
* **Auth:** send your key in the `api-subscription-key` header.
|
|
430
|
+
*
|
|
431
|
+
* **Limits:** max file size 10 MB; analysis is capped at 120 seconds of audio. Rate limited to 5 requests per minute.
|
|
432
|
+
*
|
|
433
|
+
* **Billing:** free — this endpoint consumes no credits.
|
|
434
|
+
*
|
|
435
|
+
* @param {SarvamAI.DetectWatermarkRequest} request
|
|
436
|
+
* @param {VoiceCloningClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
437
|
+
*
|
|
438
|
+
* @throws {@link SarvamAI.BadRequestError}
|
|
439
|
+
* @throws {@link SarvamAI.UnauthorizedError}
|
|
440
|
+
* @throws {@link SarvamAI.TooManyRequestsError}
|
|
441
|
+
* @throws {@link SarvamAI.InternalServerError}
|
|
442
|
+
*
|
|
443
|
+
* @example
|
|
444
|
+
* import { createReadStream } from "fs";
|
|
445
|
+
* await client.voiceCloning.detectWatermark({
|
|
446
|
+
* file: fs.createReadStream("/path/to/your/file")
|
|
447
|
+
* })
|
|
448
|
+
*/
|
|
449
|
+
detectWatermark(request, requestOptions) {
|
|
450
|
+
return core.HttpResponsePromise.fromPromise(this.__detectWatermark(request, requestOptions));
|
|
451
|
+
}
|
|
452
|
+
__detectWatermark(request, requestOptions) {
|
|
453
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
454
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
455
|
+
const _body = yield core.newFormData();
|
|
456
|
+
yield _body.appendFile("file", request.file);
|
|
457
|
+
const _maybeEncodedRequest = yield _body.getRequest();
|
|
458
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
459
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, _maybeEncodedRequest.headers)), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
460
|
+
const _response = yield core.fetcher({
|
|
461
|
+
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SarvamAIEnvironment.Production).base, "voices/watermark/detect"),
|
|
462
|
+
method: "POST",
|
|
463
|
+
headers: _headers,
|
|
464
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
465
|
+
requestType: "file",
|
|
466
|
+
duplex: _maybeEncodedRequest.duplex,
|
|
467
|
+
body: _maybeEncodedRequest.body,
|
|
468
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
469
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
470
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
471
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
472
|
+
logging: this._options.logging,
|
|
473
|
+
});
|
|
474
|
+
if (_response.ok) {
|
|
475
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
476
|
+
}
|
|
477
|
+
if (_response.error.reason === "status-code") {
|
|
478
|
+
switch (_response.error.statusCode) {
|
|
479
|
+
case 400:
|
|
480
|
+
throw new SarvamAI.BadRequestError(_response.error.body, _response.rawResponse);
|
|
481
|
+
case 401:
|
|
482
|
+
throw new SarvamAI.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
483
|
+
case 429:
|
|
484
|
+
throw new SarvamAI.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
485
|
+
case 500:
|
|
486
|
+
throw new SarvamAI.InternalServerError(_response.error.body, _response.rawResponse);
|
|
487
|
+
default:
|
|
488
|
+
throw new errors.SarvamAIError({
|
|
489
|
+
statusCode: _response.error.statusCode,
|
|
490
|
+
body: _response.error.body,
|
|
491
|
+
rawResponse: _response.rawResponse,
|
|
492
|
+
});
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/voices/watermark/detect");
|
|
496
|
+
});
|
|
497
|
+
}
|
|
412
498
|
/**
|
|
413
499
|
* **Beta.** Lists the cloned voices in your workspace, newest first. Use the returned `id` with POST /voices/clone (`voice_id`) or GET /voices/{voice_id}.
|
|
414
500
|
*
|
|
@@ -22,6 +22,8 @@ export interface CreateVoiceRequest {
|
|
|
22
22
|
style?: CreateVoiceRequest.Style;
|
|
23
23
|
/** Optional gender tag for the cloned voice. */
|
|
24
24
|
gender?: CreateVoiceRequest.Gender;
|
|
25
|
+
/** Remove background noise from the reference audio before saving. Uses ML-powered vocal extraction to isolate the speaker's voice. Defaults to `true`. Pass `false` to keep the original clip. */
|
|
26
|
+
remove_background_noise?: boolean;
|
|
25
27
|
}
|
|
26
28
|
export declare namespace CreateVoiceRequest {
|
|
27
29
|
const Style: {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type * as core from "../../../../../core/index.js";
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* {
|
|
5
|
+
* file: fs.createReadStream("/path/to/your/file")
|
|
6
|
+
* }
|
|
7
|
+
*/
|
|
8
|
+
export interface DetectWatermarkRequest {
|
|
9
|
+
/** Audio clip to analyse. Supported formats include WAV, MP3, FLAC, OGG, M4A, and WebM. Max file size 10 MB. Analysis uses at most the first 120 seconds. */
|
|
10
|
+
file: core.file.Uploadable;
|
|
11
|
+
}
|
|
@@ -60,6 +60,8 @@ export interface VoiceCloningRequest {
|
|
|
60
60
|
enable_cached_responses?: boolean;
|
|
61
61
|
/** Enable VAD-based silence trimming of the generated audio. Default is `true`. Applies to single-chunk (short) generations; long text that is split into sentence chunks is returned untrimmed. */
|
|
62
62
|
enable_vad?: boolean;
|
|
63
|
+
/** Remove background noise from the reference audio before synthesis. Uses ML-powered vocal extraction to isolate the speaker's voice. Only applies when `ref_audio` is provided; ignored when using `voice_id` (a saved voice keeps whatever processing it received when it was created). Adds processing latency -- roughly 1 second for a typical reference clip. */
|
|
64
|
+
remove_background_noise?: boolean;
|
|
63
65
|
/** Enable pre-TTS text normalization: numbers, currencies and dates are converted to their spoken form before synthesis (e.g. `9840950950` becomes the spoken digit sequence). Defaults to the server-side setting. Supported for all 12 languages accepted by `language_code`; any other code passes through unchanged. */
|
|
64
66
|
enable_text_normalization?: boolean;
|
|
65
67
|
/** Minimum output audio duration in seconds. If the generated audio is shorter, it is padded with silence. */
|
|
@@ -56,4 +56,6 @@ export interface VoiceCloningStreamRequest {
|
|
|
56
56
|
speech_sample_rate?: SarvamAI.SpeechSampleRate;
|
|
57
57
|
/** Enable pre-TTS text normalization: numbers, currencies and dates are converted to their spoken form before synthesis (e.g. `9840950950` becomes the spoken digit sequence). Defaults to the server-side setting. */
|
|
58
58
|
enable_text_normalization?: boolean;
|
|
59
|
+
/** Remove background noise from the reference audio before synthesis. Uses ML-powered vocal extraction to isolate the speaker's voice. Only applies when `ref_audio` is provided; ignored when using `voice_id` (a saved voice keeps whatever processing it received when it was created). Adds processing latency before the first audio chunk -- roughly 1 second for a typical reference clip. */
|
|
60
|
+
remove_background_noise?: boolean;
|
|
59
61
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { CreateVoiceRequest } from "./CreateVoiceRequest.js";
|
|
2
|
+
export type { DetectWatermarkRequest } from "./DetectWatermarkRequest.js";
|
|
2
3
|
export type { ListVoicesRequest } from "./ListVoicesRequest.js";
|
|
3
4
|
export type { VoiceCloningRequest } from "./VoiceCloningRequest.js";
|
|
4
5
|
export type { VoiceCloningStreamRequest } from "./VoiceCloningStreamRequest.js";
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
* A category to label documents with. Names are yours to choose and must be unique, ignoring case and surrounding spaces.
|
|
3
|
-
*/
|
|
1
|
+
import type * as SarvamAI from "../index.js";
|
|
4
2
|
export interface DocAiClassifyCategory {
|
|
5
|
-
/** Category name returned as the result `type`.
|
|
3
|
+
/** Category name, returned as the result `type`. */
|
|
6
4
|
type: string;
|
|
7
5
|
/** What belongs in this category. Clear descriptions improve accuracy. */
|
|
8
|
-
description
|
|
6
|
+
description?: string | undefined;
|
|
7
|
+
/** Plain words naming the value that identifies one document of this type, e.g. `"invoice number"`. Returned as `identifier`. */
|
|
8
|
+
identifier_key?: string | undefined;
|
|
9
|
+
/** Up to 8 example documents that belong in this category. */
|
|
10
|
+
positive_examples?: SarvamAI.DocAiExample[] | undefined;
|
|
11
|
+
/** Up to 8 example documents that do not belong in this category. */
|
|
12
|
+
negative_examples?: SarvamAI.DocAiExample[] | undefined;
|
|
9
13
|
}
|