carter-py
Last updated
Last updated
In order to use carter-py
you'll need to sign up to sign up to and create an agent. CarterAPI has excellent documentation.
pip install carter-py
The main component of carter-py
is the Carter
class. This class provides a set of methods to interact with your carter agent.
Pass in the apiKey of your specific agent - remember to keep this secret while developing and in production as this will allow anyone access to your agent.
carter-py
is compatible with asynchronous code through importing the async version of the class.
When using any of the following methods, the output audio will not be returned by default as this currently introduces significant latency on the API end. If you want to receive the audio you have two options. You can set the speak
parameter to True
when creating the Carter object, or you can set it to True
when calling the method. When calling a function carter-py
will first check if the speak
parameter has been overridden in the function call, if it hasn't, it will use the class default.
Documentation on say()
is included in further sections.