Skip to content

Commit cdad865

Browse files
authored
Docstring changes and updates (#74)
1 parent 1d0fe6b commit cdad865

File tree

4 files changed

+20
-16
lines changed

4 files changed

+20
-16
lines changed

docs/index.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,12 @@ Jupyter example notebooks can be found in the [Python SDK GitHub repo](https://g
2929
```python
3030
from hume import HumeBatchClient
3131
from hume.models.config import FaceConfig
32+
from hume.models.config import ProsodyConfig
3233

3334
client = HumeBatchClient("<your-api-key>")
34-
urls = ["https://tinyurl.com/hume-img"]
35-
config = FaceConfig(identify_faces=True)
36-
job = client.submit_job(urls, [config])
35+
urls = ["https://storage.googleapis.com/hume-test-data/video/armisen-clip.mp4"]
36+
configs = [FaceConfig(identify_faces=True), ProsodyConfig()]
37+
job = client.submit_job(urls, configs)
3738

3839
print(job)
3940
print("Running...")
@@ -69,13 +70,14 @@ print(job)
6970
import asyncio
7071

7172
from hume import HumeStreamClient
72-
from hume.models.config import FaceConfig
73+
from hume.models.config import BurstConfig
74+
from hume.models.config import ProsodyConfig
7375

7476
async def main():
7577
client = HumeStreamClient("<your-api-key>")
76-
config = FaceConfig(identify_faces=True)
77-
async with client.connect([config]) as socket:
78-
result = await socket.send_file("<your-image-filepath>")
78+
configs = [BurstConfig(), ProsodyConfig()]
79+
async with client.connect(configs) as socket:
80+
result = await socket.send_file("<your-audio-filepath>")
7981
print(result)
8082

8183
asyncio.run(main())

hume/_batch/hume_batch_client.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,12 @@ class HumeBatchClient(ClientBase):
2222
```python
2323
from hume import HumeBatchClient
2424
from hume.models.config import FaceConfig
25+
from hume.models.config import ProsodyConfig
2526
2627
client = HumeBatchClient("<your-api-key>")
27-
urls = ["https://tinyurl.com/hume-img"]
28-
config = FaceConfig(identify_faces=True)
29-
job = client.submit_job(urls, [config])
28+
urls = ["https://storage.googleapis.com/hume-test-data/video/armisen-clip.mp4"]
29+
configs = [FaceConfig(identify_faces=True), ProsodyConfig()]
30+
job = client.submit_job(urls, configs)
3031
3132
print(job)
3233
print("Running...")

hume/_stream/hume_stream_client.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,15 @@ class HumeStreamClient(ClientBase):
2323
```python
2424
import asyncio
2525
26-
from hume import HumeStreamClient, StreamSocket
27-
from hume.models.config import FaceConfig
26+
from hume import HumeStreamClient
27+
from hume.models.config import BurstConfig
28+
from hume.models.config import ProsodyConfig
2829
2930
async def main():
3031
client = HumeStreamClient("<your-api-key>")
31-
config = FaceConfig(identify_faces=True)
32-
async with client.connect([config]) as socket:
33-
result = await socket.send_file("<your-image-filepath>")
32+
configs = [BurstConfig(), ProsodyConfig()]
33+
async with client.connect(configs) as socket:
34+
result = await socket.send_file("<your-audio-filepath>")
3435
print(result)
3536
3637
asyncio.run(main())

hume/_stream/stream_socket.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ async def send_text(self, text: str) -> Any:
106106
return await self._send_payload(payload)
107107

108108
async def send_facemesh(self, landmarks: List[List[List[float]]]) -> Any:
109-
"""Send text on the `StreamSocket`.
109+
"""Send facemesh landmarks on the `StreamSocket`.
110110
111111
Note: This method is intended for use with a `FacemeshConfig`.
112112
When the socket is configured for other modalities this method will fail.

0 commit comments

Comments
 (0)