-
Notifications
You must be signed in to change notification settings - Fork 682
Feat : Venice audio (Text to Speech) #504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Hi @yornfifty , great work here! I see these 2 minor issues, this PR can be merged as soon as these are fixed, thanks!
# Current problematic code:
class Config(TypedDict):
enabled: bool
api_key: str
states: SkillStates
# Should be changed to:
class Config(SkillConfig):
"""Configuration for Venice Audio skills."""
enabled: bool
api_key: str
states: SkillStates
# Missing required base.py file with proper inheritance pattern:
from typing import Type
from pydantic import BaseModel, Field
from abstracts.skill import SkillStoreABC
from skills.base import IntentKitSkill
class VeniceAudioBaseTool(IntentKitSkill):
"""Base class for Venice Audio tools."""
name: str = Field(description="The name of the tool")
description: str = Field(description="A description of what the tool does")
args_schema: Type[BaseModel]
skill_store: SkillStoreABC = Field(description="The skill store for persisting data")
@property
def category(self) -> str:
return "venice_audio" |
thank you for the review, i already fix it, should i also add it to agent_schema.json? |
skills/venice_audio/__init__.py
Outdated
|
||
|
||
class SkillStates(TypedDict): | ||
af_alloy: SkillState |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can add a enum field to config, and get config in _arun in runtime...
Too many opinions here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
working on it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i just deep dive to how draft-07 schema works, and i've come to this
what do you think?
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Venice Audio Skills",
"description": "Configuration for the Venice Audio skill.",
"type": "object",
"x-tags": [
"AI",
"Audio",
"Text to Speech"
],
"properties": {
"enabled": {
"type": "boolean",
"description": "Enable or disable the Venice Audio skill.",
"default": false
},
"voice_model": {
"type": "string",
"enum": [
"af_heart",
"bm_lewis",
"custom"
],
"x-enum-title": [
"af_heart (default female)",
"bm_lewis (default male)",
"Custom"
],
"description": "Text to speech tool",
"default": "disabled"
},
"states": {
"type": "object",
"title": "Skill States",
"description": "Enable/disable specific voice models. Only enable one if you want a consistent characteristic for your agent. See docs for voice details and quality grades.",
"properties": {
"text_to_speech": {
"type": "string",
"enum": [
"disabled",
"public",
"private"
],
"x-enum-title": [
"Disabled",
"Agent Owner + All Users",
"Agent Owner Only"
],
"description": "Text to speech tool",
"default": "disabled"
}
}
},
"api_key_provider": {
"type": "string",
"title": "API Key Provider",
"description": "Provider of the API key",
"enum": [
"agent_owner"
],
"x-enum-title": [
"Owner Provided"
],
"default": "agent_owner"
}
},
"required": [
"states",
"enabled"
],
"allOf": [
{
"if": {
"allOf": [
{
"properties": {
"enabled": {
"const": true
}
}
},
{
"properties": {
"api_key_provider": {
"const": "agent_owner"
}
}
}
]
},
"then": {
"properties": {
"api_key": {
"type": "string",
"title": "Venice API Key",
"x-link": "[Get your API key](https://venice.ai/)",
"x-sensitive": true,
"description": "API Key for authenticating with the Venice AI API."
}
},
"required": [
"api_key"
]
}
},
{
"if": {
"properties": {
"voice_model": {
"const": "custom"
}
}
},
"then": {
"properties": {
"voice_model_custom": {
"type": "array",
"items": {
"type": "string"
},
"title": "Voice Model (Custom)",
"x-link": "[Supported Voice Model](https://docs.venice.ai/api-reference/endpoint/audio/speech#body-voice)",
"description": "You can add one or more custom voice models.",
"default": [
"af_heart", "bm_lewis"
]
}
},
"required": [
"voice_model_custom"
]
}
}
],
"additionalProperties": true
}
Description
Please include a summary of the changes and the related issue.
Text to speech with venice ai, support multiple voice models
Utils.s3 update
now we can use
store_file_bytes
to store most common file type and ability to limit the filesizeType of Change
Checklist
*Note
i'm not add this to
models/agent_schema.json
's property yet, to avoid conflic with other prRelated Issue
Showcase