Volcengine Voice Notification Sending Skill
Send voice notifications to specified mobile phone numbers based on the Volcengine Voice Service API.
Applicable Scenarios
- When the user mentions "Send a voice notification to {phone number}" "Help me make a voice call to {phone number}"
- When the user mentions "Send a voice notification to {phone number} in {language}"
- When the user mentions "Send a {keyword} voice notification to {phone number}"
- When the user needs to notify important information via voice
Core Execution Process
When you receive a request to send a voice notification, please strictly follow the 4 steps below in order:
Step 1: Extract Mobile Phone Number
Extract the 11-digit mobile phone number from the user's instruction. If the user does not provide a phone number, ask the user first.
Step 2: Query Available Number Pools
Execute the following command to query number pools:
bash
python3 scripts/voice_notify.py pool
From the returned JSON result:
- Check the array
- Select a number pool with (available numbers)
- Extract the field value of this number pool (e.g.: )
Note: Prioritize selecting the first number pool with available numbers.
Step 3: Query Voice Resources
Execute the following command to query voice resources:
bash
python3 scripts/voice_notify.py resource
From the returned JSON result:
- Check the array
- Match against the , , , fields of the resources according to the keywords in the user's instruction
- Select the most matching voice resource
- Extract the field value of this resource
Resource Selection Rules:
- If there are no matching keywords, select the first resource in the list
Step 4: Send Voice Notification
Execute the following command to send the voice notification:
bash
python3 scripts/voice_notify.py send <phone number> <resource key> <number pool ID>
Fill in the phone number extracted in Step 1, the resource key extracted in Step 3, and the number pool ID extracted in Step 2 into the command.
Step 5: Return Result
Directly inform the user of the return result of the
command.
Script Command Description
| Command | Parameters | Description |
|---|
| None | Query the list of available voice resources |
| None | Query the list of voice notification number pools |
| <phone number> <resource key> <number pool ID>
| Send voice notification |
Complete Usage Examples
Example 1: Simple Sending
User Input: Send a voice notification to 13800138000
Your Execution:
-
-
Query number pools:
bash
python3 scripts/voice_notify.py pool
Assume the
of the first number pool with available numbers in the returned result is
- Query voice resources:
bash
python3 scripts/voice_notify.py resource
Assume the
of the first resource in the returned result is
312346368e676406285b8463931f090f4
- Send voice notification:
bash
python3 scripts/voice_notify.py send 13800138000 312346368e676406285b8463931f090f4 NPabc
- Inform the user of the sending result
Example 2: Specify Language
User Input: Send a voice notification to 13800138000 in Japanese
Your Execution:
-
-
Query number pools:
bash
python3 scripts/voice_notify.py pool
Select the first number pool with available numbers
- Query voice resources:
bash
python3 scripts/voice_notify.py resource
In the returned resource list, find the resource with
as
or
/
containing "Japanese", and extract its
- Send voice notification:
bash
python3 scripts/voice_notify.py send 13800138000 <Japanese resource key> <number pool ID>
- Inform the user of the sending result
Example 3: Specify Keyword
User Input: Send an OCIC voice notification to 13800138000
Your Execution:
-
-
Query number pools:
bash
python3 scripts/voice_notify.py pool
Select the first number pool with available numbers
- Query voice resources:
bash
python3 scripts/voice_notify.py resource
In the returned resource list, find the resource with
or
containing "OCIC", and extract its
- Send voice notification:
bash
python3 scripts/voice_notify.py send 13800138000 <OCIC resource key> <number pool ID>
- Inform the user of the sending result
Environment Variables
Before use, configure the Volcengine access keys into the system environment variables or the .env file of OpenClaw:
- VOLCENGINE_ACCESS_KEY: Volcengine Access Key ID
- VOLCENGINE_SECRET_KEY: Volcengine Secret Access Key
Obtaining method: Log in to the Volcengine console, create and obtain it in Access Key Management.
Error Handling
- If the error
Please set the environment variables VOLCENGINE_ACCESS_KEY and VOLCENGINE_SECRET_KEY
occurs: Prompt the user to configure the Volcengine access keys.
- If the error
No available number pools found
occurs: Prompt the user to check if there are available voice notification number pools under the account.
- If the error
No available voice resources found
occurs: Prompt the user to check if there are available voice resource files under the account.
- For other errors, directly inform the user of the specific error message.
Reference Documents
https://www.volcengine.com/docs/6358/166389?lang=zh
— Signature Mechanism
https://www.volcengine.com/docs/6358/1722078?lang=zh
— Query Available Voice Resources
https://www.volcengine.com/docs/6358/172952?lang=zh
— Send Voice Notification Once
https://www.volcengine.com/docs/6358/173339?lang=zh
— Query Number Pool List