Skip to content

Commit 1d0999d

Browse files
Add text-to-video to supported tasks (#2790)
* Add text-to-video to supported tasks * replicate text-to-speech * complete text-to-speech examples --------- Co-authored-by: Celina Hanouti <[email protected]>
1 parent d26ccdd commit 1d0999d

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

docs/source/en/guides/inference.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,13 +252,14 @@ You might wonder why using [`InferenceClient`] instead of OpenAI's client? There
252252
| **Audio** | [`~InferenceClient.audio_classification`] ||||||
253253
| | [`~InferenceClient.audio_to_audio`] ||||||
254254
| | [`~InferenceClient.automatic_speech_recognition`] ||||||
255-
| | [`~InferenceClient.text_to_speech`] || ||||
255+
| | [`~InferenceClient.text_to_speech`] || ||||
256256
| **Computer Vision** | [`~InferenceClient.image_classification`] ||||||
257257
| | [`~InferenceClient.image_segmentation`] ||||||
258258
| | [`~InferenceClient.image_to_image`] ||||||
259259
| | [`~InferenceClient.image_to_text`] ||||||
260260
| | [`~InferenceClient.object_detection`] ||||||
261261
| | [`~InferenceClient.text_to_image`] ||||||
262+
| | [`~InferenceClient.text_to_video`] ||||||
262263
| | [`~InferenceClient.zero_shot_image_classification`] ||||||
263264
| **Multimodal** | [`~InferenceClient.document_question_answering`] ||||||
264265
| | [`~InferenceClient.visual_question_answering`] ||||||

src/huggingface_hub/inference/_client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2714,6 +2714,7 @@ def text_to_speech(
27142714
... text="Hello world",
27152715
... model="OuteAI/OuteTTS-0.3-500M",
27162716
... )
2717+
>>> Path("hello_world.flac").write_bytes(audio)
27172718
```
27182719
27192720
Example using a third-party provider through Hugging Face Routing. Usage will be billed on your Hugging Face account.
@@ -2727,6 +2728,7 @@ def text_to_speech(
27272728
... text="Hello world",
27282729
... model="OuteAI/OuteTTS-0.3-500M",
27292730
... )
2731+
>>> Path("hello_world.flac").write_bytes(audio)
27302732
```
27312733
"""
27322734
provider_helper = get_provider_helper(self.provider, task="text-to-speech")

src/huggingface_hub/inference/_generated/_async_client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2775,6 +2775,7 @@ async def text_to_speech(
27752775
... text="Hello world",
27762776
... model="OuteAI/OuteTTS-0.3-500M",
27772777
... )
2778+
>>> Path("hello_world.flac").write_bytes(audio)
27782779
```
27792780
27802781
Example using a third-party provider through Hugging Face Routing. Usage will be billed on your Hugging Face account.
@@ -2788,6 +2789,7 @@ async def text_to_speech(
27882789
... text="Hello world",
27892790
... model="OuteAI/OuteTTS-0.3-500M",
27902791
... )
2792+
>>> Path("hello_world.flac").write_bytes(audio)
27912793
```
27922794
"""
27932795
provider_helper = get_provider_helper(self.provider, task="text-to-speech")

0 commit comments

Comments
 (0)