Skip to content

Commit e8f1984

Browse files
techpro-aimlapigitbook-bot
authored andcommitted
GITBOOK-850: docs: add octave-2
1 parent 6a5ef2b commit e8f1984

7 files changed

Lines changed: 125 additions & 3 deletions

File tree

docs/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ If you've already made your choice and know the model ID, use the [Search panel]
108108

109109
**Gryphe**: [Text/Chat](api-references/text-models-llm/gryphe/)
110110

111+
**Hume AI**: [Text-to-Speech](api-references/speech-models/text-to-speech/hume-ai/)
112+
111113
**Inworld**: [Text-to-Speech](api-references/speech-models/text-to-speech/inworld/)
112114

113115
<mark style="background-color:green;">**Kling AI**</mark>: [Image](api-references/image-models/kling-ai/) [Video](api-references/video-models/Kling-AI/)

docs/SUMMARY.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,8 @@
388388
* [ElevenLabs](api-references/speech-models/text-to-speech/elevenlabs/README.md)
389389
* [eleven\_multilingual\_v2](api-references/speech-models/text-to-speech/elevenlabs/eleven_multilingual_v2.md)
390390
* [eleven\_turbo\_v2\_5](api-references/speech-models/text-to-speech/elevenlabs/eleven_turbo_v2_5.md)
391+
* [Hume AI](api-references/speech-models/text-to-speech/hume-ai/README.md)
392+
* [octave-2](api-references/speech-models/text-to-speech/hume-ai/octave-2.md)
391393
* [Inworld](api-references/speech-models/text-to-speech/inworld/README.md)
392394
* [inworld/tts-1](api-references/speech-models/text-to-speech/inworld/tts-1.md)
393395
* [inworld/tts-1-max](api-references/speech-models/text-to-speech/inworld/tts-1-max.md)

docs/api-references/model-database.md

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/api-references/speech-models/README.md

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/api-references/speech-models/text-to-speech/README.md

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Hume AI
2+
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
# octave-2
2+
3+
{% columns %}
4+
{% column width="66.66666666666666%" %}
5+
{% hint style="info" %}
6+
This documentation is valid for the following list of our models:
7+
8+
* `hume/octave-2`
9+
{% endhint %}
10+
{% endcolumn %}
11+
12+
{% column width="33.33333333333334%" %}
13+
<a href="https://aimlapi.com/app/hume/octave-2" class="button primary">Try in Playground</a>
14+
{% endcolumn %}
15+
{% endcolumns %}
16+
17+
An advanced text-to-speech model with improved emotional understanding, support for 11 languages, and sub-200 ms audio generation. It provides more reliable pronunciation of complex and uncommon inputs.
18+
19+
## Setup your API Key
20+
21+
If you don’t have an API key for the AI/ML API yet, feel free to use our [Quickstart guide](https://docs.aimlapi.com/quickstart/setting-up).
22+
23+
## API Schema
24+
25+
{% openapi-operation spec="octave-2" path="/v1/tts" method="post" %}
26+
[OpenAPI octave-2](https://raw.githubusercontent.com/aimlapi/api-docs/refs/heads/main/docs/api-references/speech-models/Hume-AI/octave-2.json)
27+
{% endopenapi-operation %}
28+
29+
## Code Example
30+
31+
{% tabs %}
32+
{% tab title="Python" %}
33+
{% code overflow="wrap" %}
34+
```python
35+
import requests
36+
import json
37+
38+
# Insert your AI/ML API key instead of <YOUR_AIMLAPI_KEY>:
39+
api_key = "<YOUR_AIMLAPI_KEY>"
40+
base_url = "https://api.aimlapi.com/v1"
41+
42+
headers = {
43+
"Authorization": f"Bearer {api_key}",
44+
"Content-Type": "application/json",
45+
}
46+
47+
data = {
48+
"model": "hume/octave-2",
49+
"text": "It is a fast and powerful language model. Use it to convert text to natural sounding spoken text.",
50+
"voice": "Relaxing ASMR Woman",
51+
}
52+
53+
response = requests.post(f"{base_url}/tts", headers=headers, json=data)
54+
response.raise_for_status()
55+
56+
result = response.json()
57+
print(json.dumps(result, indent=2, ensure_ascii=False))
58+
```
59+
{% endcode %}
60+
{% endtab %}
61+
62+
{% tab title="JaveScript" %}
63+
{% code overflow="wrap" %}
64+
```javascript
65+
import axios from "axios";
66+
67+
// Insert your AI/ML API key instead of <YOUR_AIMLAPI_KEY>:
68+
const apiKey = "<YOUR_API_KEY>";
69+
const baseURL = "https://api.aimlapi.com/v1";
70+
71+
const headers = {
72+
Authorization: `Bearer ${apiKey}`,
73+
"Content-Type": "application/json",
74+
};
75+
76+
const data = {
77+
model: "inworld/tts-1",
78+
text: "It is a fast and powerful language model. Use it to convert text to natural sounding spoken text.",
79+
voice: "Deborah",
80+
};
81+
82+
const main = async () => {
83+
const response = await axios.post(`${baseURL}/tts`, data, { headers });
84+
console.log(response);
85+
};
86+
87+
main().catch(console.error);
88+
```
89+
{% endcode %}
90+
{% endtab %}
91+
{% endtabs %}
92+
93+
<details>
94+
95+
<summary>Response</summary>
96+
97+
{% code overflow="wrap" %}
98+
```
99+
{
100+
"audio": {
101+
"url": "https://cdn.aimlapi.com/generations/hippopotamus/1769604037348-b2b0235e-e813-462d-904e-632803a698b4.wav"
102+
},
103+
"meta": {
104+
"usage": {
105+
"credits_used": 12222
106+
}
107+
}
108+
}
109+
```
110+
{% endcode %}
111+
112+
</details>
113+
114+
Listen to the audio sample we generated (\~ 1.8 s):
115+
116+
{% embed url="https://drive.google.com/file/d/1a4dW8Uz4VcxtOsgmcYF-ejzgMsGya0pP/view" %}

0 commit comments

Comments
 (0)