---
name: tomoviee-text2sfx
description: Generate sound effects from text prompts using Tomoviee Text-to-Sound-Effect API (tm_text2sfx) through Wondershare OpenAPI gateway (https://openapi.wondershare.cc). Use when users request text_to_sound_effect operations or related tasks.
Generate sound effects from text prompts.
tm_text2sfxhttps://openapi.wondershare.cc/v1/open/capacity/application/tm_text2sfxhttps://openapi.wondershare.cc/v1/open/pub/taskUse this mapping to verify provider identity and runtime endpoints:
https://www.tomoviee.ai and https://www.tomoviee.cnhttps://openapi.wondershare.ccopenapi.wondershare.ccapp_key and app_secret are only used to construct Authorization: Basic .SKILL.md, scripts, or repository files.pip install requests
python scripts/generate_auth_token.py YOUR_APP_KEY YOUR_APP_SECRET
from scripts.tomoviee_text2sfx_client import TomovieeText2SfxClient
client = TomovieeText2SfxClient("app_key", "app_secret")
task_id = client.text_to_sound_effect(
prompt="Heavy rain falling on roof with distant thunder",
duration=30,
qty=1,
)
result = client.poll_until_complete(task_id)
import json
audio_url = json.loads(result["result"])["audio_path"][0]
print(audio_url)
prompt (required): Sound effect descriptionduration (required): Duration in seconds, range 5-180qty (optional): Number of generated results, range 1-4callback (optional): Callback URLparams (optional): Transparent callback parametertask_idpoll_until_complete(task_id)resultStatus codes:
1 queued2 processing3 success4 failed5 cancelled6 timeoutscripts/tomoviee_text2sfx_client.py - main API clientscripts/tomoviee_text_to_sound_effect_client.py - compatibility import shimscripts/generate_auth_token.py - auth token helperreferences/audio_apis.md - focused API reference for tm_text2sfxreferences/prompt_guide.md - focused prompt writing guide for sound effectshttps://www.tomoviee.ai/developers.htmlhttps://www.tomoviee.ai/doc/https://www.tomoviee.cn/developers.htmlhttps://www.tomoviee.cn/doc/https://openapi.wondershare.cc
共 2 个版本