hume 0.13.6 → 0.13.8
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/.mock/definition/empathic-voice/__package__.yml +669 -657
- package/.mock/definition/empathic-voice/chat.yml +27 -27
- package/.mock/definition/empathic-voice/chatWebhooks.yml +2 -2
- package/.mock/definition/tts/__package__.yml +93 -88
- package/api/resources/empathicVoice/types/AssistantEnd.d.ts +2 -2
- package/api/resources/empathicVoice/types/AssistantInput.d.ts +2 -2
- package/api/resources/empathicVoice/types/AssistantMessage.d.ts +8 -8
- package/api/resources/empathicVoice/types/AssistantProsody.d.ts +6 -6
- package/api/resources/empathicVoice/types/AudioConfiguration.d.ts +2 -2
- package/api/resources/empathicVoice/types/AudioInput.d.ts +6 -6
- package/api/resources/empathicVoice/types/AudioOutput.d.ts +4 -4
- package/api/resources/empathicVoice/types/BuiltinToolConfig.d.ts +1 -1
- package/api/resources/empathicVoice/types/ChatMessage.d.ts +2 -2
- package/api/resources/empathicVoice/types/ChatMetadata.d.ts +8 -8
- package/api/resources/empathicVoice/types/Context.d.ts +6 -6
- package/api/resources/empathicVoice/types/LanguageModelType.d.ts +7 -1
- package/api/resources/empathicVoice/types/LanguageModelType.js +6 -0
- package/api/resources/empathicVoice/types/PauseAssistantMessage.d.ts +2 -2
- package/api/resources/empathicVoice/types/ResumeAssistantMessage.d.ts +2 -2
- package/api/resources/empathicVoice/types/ReturnConfig.d.ts +2 -2
- package/api/resources/empathicVoice/types/SessionSettings.d.ts +27 -27
- package/api/resources/empathicVoice/types/Tool.d.ts +6 -6
- package/api/resources/empathicVoice/types/ToolCallMessage.d.ts +6 -6
- package/api/resources/empathicVoice/types/ToolErrorMessage.d.ts +16 -16
- package/api/resources/empathicVoice/types/ToolResponseMessage.d.ts +8 -8
- package/api/resources/empathicVoice/types/UserInput.d.ts +2 -2
- package/api/resources/empathicVoice/types/UserInterruption.d.ts +4 -4
- package/api/resources/empathicVoice/types/UserMessage.d.ts +12 -12
- package/api/resources/empathicVoice/types/WebSocketError.d.ts +10 -10
- package/api/resources/empathicVoice/types/WebhookEventChatEnded.d.ts +8 -8
- package/api/resources/empathicVoice/types/WebhookEventChatStarted.d.ts +6 -6
- package/api/resources/empathicVoice/types/index.d.ts +16 -16
- package/api/resources/empathicVoice/types/index.js +16 -16
- package/api/resources/index.d.ts +1 -1
- package/api/resources/index.js +2 -2
- package/api/resources/tts/client/Client.d.ts +6 -6
- package/api/resources/tts/client/Client.js +35 -35
- package/api/resources/tts/types/OctaveVersion.d.ts +4 -0
- package/api/resources/tts/types/OctaveVersion.js +5 -0
- package/api/resources/tts/types/PostedTts.d.ts +9 -8
- package/api/resources/tts/types/PostedUtterance.d.ts +6 -6
- package/api/resources/tts/types/ReturnGeneration.d.ts +5 -5
- package/api/resources/tts/types/ReturnTts.d.ts +1 -1
- package/api/resources/tts/types/Snippet.d.ts +6 -6
- package/api/resources/tts/types/SnippetAudioChunk.d.ts +12 -11
- package/api/resources/tts/types/index.d.ts +1 -0
- package/api/resources/tts/types/index.js +1 -0
- package/dist/api/resources/empathicVoice/types/AssistantEnd.d.ts +2 -2
- package/dist/api/resources/empathicVoice/types/AssistantInput.d.ts +2 -2
- package/dist/api/resources/empathicVoice/types/AssistantMessage.d.ts +8 -8
- package/dist/api/resources/empathicVoice/types/AssistantProsody.d.ts +6 -6
- package/dist/api/resources/empathicVoice/types/AudioConfiguration.d.ts +2 -2
- package/dist/api/resources/empathicVoice/types/AudioInput.d.ts +6 -6
- package/dist/api/resources/empathicVoice/types/AudioOutput.d.ts +4 -4
- package/dist/api/resources/empathicVoice/types/BuiltinToolConfig.d.ts +1 -1
- package/dist/api/resources/empathicVoice/types/ChatMessage.d.ts +2 -2
- package/dist/api/resources/empathicVoice/types/ChatMetadata.d.ts +8 -8
- package/dist/api/resources/empathicVoice/types/Context.d.ts +6 -6
- package/dist/api/resources/empathicVoice/types/LanguageModelType.d.ts +7 -1
- package/dist/api/resources/empathicVoice/types/LanguageModelType.js +6 -0
- package/dist/api/resources/empathicVoice/types/PauseAssistantMessage.d.ts +2 -2
- package/dist/api/resources/empathicVoice/types/ResumeAssistantMessage.d.ts +2 -2
- package/dist/api/resources/empathicVoice/types/ReturnConfig.d.ts +2 -2
- package/dist/api/resources/empathicVoice/types/SessionSettings.d.ts +27 -27
- package/dist/api/resources/empathicVoice/types/Tool.d.ts +6 -6
- package/dist/api/resources/empathicVoice/types/ToolCallMessage.d.ts +6 -6
- package/dist/api/resources/empathicVoice/types/ToolErrorMessage.d.ts +16 -16
- package/dist/api/resources/empathicVoice/types/ToolResponseMessage.d.ts +8 -8
- package/dist/api/resources/empathicVoice/types/UserInput.d.ts +2 -2
- package/dist/api/resources/empathicVoice/types/UserInterruption.d.ts +4 -4
- package/dist/api/resources/empathicVoice/types/UserMessage.d.ts +12 -12
- package/dist/api/resources/empathicVoice/types/WebSocketError.d.ts +10 -10
- package/dist/api/resources/empathicVoice/types/WebhookEventChatEnded.d.ts +8 -8
- package/dist/api/resources/empathicVoice/types/WebhookEventChatStarted.d.ts +6 -6
- package/dist/api/resources/empathicVoice/types/index.d.ts +16 -16
- package/dist/api/resources/empathicVoice/types/index.js +16 -16
- package/dist/api/resources/index.d.ts +1 -1
- package/dist/api/resources/index.js +2 -2
- package/dist/api/resources/tts/client/Client.d.ts +6 -6
- package/dist/api/resources/tts/client/Client.js +35 -35
- package/dist/api/resources/tts/types/OctaveVersion.d.ts +4 -0
- package/dist/api/resources/tts/types/OctaveVersion.js +5 -0
- package/dist/api/resources/tts/types/PostedTts.d.ts +9 -8
- package/dist/api/resources/tts/types/PostedUtterance.d.ts +6 -6
- package/dist/api/resources/tts/types/ReturnGeneration.d.ts +5 -5
- package/dist/api/resources/tts/types/ReturnTts.d.ts +1 -1
- package/dist/api/resources/tts/types/Snippet.d.ts +6 -6
- package/dist/api/resources/tts/types/SnippetAudioChunk.d.ts +12 -11
- package/dist/api/resources/tts/types/index.d.ts +1 -0
- package/dist/api/resources/tts/types/index.js +1 -0
- package/dist/serialization/resources/empathicVoice/types/AssistantEnd.d.ts +1 -1
- package/dist/serialization/resources/empathicVoice/types/AssistantEnd.js +1 -1
- package/dist/serialization/resources/empathicVoice/types/AssistantInput.d.ts +1 -1
- package/dist/serialization/resources/empathicVoice/types/AssistantInput.js +1 -1
- package/dist/serialization/resources/empathicVoice/types/AssistantMessage.d.ts +2 -2
- package/dist/serialization/resources/empathicVoice/types/AssistantMessage.js +2 -2
- package/dist/serialization/resources/empathicVoice/types/AssistantProsody.d.ts +2 -2
- package/dist/serialization/resources/empathicVoice/types/AssistantProsody.js +2 -2
- package/dist/serialization/resources/empathicVoice/types/AudioConfiguration.d.ts +1 -1
- package/dist/serialization/resources/empathicVoice/types/AudioConfiguration.js +1 -1
- package/dist/serialization/resources/empathicVoice/types/AudioInput.d.ts +1 -1
- package/dist/serialization/resources/empathicVoice/types/AudioInput.js +1 -1
- package/dist/serialization/resources/empathicVoice/types/AudioOutput.d.ts +2 -2
- package/dist/serialization/resources/empathicVoice/types/AudioOutput.js +2 -2
- package/dist/serialization/resources/empathicVoice/types/BuiltinToolConfig.d.ts +1 -1
- package/dist/serialization/resources/empathicVoice/types/BuiltinToolConfig.js +1 -1
- package/dist/serialization/resources/empathicVoice/types/ChatMessage.d.ts +1 -1
- package/dist/serialization/resources/empathicVoice/types/ChatMessage.js +1 -1
- package/dist/serialization/resources/empathicVoice/types/ChatMetadata.d.ts +2 -2
- package/dist/serialization/resources/empathicVoice/types/ChatMetadata.js +2 -2
- package/dist/serialization/resources/empathicVoice/types/Context.d.ts +1 -1
- package/dist/serialization/resources/empathicVoice/types/Context.js +1 -1
- package/dist/serialization/resources/empathicVoice/types/LanguageModelType.d.ts +1 -1
- package/dist/serialization/resources/empathicVoice/types/LanguageModelType.js +6 -0
- package/dist/serialization/resources/empathicVoice/types/PauseAssistantMessage.d.ts +1 -1
- package/dist/serialization/resources/empathicVoice/types/PauseAssistantMessage.js +1 -1
- package/dist/serialization/resources/empathicVoice/types/ResumeAssistantMessage.d.ts +1 -1
- package/dist/serialization/resources/empathicVoice/types/ResumeAssistantMessage.js +1 -1
- package/dist/serialization/resources/empathicVoice/types/ReturnConfig.d.ts +1 -1
- package/dist/serialization/resources/empathicVoice/types/ReturnConfig.js +1 -1
- package/dist/serialization/resources/empathicVoice/types/SessionSettings.d.ts +8 -8
- package/dist/serialization/resources/empathicVoice/types/SessionSettings.js +8 -8
- package/dist/serialization/resources/empathicVoice/types/Tool.d.ts +3 -3
- package/dist/serialization/resources/empathicVoice/types/Tool.js +3 -3
- package/dist/serialization/resources/empathicVoice/types/ToolCallMessage.d.ts +3 -3
- package/dist/serialization/resources/empathicVoice/types/ToolCallMessage.js +3 -3
- package/dist/serialization/resources/empathicVoice/types/ToolErrorMessage.d.ts +6 -6
- package/dist/serialization/resources/empathicVoice/types/ToolErrorMessage.js +6 -6
- package/dist/serialization/resources/empathicVoice/types/ToolResponseMessage.d.ts +2 -2
- package/dist/serialization/resources/empathicVoice/types/ToolResponseMessage.js +2 -2
- package/dist/serialization/resources/empathicVoice/types/UserInput.d.ts +1 -1
- package/dist/serialization/resources/empathicVoice/types/UserInput.js +1 -1
- package/dist/serialization/resources/empathicVoice/types/UserInterruption.d.ts +1 -1
- package/dist/serialization/resources/empathicVoice/types/UserInterruption.js +1 -1
- package/dist/serialization/resources/empathicVoice/types/UserMessage.d.ts +3 -3
- package/dist/serialization/resources/empathicVoice/types/UserMessage.js +3 -3
- package/dist/serialization/resources/empathicVoice/types/WebSocketError.d.ts +3 -3
- package/dist/serialization/resources/empathicVoice/types/WebSocketError.js +3 -3
- package/dist/serialization/resources/empathicVoice/types/WebhookEventChatEnded.d.ts +4 -4
- package/dist/serialization/resources/empathicVoice/types/WebhookEventChatEnded.js +4 -4
- package/dist/serialization/resources/empathicVoice/types/WebhookEventChatStarted.d.ts +3 -3
- package/dist/serialization/resources/empathicVoice/types/WebhookEventChatStarted.js +3 -3
- package/dist/serialization/resources/empathicVoice/types/index.d.ts +16 -16
- package/dist/serialization/resources/empathicVoice/types/index.js +16 -16
- package/dist/serialization/resources/index.d.ts +1 -1
- package/dist/serialization/resources/index.js +2 -2
- package/dist/serialization/resources/tts/types/OctaveVersion.d.ts +10 -0
- package/dist/serialization/resources/tts/types/OctaveVersion.js +41 -0
- package/dist/serialization/resources/tts/types/PostedTts.d.ts +5 -3
- package/dist/serialization/resources/tts/types/PostedTts.js +5 -3
- package/dist/serialization/resources/tts/types/PostedUtterance.d.ts +2 -2
- package/dist/serialization/resources/tts/types/PostedUtterance.js +2 -2
- package/dist/serialization/resources/tts/types/ReturnGeneration.d.ts +3 -3
- package/dist/serialization/resources/tts/types/ReturnGeneration.js +3 -3
- package/dist/serialization/resources/tts/types/ReturnTts.d.ts +1 -1
- package/dist/serialization/resources/tts/types/ReturnTts.js +1 -1
- package/dist/serialization/resources/tts/types/Snippet.d.ts +3 -3
- package/dist/serialization/resources/tts/types/Snippet.js +3 -3
- package/dist/serialization/resources/tts/types/SnippetAudioChunk.d.ts +7 -6
- package/dist/serialization/resources/tts/types/SnippetAudioChunk.js +7 -6
- package/dist/serialization/resources/tts/types/index.d.ts +1 -0
- package/dist/serialization/resources/tts/types/index.js +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/wrapper/index.d.ts +1 -1
- package/dist/wrapper/index.js +53 -3
- package/package.json +1 -1
- package/reference.md +706 -706
- package/serialization/resources/empathicVoice/types/AssistantEnd.d.ts +1 -1
- package/serialization/resources/empathicVoice/types/AssistantEnd.js +1 -1
- package/serialization/resources/empathicVoice/types/AssistantInput.d.ts +1 -1
- package/serialization/resources/empathicVoice/types/AssistantInput.js +1 -1
- package/serialization/resources/empathicVoice/types/AssistantMessage.d.ts +2 -2
- package/serialization/resources/empathicVoice/types/AssistantMessage.js +2 -2
- package/serialization/resources/empathicVoice/types/AssistantProsody.d.ts +2 -2
- package/serialization/resources/empathicVoice/types/AssistantProsody.js +2 -2
- package/serialization/resources/empathicVoice/types/AudioConfiguration.d.ts +1 -1
- package/serialization/resources/empathicVoice/types/AudioConfiguration.js +1 -1
- package/serialization/resources/empathicVoice/types/AudioInput.d.ts +1 -1
- package/serialization/resources/empathicVoice/types/AudioInput.js +1 -1
- package/serialization/resources/empathicVoice/types/AudioOutput.d.ts +2 -2
- package/serialization/resources/empathicVoice/types/AudioOutput.js +2 -2
- package/serialization/resources/empathicVoice/types/BuiltinToolConfig.d.ts +1 -1
- package/serialization/resources/empathicVoice/types/BuiltinToolConfig.js +1 -1
- package/serialization/resources/empathicVoice/types/ChatMessage.d.ts +1 -1
- package/serialization/resources/empathicVoice/types/ChatMessage.js +1 -1
- package/serialization/resources/empathicVoice/types/ChatMetadata.d.ts +2 -2
- package/serialization/resources/empathicVoice/types/ChatMetadata.js +2 -2
- package/serialization/resources/empathicVoice/types/Context.d.ts +1 -1
- package/serialization/resources/empathicVoice/types/Context.js +1 -1
- package/serialization/resources/empathicVoice/types/LanguageModelType.d.ts +1 -1
- package/serialization/resources/empathicVoice/types/LanguageModelType.js +6 -0
- package/serialization/resources/empathicVoice/types/PauseAssistantMessage.d.ts +1 -1
- package/serialization/resources/empathicVoice/types/PauseAssistantMessage.js +1 -1
- package/serialization/resources/empathicVoice/types/ResumeAssistantMessage.d.ts +1 -1
- package/serialization/resources/empathicVoice/types/ResumeAssistantMessage.js +1 -1
- package/serialization/resources/empathicVoice/types/ReturnConfig.d.ts +1 -1
- package/serialization/resources/empathicVoice/types/ReturnConfig.js +1 -1
- package/serialization/resources/empathicVoice/types/SessionSettings.d.ts +8 -8
- package/serialization/resources/empathicVoice/types/SessionSettings.js +8 -8
- package/serialization/resources/empathicVoice/types/Tool.d.ts +3 -3
- package/serialization/resources/empathicVoice/types/Tool.js +3 -3
- package/serialization/resources/empathicVoice/types/ToolCallMessage.d.ts +3 -3
- package/serialization/resources/empathicVoice/types/ToolCallMessage.js +3 -3
- package/serialization/resources/empathicVoice/types/ToolErrorMessage.d.ts +6 -6
- package/serialization/resources/empathicVoice/types/ToolErrorMessage.js +6 -6
- package/serialization/resources/empathicVoice/types/ToolResponseMessage.d.ts +2 -2
- package/serialization/resources/empathicVoice/types/ToolResponseMessage.js +2 -2
- package/serialization/resources/empathicVoice/types/UserInput.d.ts +1 -1
- package/serialization/resources/empathicVoice/types/UserInput.js +1 -1
- package/serialization/resources/empathicVoice/types/UserInterruption.d.ts +1 -1
- package/serialization/resources/empathicVoice/types/UserInterruption.js +1 -1
- package/serialization/resources/empathicVoice/types/UserMessage.d.ts +3 -3
- package/serialization/resources/empathicVoice/types/UserMessage.js +3 -3
- package/serialization/resources/empathicVoice/types/WebSocketError.d.ts +3 -3
- package/serialization/resources/empathicVoice/types/WebSocketError.js +3 -3
- package/serialization/resources/empathicVoice/types/WebhookEventChatEnded.d.ts +4 -4
- package/serialization/resources/empathicVoice/types/WebhookEventChatEnded.js +4 -4
- package/serialization/resources/empathicVoice/types/WebhookEventChatStarted.d.ts +3 -3
- package/serialization/resources/empathicVoice/types/WebhookEventChatStarted.js +3 -3
- package/serialization/resources/empathicVoice/types/index.d.ts +16 -16
- package/serialization/resources/empathicVoice/types/index.js +16 -16
- package/serialization/resources/index.d.ts +1 -1
- package/serialization/resources/index.js +2 -2
- package/serialization/resources/tts/types/OctaveVersion.d.ts +10 -0
- package/serialization/resources/tts/types/OctaveVersion.js +41 -0
- package/serialization/resources/tts/types/PostedTts.d.ts +5 -3
- package/serialization/resources/tts/types/PostedTts.js +5 -3
- package/serialization/resources/tts/types/PostedUtterance.d.ts +2 -2
- package/serialization/resources/tts/types/PostedUtterance.js +2 -2
- package/serialization/resources/tts/types/ReturnGeneration.d.ts +3 -3
- package/serialization/resources/tts/types/ReturnGeneration.js +3 -3
- package/serialization/resources/tts/types/ReturnTts.d.ts +1 -1
- package/serialization/resources/tts/types/ReturnTts.js +1 -1
- package/serialization/resources/tts/types/Snippet.d.ts +3 -3
- package/serialization/resources/tts/types/Snippet.js +3 -3
- package/serialization/resources/tts/types/SnippetAudioChunk.d.ts +7 -6
- package/serialization/resources/tts/types/SnippetAudioChunk.js +7 -6
- package/serialization/resources/tts/types/index.d.ts +1 -0
- package/serialization/resources/tts/types/index.js +1 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/wrapper/index.d.ts +1 -1
- package/wrapper/index.js +53 -3
package/api/resources/index.d.ts
CHANGED
package/api/resources/index.js
CHANGED
|
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.expressionMeasurement = exports.
|
|
37
|
-
exports.empathicVoice = __importStar(require("./empathicVoice"));
|
|
36
|
+
exports.expressionMeasurement = exports.empathicVoice = exports.tts = void 0;
|
|
38
37
|
exports.tts = __importStar(require("./tts"));
|
|
38
|
+
exports.empathicVoice = __importStar(require("./empathicVoice"));
|
|
39
39
|
exports.expressionMeasurement = __importStar(require("./expressionMeasurement"));
|
|
@@ -70,6 +70,12 @@ export declare class Tts {
|
|
|
70
70
|
*/
|
|
71
71
|
synthesizeFile(request: Hume.tts.PostedTts, requestOptions?: Tts.RequestOptions): core.HttpResponsePromise<stream.Readable>;
|
|
72
72
|
private __synthesizeFile;
|
|
73
|
+
/**
|
|
74
|
+
* Streams synthesized speech using the specified voice. If no voice is provided, a novel voice will be generated dynamically. Optionally, additional context can be included to influence the speech's style and prosody.
|
|
75
|
+
* @throws {@link Hume.tts.UnprocessableEntityError}
|
|
76
|
+
*/
|
|
77
|
+
synthesizeFileStreaming(request: Hume.tts.PostedTts, requestOptions?: Tts.RequestOptions): core.HttpResponsePromise<stream.Readable>;
|
|
78
|
+
private __synthesizeFileStreaming;
|
|
73
79
|
/**
|
|
74
80
|
* Streams synthesized speech using the specified voice. If no voice is provided, a novel voice will be generated dynamically. Optionally, additional context can be included to influence the speech's style and prosody.
|
|
75
81
|
*
|
|
@@ -77,12 +83,6 @@ export declare class Tts {
|
|
|
77
83
|
*/
|
|
78
84
|
synthesizeJsonStreaming(request: Hume.tts.PostedTts, requestOptions?: Tts.RequestOptions): core.HttpResponsePromise<core.Stream<Hume.tts.SnippetAudioChunk>>;
|
|
79
85
|
private __synthesizeJsonStreaming;
|
|
80
|
-
/**
|
|
81
|
-
* Streams synthesized speech using the specified voice. If no voice is provided, a novel voice will be generated dynamically. Optionally, additional context can be included to influence the speech's style and prosody.
|
|
82
|
-
* @throws {@link Hume.tts.UnprocessableEntityError}
|
|
83
|
-
*/
|
|
84
|
-
synthesizeFileStreaming(request: Hume.tts.PostedTts, requestOptions?: Tts.RequestOptions): core.HttpResponsePromise<stream.Readable>;
|
|
85
|
-
private __synthesizeFileStreaming;
|
|
86
86
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
87
87
|
"X-Hume-Api-Key": string | undefined;
|
|
88
88
|
}>;
|
|
@@ -218,47 +218,28 @@ class Tts {
|
|
|
218
218
|
}
|
|
219
219
|
/**
|
|
220
220
|
* Streams synthesized speech using the specified voice. If no voice is provided, a novel voice will be generated dynamically. Optionally, additional context can be included to influence the speech's style and prosody.
|
|
221
|
-
*
|
|
222
|
-
* The response is a stream of JSON objects including audio encoded in base64.
|
|
221
|
+
* @throws {@link Hume.tts.UnprocessableEntityError}
|
|
223
222
|
*/
|
|
224
|
-
|
|
225
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
223
|
+
synthesizeFileStreaming(request, requestOptions) {
|
|
224
|
+
return core.HttpResponsePromise.fromPromise(this.__synthesizeFileStreaming(request, requestOptions));
|
|
226
225
|
}
|
|
227
|
-
|
|
226
|
+
__synthesizeFileStreaming(request, requestOptions) {
|
|
228
227
|
return __awaiter(this, void 0, void 0, function* () {
|
|
229
228
|
var _a, _b, _c, _d;
|
|
230
229
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
231
|
-
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Production, "v0/tts/stream/
|
|
230
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Production, "v0/tts/stream/file"),
|
|
232
231
|
method: "POST",
|
|
233
232
|
headers: (0, headers_js_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
234
233
|
contentType: "application/json",
|
|
235
234
|
requestType: "json",
|
|
236
235
|
body: serializers.tts.PostedTts.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
237
|
-
responseType: "
|
|
236
|
+
responseType: "streaming",
|
|
238
237
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
239
238
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
240
239
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
241
240
|
});
|
|
242
241
|
if (_response.ok) {
|
|
243
|
-
return {
|
|
244
|
-
data: new core.Stream({
|
|
245
|
-
stream: _response.body,
|
|
246
|
-
parse: (data) => __awaiter(this, void 0, void 0, function* () {
|
|
247
|
-
return serializers.tts.SnippetAudioChunk.parseOrThrow(data, {
|
|
248
|
-
unrecognizedObjectKeys: "passthrough",
|
|
249
|
-
allowUnrecognizedUnionMembers: true,
|
|
250
|
-
allowUnrecognizedEnumValues: true,
|
|
251
|
-
breadcrumbsPrefix: ["response"],
|
|
252
|
-
});
|
|
253
|
-
}),
|
|
254
|
-
signal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
255
|
-
eventShape: {
|
|
256
|
-
type: "json",
|
|
257
|
-
messageTerminator: "\n",
|
|
258
|
-
},
|
|
259
|
-
}),
|
|
260
|
-
rawResponse: _response.rawResponse,
|
|
261
|
-
};
|
|
242
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
262
243
|
}
|
|
263
244
|
if (_response.error.reason === "status-code") {
|
|
264
245
|
switch (_response.error.statusCode) {
|
|
@@ -285,7 +266,7 @@ class Tts {
|
|
|
285
266
|
rawResponse: _response.rawResponse,
|
|
286
267
|
});
|
|
287
268
|
case "timeout":
|
|
288
|
-
throw new errors.HumeTimeoutError("Timeout exceeded when calling POST /v0/tts/stream/
|
|
269
|
+
throw new errors.HumeTimeoutError("Timeout exceeded when calling POST /v0/tts/stream/file.");
|
|
289
270
|
case "unknown":
|
|
290
271
|
throw new errors.HumeError({
|
|
291
272
|
message: _response.error.errorMessage,
|
|
@@ -296,28 +277,47 @@ class Tts {
|
|
|
296
277
|
}
|
|
297
278
|
/**
|
|
298
279
|
* Streams synthesized speech using the specified voice. If no voice is provided, a novel voice will be generated dynamically. Optionally, additional context can be included to influence the speech's style and prosody.
|
|
299
|
-
*
|
|
280
|
+
*
|
|
281
|
+
* The response is a stream of JSON objects including audio encoded in base64.
|
|
300
282
|
*/
|
|
301
|
-
|
|
302
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
283
|
+
synthesizeJsonStreaming(request, requestOptions) {
|
|
284
|
+
return core.HttpResponsePromise.fromPromise(this.__synthesizeJsonStreaming(request, requestOptions));
|
|
303
285
|
}
|
|
304
|
-
|
|
286
|
+
__synthesizeJsonStreaming(request, requestOptions) {
|
|
305
287
|
return __awaiter(this, void 0, void 0, function* () {
|
|
306
288
|
var _a, _b, _c, _d;
|
|
307
289
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
308
|
-
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Production, "v0/tts/stream/
|
|
290
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Production, "v0/tts/stream/json"),
|
|
309
291
|
method: "POST",
|
|
310
292
|
headers: (0, headers_js_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
311
293
|
contentType: "application/json",
|
|
312
294
|
requestType: "json",
|
|
313
295
|
body: serializers.tts.PostedTts.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
314
|
-
responseType: "
|
|
296
|
+
responseType: "sse",
|
|
315
297
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
316
298
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
317
299
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
318
300
|
});
|
|
319
301
|
if (_response.ok) {
|
|
320
|
-
return {
|
|
302
|
+
return {
|
|
303
|
+
data: new core.Stream({
|
|
304
|
+
stream: _response.body,
|
|
305
|
+
parse: (data) => __awaiter(this, void 0, void 0, function* () {
|
|
306
|
+
return serializers.tts.SnippetAudioChunk.parseOrThrow(data, {
|
|
307
|
+
unrecognizedObjectKeys: "passthrough",
|
|
308
|
+
allowUnrecognizedUnionMembers: true,
|
|
309
|
+
allowUnrecognizedEnumValues: true,
|
|
310
|
+
breadcrumbsPrefix: ["response"],
|
|
311
|
+
});
|
|
312
|
+
}),
|
|
313
|
+
signal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
314
|
+
eventShape: {
|
|
315
|
+
type: "json",
|
|
316
|
+
messageTerminator: "\n",
|
|
317
|
+
},
|
|
318
|
+
}),
|
|
319
|
+
rawResponse: _response.rawResponse,
|
|
320
|
+
};
|
|
321
321
|
}
|
|
322
322
|
if (_response.error.reason === "status-code") {
|
|
323
323
|
switch (_response.error.statusCode) {
|
|
@@ -344,7 +344,7 @@ class Tts {
|
|
|
344
344
|
rawResponse: _response.rawResponse,
|
|
345
345
|
});
|
|
346
346
|
case "timeout":
|
|
347
|
-
throw new errors.HumeTimeoutError("Timeout exceeded when calling POST /v0/tts/stream/
|
|
347
|
+
throw new errors.HumeTimeoutError("Timeout exceeded when calling POST /v0/tts/stream/json.");
|
|
348
348
|
case "unknown":
|
|
349
349
|
throw new errors.HumeError({
|
|
350
350
|
message: _response.error.errorMessage,
|
|
@@ -5,16 +5,10 @@ import * as Hume from "../../../index";
|
|
|
5
5
|
export interface PostedTts {
|
|
6
6
|
/** Utterances to use as context for generating consistent speech style and prosody across multiple requests. These will not be converted to speech output. */
|
|
7
7
|
context?: Hume.tts.PostedContext;
|
|
8
|
-
/**
|
|
9
|
-
* A list of **Utterances** to be converted to speech output.
|
|
10
|
-
*
|
|
11
|
-
* An **Utterance** is a unit of input for [Octave](/docs/text-to-speech-tts/overview), and includes input `text`, an optional `description` to serve as the prompt for how the speech should be delivered, an optional `voice` specification, and additional controls to guide delivery for `speed` and `trailing_silence`.
|
|
12
|
-
*/
|
|
13
|
-
utterances: Hume.tts.PostedUtterance[];
|
|
14
|
-
/** Number of generations of the audio to produce. */
|
|
15
|
-
numGenerations?: number;
|
|
16
8
|
/** Specifies the output audio file format. */
|
|
17
9
|
format?: Hume.tts.Format;
|
|
10
|
+
/** Number of generations of the audio to produce. */
|
|
11
|
+
numGenerations?: number;
|
|
18
12
|
/**
|
|
19
13
|
* Controls how audio output is segmented in the response.
|
|
20
14
|
*
|
|
@@ -27,6 +21,13 @@ export interface PostedTts {
|
|
|
27
21
|
splitUtterances?: boolean;
|
|
28
22
|
/** If enabled, the audio for all the chunks of a generation, once concatenated together, will constitute a single audio file. Otherwise, if disabled, each chunk's audio will be its own audio file, each with its own headers (if applicable). */
|
|
29
23
|
stripHeaders?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* A list of **Utterances** to be converted to speech output.
|
|
26
|
+
*
|
|
27
|
+
* An **Utterance** is a unit of input for [Octave](/docs/text-to-speech-tts/overview), and includes input `text`, an optional `description` to serve as the prompt for how the speech should be delivered, an optional `voice` specification, and additional controls to guide delivery for `speed` and `trailing_silence`.
|
|
28
|
+
*/
|
|
29
|
+
utterances: Hume.tts.PostedUtterance[];
|
|
30
|
+
version?: Hume.tts.OctaveVersion;
|
|
30
31
|
/**
|
|
31
32
|
* Enables ultra-low latency streaming, significantly reducing the time until the first audio chunk is received. Recommended for real-time applications requiring immediate audio playback. For further details, see our documentation on [instant mode](/docs/text-to-speech-tts/overview#ultra-low-latency-streaming-instant-mode).
|
|
32
33
|
* - A [voice](/reference/text-to-speech-tts/synthesize-json-streaming#request.body.utterances.voice) must be specified when instant mode is enabled. Dynamic voice generation is not supported with this mode.
|
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as Hume from "../../../index";
|
|
5
5
|
export interface PostedUtterance {
|
|
6
|
-
/** The input text to be synthesized into speech. */
|
|
7
|
-
text: string;
|
|
8
6
|
/**
|
|
9
7
|
* Natural language instructions describing how the synthesized speech should sound, including but not limited to tone, intonation, pacing, and accent.
|
|
10
8
|
*
|
|
@@ -13,14 +11,16 @@ export interface PostedUtterance {
|
|
|
13
11
|
* - **Voice not specified**: the description will serve as a voice prompt for generating a voice. See our [prompting guide](/docs/text-to-speech-tts/prompting) for design tips.
|
|
14
12
|
*/
|
|
15
13
|
description?: string;
|
|
14
|
+
/** Speed multiplier for the synthesized speech. Extreme values below 0.75 and above 1.5 may sometimes cause instability to the generated output. */
|
|
15
|
+
speed?: number;
|
|
16
|
+
/** The input text to be synthesized into speech. */
|
|
17
|
+
text: string;
|
|
18
|
+
/** Duration of trailing silence (in seconds) to add to this utterance */
|
|
19
|
+
trailingSilence?: number;
|
|
16
20
|
/**
|
|
17
21
|
* The `name` or `id` associated with a **Voice** from the **Voice Library** to be used as the speaker for this and all subsequent `utterances`, until the `voice` field is updated again.
|
|
18
22
|
*
|
|
19
23
|
* See our [voices guide](/docs/text-to-speech-tts/voices) for more details on generating and specifying **Voices**.
|
|
20
24
|
*/
|
|
21
25
|
voice?: Hume.tts.PostedUtteranceVoice;
|
|
22
|
-
/** Speed multiplier for the synthesized speech. Extreme values below 0.75 and above 1.5 may sometimes cause instability to the generated output. */
|
|
23
|
-
speed?: number;
|
|
24
|
-
/** Duration of trailing silence (in seconds) to add to this utterance */
|
|
25
|
-
trailingSilence?: number;
|
|
26
26
|
}
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as Hume from "../../../index";
|
|
5
5
|
export interface ReturnGeneration {
|
|
6
|
-
/**
|
|
7
|
-
|
|
6
|
+
/** The generated audio output in the requested format, encoded as a base64 string. */
|
|
7
|
+
audio: string;
|
|
8
8
|
/** Duration of the generated audio in seconds. */
|
|
9
9
|
duration: number;
|
|
10
|
+
encoding: Hume.tts.AudioEncoding;
|
|
10
11
|
/** Size of the generated audio in bytes. */
|
|
11
12
|
fileSize: number;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
audio: string;
|
|
13
|
+
/** A unique ID associated with this TTS generation that can be used as context for generating consistent speech style and prosody across multiple requests. */
|
|
14
|
+
generationId: string;
|
|
15
15
|
/** A list of snippet groups where each group corresponds to an utterance in the request. Each group contains segmented snippets that represent the original utterance divided into more natural-sounding units optimized for speech delivery. */
|
|
16
16
|
snippets: Hume.tts.Snippet[][];
|
|
17
17
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as Hume from "../../../index";
|
|
5
5
|
export interface ReturnTts {
|
|
6
|
+
generations: Hume.tts.ReturnGeneration[];
|
|
6
7
|
/** A unique ID associated with this request for tracking and troubleshooting. Use this ID when contacting [support](/support) for troubleshooting assistance. */
|
|
7
8
|
requestId?: string;
|
|
8
|
-
generations: Hume.tts.ReturnGeneration[];
|
|
9
9
|
}
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
export interface Snippet {
|
|
5
|
+
/** The segmented audio output in the requested format, encoded as a base64 string. */
|
|
6
|
+
audio: string;
|
|
7
|
+
/** The generation ID this snippet corresponds to. */
|
|
8
|
+
generationId: string;
|
|
5
9
|
/** A unique ID associated with this **Snippet**. */
|
|
6
10
|
id: string;
|
|
7
11
|
/** The text for this **Snippet**. */
|
|
8
12
|
text: string;
|
|
9
|
-
/** The generation ID this snippet corresponds to. */
|
|
10
|
-
generationId: string;
|
|
11
|
-
/** The index of the utterance in the request this snippet corresponds to. */
|
|
12
|
-
utteranceIndex?: number;
|
|
13
13
|
/** The transcribed text of the generated audio. It is only present if `instant_mode` is set to `false`. */
|
|
14
14
|
transcribedText?: string;
|
|
15
|
-
/** The
|
|
16
|
-
|
|
15
|
+
/** The index of the utterance in the request this snippet corresponds to. */
|
|
16
|
+
utteranceIndex?: number;
|
|
17
17
|
}
|
|
@@ -6,25 +6,26 @@ import * as Hume from "../../../index";
|
|
|
6
6
|
* Metadata for a chunk of generated audio.
|
|
7
7
|
*/
|
|
8
8
|
export interface SnippetAudioChunk {
|
|
9
|
-
/**
|
|
10
|
-
|
|
9
|
+
/** The generated audio output chunk in the requested format. */
|
|
10
|
+
audio: string;
|
|
11
|
+
/** The generated audio output format. */
|
|
12
|
+
audioFormat: Hume.tts.AudioFormatType;
|
|
13
|
+
/** The index of the audio chunk in the snippet. */
|
|
14
|
+
chunkIndex: number;
|
|
11
15
|
/** The generation ID of the parent snippet that this chunk corresponds to. */
|
|
12
16
|
generationId: string;
|
|
17
|
+
/** Whether or not this is the last chunk streamed back from the decoder for one input snippet. */
|
|
18
|
+
isLastChunk: boolean;
|
|
19
|
+
/** ID of the initiating request. */
|
|
20
|
+
requestId: string;
|
|
21
|
+
snippet?: Hume.tts.Snippet;
|
|
13
22
|
/** The ID of the parent snippet that this chunk corresponds to. */
|
|
14
23
|
snippetId: string;
|
|
15
24
|
/** The text of the parent snippet that this chunk corresponds to. */
|
|
16
25
|
text: string;
|
|
17
26
|
/** The transcribed text of the generated audio of the parent snippet that this chunk corresponds to. It is only present if `instant_mode` is set to `false`. */
|
|
18
27
|
transcribedText?: string;
|
|
19
|
-
|
|
20
|
-
chunkIndex: number;
|
|
21
|
-
/** The generated audio output chunk in the requested format. */
|
|
22
|
-
audio: string;
|
|
23
|
-
/** The generated audio output format. */
|
|
24
|
-
audioFormat: Hume.tts.AudioFormatType;
|
|
25
|
-
/** Whether or not this is the last chunk streamed back from the decoder for one input snippet. */
|
|
26
|
-
isLastChunk: boolean;
|
|
28
|
+
type?: "audio";
|
|
27
29
|
/** The index of the utterance in the request that the parent snippet of this chunk corresponds to. */
|
|
28
30
|
utteranceIndex?: number;
|
|
29
|
-
snippet?: Hume.tts.Snippet;
|
|
30
31
|
}
|
|
@@ -31,6 +31,7 @@ __exportStar(require("./PostedContext"), exports);
|
|
|
31
31
|
__exportStar(require("./Format"), exports);
|
|
32
32
|
__exportStar(require("./PostedTts"), exports);
|
|
33
33
|
__exportStar(require("./ReturnTts"), exports);
|
|
34
|
+
__exportStar(require("./OctaveVersion"), exports);
|
|
34
35
|
__exportStar(require("./ReturnVoice"), exports);
|
|
35
36
|
__exportStar(require("./FormatPcm"), exports);
|
|
36
37
|
__exportStar(require("./Snippet"), exports);
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
* When provided, the output is an assistant end message.
|
|
6
6
|
*/
|
|
7
7
|
export interface AssistantEnd {
|
|
8
|
+
/** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
|
|
9
|
+
customSessionId?: string;
|
|
8
10
|
/**
|
|
9
11
|
* The type of message sent through the socket; for an Assistant End message, this must be `assistant_end`.
|
|
10
12
|
*
|
|
11
13
|
* This message indicates the conclusion of the assistant's response, signaling that the assistant has finished speaking for the current conversational turn.
|
|
12
14
|
*/
|
|
13
15
|
type: "assistant_end";
|
|
14
|
-
/** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
|
|
15
|
-
customSessionId?: string;
|
|
16
16
|
}
|
|
@@ -5,8 +5,6 @@
|
|
|
5
5
|
* When provided, the input is spoken by EVI.
|
|
6
6
|
*/
|
|
7
7
|
export interface AssistantInput {
|
|
8
|
-
/** The type of message sent through the socket; must be `assistant_input` for our server to correctly identify and process it as an Assistant Input message. */
|
|
9
|
-
type: "assistant_input";
|
|
10
8
|
/** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
|
|
11
9
|
customSessionId?: string;
|
|
12
10
|
/**
|
|
@@ -15,4 +13,6 @@ export interface AssistantInput {
|
|
|
15
13
|
* EVI uses this text to generate spoken audio using our proprietary expressive text-to-speech model. Our model adds appropriate emotional inflections and tones to the text based on the user's expressions and the context of the conversation. The synthesized audio is streamed back to the user as an [Assistant Message](/reference/speech-to-speech-evi/chat#receive.AssistantMessage).
|
|
16
14
|
*/
|
|
17
15
|
text: string;
|
|
16
|
+
/** The type of message sent through the socket; must be `assistant_input` for our server to correctly identify and process it as an Assistant Input message. */
|
|
17
|
+
type: "assistant_input";
|
|
18
18
|
}
|
|
@@ -6,20 +6,20 @@ import * as Hume from "../../../index";
|
|
|
6
6
|
* When provided, the output is an assistant message.
|
|
7
7
|
*/
|
|
8
8
|
export interface AssistantMessage {
|
|
9
|
-
/**
|
|
10
|
-
* The type of message sent through the socket; for an Assistant Message, this must be `assistant_message`.
|
|
11
|
-
*
|
|
12
|
-
* This message contains both a transcript of the assistant's response and the expression measurement predictions of the assistant's audio output.
|
|
13
|
-
*/
|
|
14
|
-
type: "assistant_message";
|
|
15
9
|
/** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
|
|
16
10
|
customSessionId?: string;
|
|
11
|
+
/** Indicates if this message was inserted into the conversation as text from an [Assistant Input message](/reference/speech-to-speech-evi/chat#send.AssistantInput.text). */
|
|
12
|
+
fromText: boolean;
|
|
17
13
|
/** ID of the assistant message. Allows the Assistant Message to be tracked and referenced. */
|
|
18
14
|
id?: string;
|
|
19
15
|
/** Transcript of the message. */
|
|
20
16
|
message: Hume.empathicVoice.ChatMessage;
|
|
21
17
|
/** Inference model results. */
|
|
22
18
|
models: Hume.empathicVoice.Inference;
|
|
23
|
-
/**
|
|
24
|
-
|
|
19
|
+
/**
|
|
20
|
+
* The type of message sent through the socket; for an Assistant Message, this must be `assistant_message`.
|
|
21
|
+
*
|
|
22
|
+
* This message contains both a transcript of the assistant's response and the expression measurement predictions of the assistant's audio output.
|
|
23
|
+
*/
|
|
24
|
+
type: "assistant_message";
|
|
25
25
|
}
|
|
@@ -6,16 +6,16 @@ import * as Hume from "../../../index";
|
|
|
6
6
|
* When provided, the output is an Assistant Prosody message.
|
|
7
7
|
*/
|
|
8
8
|
export interface AssistantProsody {
|
|
9
|
+
/** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
|
|
10
|
+
customSessionId?: string;
|
|
11
|
+
/** Unique identifier for the segment. */
|
|
12
|
+
id?: string;
|
|
13
|
+
/** Inference model results. */
|
|
14
|
+
models: Hume.empathicVoice.Inference;
|
|
9
15
|
/**
|
|
10
16
|
* The type of message sent through the socket; for an Assistant Prosody message, this must be `assistant_PROSODY`.
|
|
11
17
|
*
|
|
12
18
|
* This message the expression measurement predictions of the assistant's audio output.
|
|
13
19
|
*/
|
|
14
20
|
type: "assistant_prosody";
|
|
15
|
-
/** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
|
|
16
|
-
customSessionId?: string;
|
|
17
|
-
/** Inference model results. */
|
|
18
|
-
models: Hume.empathicVoice.Inference;
|
|
19
|
-
/** Unique identifier for the segment. */
|
|
20
|
-
id?: string;
|
|
21
21
|
}
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as Hume from "../../../index";
|
|
5
5
|
export interface AudioConfiguration {
|
|
6
|
-
/** Encoding format of the audio input, such as `linear16`. */
|
|
7
|
-
encoding: Hume.empathicVoice.Encoding;
|
|
8
6
|
/** Number of audio channels. */
|
|
9
7
|
channels: number;
|
|
8
|
+
/** Encoding format of the audio input, such as `linear16`. */
|
|
9
|
+
encoding: Hume.empathicVoice.Encoding;
|
|
10
10
|
/** Audio sample rate. Number of samples per second in the audio input, measured in Hertz. */
|
|
11
11
|
sampleRate: number;
|
|
12
12
|
}
|
|
@@ -5,12 +5,6 @@
|
|
|
5
5
|
* When provided, the input is audio.
|
|
6
6
|
*/
|
|
7
7
|
export interface AudioInput {
|
|
8
|
-
/**
|
|
9
|
-
* The type of message sent through the socket; must be `audio_input` for our server to correctly identify and process it as an Audio Input message.
|
|
10
|
-
*
|
|
11
|
-
* This message is used for sending audio input data to EVI for processing and expression measurement. Audio data should be sent as a continuous stream, encoded in Base64.
|
|
12
|
-
*/
|
|
13
|
-
type: "audio_input";
|
|
14
8
|
/** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
|
|
15
9
|
customSessionId?: string;
|
|
16
10
|
/**
|
|
@@ -23,4 +17,10 @@ export interface AudioInput {
|
|
|
23
17
|
* Hume recommends streaming audio with a buffer window of 20 milliseconds (ms), or 100 milliseconds (ms) for web applications.
|
|
24
18
|
*/
|
|
25
19
|
data: string;
|
|
20
|
+
/**
|
|
21
|
+
* The type of message sent through the socket; must be `audio_input` for our server to correctly identify and process it as an Audio Input message.
|
|
22
|
+
*
|
|
23
|
+
* This message is used for sending audio input data to EVI for processing and expression measurement. Audio data should be sent as a continuous stream, encoded in Base64.
|
|
24
|
+
*/
|
|
25
|
+
type: "audio_input";
|
|
26
26
|
}
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
* The type of message sent through the socket; for an Audio Output message, this must be `audio_output`.
|
|
6
6
|
*/
|
|
7
7
|
export interface AudioOutput {
|
|
8
|
-
/** The type of message sent through the socket; for an Audio Output message, this must be `audio_output`. */
|
|
9
|
-
type: "audio_output";
|
|
10
8
|
/** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
|
|
11
9
|
customSessionId?: string;
|
|
10
|
+
/** Base64 encoded audio output. This encoded audio is transmitted to the client, where it can be decoded and played back as part of the user interaction. */
|
|
11
|
+
data: string;
|
|
12
12
|
/** ID of the audio output. Allows the Audio Output message to be tracked and referenced. */
|
|
13
13
|
id: string;
|
|
14
14
|
/** Index of the chunk of audio relative to the whole audio segment. */
|
|
15
15
|
index: number;
|
|
16
|
-
/**
|
|
17
|
-
|
|
16
|
+
/** The type of message sent through the socket; for an Audio Output message, this must be `audio_output`. */
|
|
17
|
+
type: "audio_output";
|
|
18
18
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as Hume from "../../../index";
|
|
5
5
|
export interface BuiltinToolConfig {
|
|
6
|
-
name: Hume.empathicVoice.BuiltInTool;
|
|
7
6
|
/** Optional text passed to the supplemental LLM if the tool call fails. The LLM then uses this text to generate a response back to the user, ensuring continuity in the conversation. */
|
|
8
7
|
fallbackContent?: string;
|
|
8
|
+
name: Hume.empathicVoice.BuiltInTool;
|
|
9
9
|
}
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as Hume from "../../../index";
|
|
5
5
|
export interface ChatMessage {
|
|
6
|
-
/** Role of who is providing the message. */
|
|
7
|
-
role: Hume.empathicVoice.Role;
|
|
8
6
|
/** Transcript of the message. */
|
|
9
7
|
content?: string;
|
|
8
|
+
/** Role of who is providing the message. */
|
|
9
|
+
role: Hume.empathicVoice.Role;
|
|
10
10
|
/** Function call name and arguments. */
|
|
11
11
|
toolCall?: Hume.empathicVoice.ToolCallMessage;
|
|
12
12
|
/** Function call response from client. */
|
|
@@ -5,14 +5,6 @@
|
|
|
5
5
|
* When provided, the output is a chat metadata message.
|
|
6
6
|
*/
|
|
7
7
|
export interface ChatMetadata {
|
|
8
|
-
/**
|
|
9
|
-
* The type of message sent through the socket; for a Chat Metadata message, this must be `chat_metadata`.
|
|
10
|
-
*
|
|
11
|
-
* The Chat Metadata message is the first message you receive after establishing a connection with EVI and contains important identifiers for the current Chat session.
|
|
12
|
-
*/
|
|
13
|
-
type: "chat_metadata";
|
|
14
|
-
/** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
|
|
15
|
-
customSessionId?: string;
|
|
16
8
|
/**
|
|
17
9
|
* ID of the Chat Group.
|
|
18
10
|
*
|
|
@@ -23,6 +15,14 @@ export interface ChatMetadata {
|
|
|
23
15
|
chatGroupId: string;
|
|
24
16
|
/** ID of the Chat session. Allows the Chat session to be tracked and referenced. */
|
|
25
17
|
chatId: string;
|
|
18
|
+
/** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
|
|
19
|
+
customSessionId?: string;
|
|
26
20
|
/** ID of the initiating request. */
|
|
27
21
|
requestId?: string;
|
|
22
|
+
/**
|
|
23
|
+
* The type of message sent through the socket; for a Chat Metadata message, this must be `chat_metadata`.
|
|
24
|
+
*
|
|
25
|
+
* The Chat Metadata message is the first message you receive after establishing a connection with EVI and contains important identifiers for the current Chat session.
|
|
26
|
+
*/
|
|
27
|
+
type: "chat_metadata";
|
|
28
28
|
}
|
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as Hume from "../../../index";
|
|
5
5
|
export interface Context {
|
|
6
|
+
/**
|
|
7
|
+
* The context to be injected into the conversation. Helps inform the LLM's response by providing relevant information about the ongoing conversation.
|
|
8
|
+
*
|
|
9
|
+
* This text will be appended to the end of [user_messages](/reference/speech-to-speech-evi/chat#receive.UserMessage.message.content) based on the chosen persistence level. For example, if you want to remind EVI of its role as a helpful weather assistant, the context you insert will be appended to the end of user messages as `{Context: You are a helpful weather assistant}`.
|
|
10
|
+
*/
|
|
11
|
+
text: string;
|
|
6
12
|
/**
|
|
7
13
|
* The persistence level of the injected context. Specifies how long the injected context will remain active in the session.
|
|
8
14
|
*
|
|
@@ -11,10 +17,4 @@ export interface Context {
|
|
|
11
17
|
* - **Persistent**: Context that is applied to all subsequent assistant responses for the remainder of the Chat.
|
|
12
18
|
*/
|
|
13
19
|
type?: Hume.empathicVoice.ContextType;
|
|
14
|
-
/**
|
|
15
|
-
* The context to be injected into the conversation. Helps inform the LLM's response by providing relevant information about the ongoing conversation.
|
|
16
|
-
*
|
|
17
|
-
* This text will be appended to the end of [user_messages](/reference/speech-to-speech-evi/chat#receive.UserMessage.message.content) based on the chosen persistence level. For example, if you want to remind EVI of its role as a helpful weather assistant, the context you insert will be appended to the end of user messages as `{Context: You are a helpful weather assistant}`.
|
|
18
|
-
*/
|
|
19
|
-
text: string;
|
|
20
20
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export type LanguageModelType = "claude-3-7-sonnet-latest" | "claude-3-5-sonnet-latest" | "claude-3-5-haiku-latest" | "claude-3-5-sonnet-20240620" | "claude-3-opus-20240229" | "claude-3-sonnet-20240229" | "claude-3-haiku-20240307" | "claude-sonnet-4-20250514" | "us.anthropic.claude-3-5-haiku-20241022-v1:0" | "us.anthropic.claude-3-5-sonnet-20240620-v1:0" | "us.anthropic.claude-3-haiku-20240307-v1:0" | "gpt-oss-120b" | "qwen-3-235b-a22b" | "qwen-3-235b-a22b-instruct-2507" | "qwen-3-235b-a22b-thinking-2507" | "gemini-1.5-pro" | "gemini-1.5-flash" | "gemini-1.5-pro-002" | "gemini-1.5-flash-002" | "gemini-2.0-flash" | "gemini-2.5-flash" | "gemini-2.5-flash-preview-04-17" | "gpt-4-turbo" | "gpt-4-turbo-preview" | "gpt-3.5-turbo-0125" | "gpt-3.5-turbo" | "gpt-4o" | "gpt-4o-mini" | "gpt-4.1" | "gpt-5" | "gpt-5-mini" | "gpt-5-nano" | "gemma-7b-it" | "llama3-8b-8192" | "llama3-70b-8192" | "llama-3.1-70b-versatile" | "llama-3.3-70b-versatile" | "llama-3.1-8b-instant" | "moonshotai/kimi-k2-instruct" | "accounts/fireworks/models/mixtral-8x7b-instruct" | "accounts/fireworks/models/llama-v3p1-405b-instruct" | "accounts/fireworks/models/llama-v3p1-70b-instruct" | "accounts/fireworks/models/llama-v3p1-8b-instruct" | "sonar" | "sonar-pro" | "sambanova" | "DeepSeek-R1-Distill-Llama-70B" | "Llama-4-Maverick-17B-128E-Instruct" | "Qwen3-32B" | "ellm" | "custom-language-model" | "hume-evi-3-web-search";
|
|
4
|
+
export type LanguageModelType = "claude-3-7-sonnet-latest" | "claude-3-5-sonnet-latest" | "claude-3-5-haiku-latest" | "claude-3-5-sonnet-20240620" | "claude-3-opus-20240229" | "claude-3-sonnet-20240229" | "claude-3-haiku-20240307" | "claude-sonnet-4-20250514" | "us.anthropic.claude-3-5-haiku-20241022-v1:0" | "us.anthropic.claude-3-5-sonnet-20240620-v1:0" | "us.anthropic.claude-3-haiku-20240307-v1:0" | "gpt-oss-120b" | "qwen-3-235b-a22b" | "qwen-3-235b-a22b-instruct-2507" | "qwen-3-235b-a22b-thinking-2507" | "gemini-1.5-pro" | "gemini-1.5-flash" | "gemini-1.5-pro-002" | "gemini-1.5-flash-002" | "gemini-2.0-flash" | "gemini-2.5-flash" | "gemini-2.5-flash-preview-04-17" | "gpt-4-turbo" | "gpt-4-turbo-preview" | "gpt-3.5-turbo-0125" | "gpt-3.5-turbo" | "gpt-4o" | "gpt-4o-mini" | "gpt-4.1" | "gpt-5" | "gpt-5-mini" | "gpt-5-nano" | "gpt-4o-priority" | "gpt-4o-mini-priority" | "gpt-4.1-priority" | "gpt-5-priority" | "gpt-5-mini-priority" | "gpt-5-nano-priority" | "gemma-7b-it" | "llama3-8b-8192" | "llama3-70b-8192" | "llama-3.1-70b-versatile" | "llama-3.3-70b-versatile" | "llama-3.1-8b-instant" | "moonshotai/kimi-k2-instruct" | "accounts/fireworks/models/mixtral-8x7b-instruct" | "accounts/fireworks/models/llama-v3p1-405b-instruct" | "accounts/fireworks/models/llama-v3p1-70b-instruct" | "accounts/fireworks/models/llama-v3p1-8b-instruct" | "sonar" | "sonar-pro" | "sambanova" | "DeepSeek-R1-Distill-Llama-70B" | "Llama-4-Maverick-17B-128E-Instruct" | "Qwen3-32B" | "ellm" | "custom-language-model" | "hume-evi-3-web-search";
|
|
5
5
|
export declare const LanguageModelType: {
|
|
6
6
|
readonly Claude37SonnetLatest: "claude-3-7-sonnet-latest";
|
|
7
7
|
readonly Claude35SonnetLatest: "claude-3-5-sonnet-latest";
|
|
@@ -35,6 +35,12 @@ export declare const LanguageModelType: {
|
|
|
35
35
|
readonly Gpt5: "gpt-5";
|
|
36
36
|
readonly Gpt5Mini: "gpt-5-mini";
|
|
37
37
|
readonly Gpt5Nano: "gpt-5-nano";
|
|
38
|
+
readonly Gpt4OPriority: "gpt-4o-priority";
|
|
39
|
+
readonly Gpt4OMiniPriority: "gpt-4o-mini-priority";
|
|
40
|
+
readonly Gpt41Priority: "gpt-4.1-priority";
|
|
41
|
+
readonly Gpt5Priority: "gpt-5-priority";
|
|
42
|
+
readonly Gpt5MiniPriority: "gpt-5-mini-priority";
|
|
43
|
+
readonly Gpt5NanoPriority: "gpt-5-nano-priority";
|
|
38
44
|
readonly Gemma7BIt: "gemma-7b-it";
|
|
39
45
|
readonly Llama38B8192: "llama3-8b-8192";
|
|
40
46
|
readonly Llama370B8192: "llama3-70b-8192";
|