fixie


Namefixie JSON
Version 0.0.8 PyPI version JSON
download
home_pagehttps://github.com/fixie-ai/fixie-sdk-python
SummaryFixie.ai SDK for Python. Enables you to build AI-powered voice applications.
upload_time2023-12-20 19:37:26
maintainer
docs_urlNone
authorFixie.ai Team
requires_python>=3.11,<4.0
licenseMIT
keywords fixie fixie.ai voice ai
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # fixie-sdk-python
Fixie SDK for Python


## Quickstart

```bash
pip install fixie
```

### Hello Agent

To start a voice session with a Fixie agent, create a `VoiceSession` object and call `session.start()`.

```python
from fixie_sdk.voice import audio_local
from fixie_sdk.voice import types
from fixie_sdk.voice.session import VoiceSession
from fixie_sdk.voice.session import VoiceSessionParams


async def main():
    source = audio_local.LocalAudioSource()
    sink = audio_local.LocalAudioSink()
    params = VoiceSessionParams(agent_id=<your agent uuid>)
    client = VoiceSession(source, sink, params)
    await client.warmup()
    await client.start()
    await asyncio.Event().wait()


asyncio.run(main())
```

### Hello Santa

For a more complete example, see the command-line client included with the Fixie SDK: https://github.com/fixie-ai/fixie-sdk-python/blob/main/fixie_sdk/examples/voice_example.py


## Installing & Running from Source

1. Install
```bash
poetry install
```

1. Run included voice example
```bash
poetry run python examples/voice_example.py
```
Use `Ctrl-C` to terminate the program.

The example program will use the default microphone and output device (i.e. speaker) for your computer. These are set in this code:

```python
# Get the default microphone and audio output device.
source = audio_local.LocalAudioSource()
sink = audio_local.LocalAudioSink()
```

You can find more information in the file `voice/audio_local.py`.

### Using Your Own Agent
You can pass in the `--agent` (or `-a`) input parameter followed by a space and then the ID of your agent.

### Using a Different Voice
Adding more voices is a WIP. For now you can use the default voice or can pick any of the voices that are defined [here](https://github.com/fixie-ai/hisanta.ai/blob/main/lib/config.ts). Pass in the desired voiceID with the `--tts-voice` (`-tv`) parameter.

### Using Your Own Audio Devices
Typically you will want to supply your own audio source and sink (e.g., to pipe the data to the phone network rather than the local audio devices). To do this, simply create your own classes derived from AudioSource and AudioSink and pass them in to the VoiceSession constructor.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/fixie-ai/fixie-sdk-python",
    "name": "fixie",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.11,<4.0",
    "maintainer_email": "",
    "keywords": "fixie,fixie.ai,voice,ai",
    "author": "Fixie.ai Team",
    "author_email": "hello@fixie.ai",
    "download_url": "https://files.pythonhosted.org/packages/9d/fc/d6102bed67f884f9b2b62babb66f533b444d3e62f837336b0b1368673033/fixie-0.0.8.tar.gz",
    "platform": null,
    "description": "# fixie-sdk-python\nFixie SDK for Python\n\n\n## Quickstart\n\n```bash\npip install fixie\n```\n\n### Hello Agent\n\nTo start a voice session with a Fixie agent, create a `VoiceSession` object and call `session.start()`.\n\n```python\nfrom fixie_sdk.voice import audio_local\nfrom fixie_sdk.voice import types\nfrom fixie_sdk.voice.session import VoiceSession\nfrom fixie_sdk.voice.session import VoiceSessionParams\n\n\nasync def main():\n    source = audio_local.LocalAudioSource()\n    sink = audio_local.LocalAudioSink()\n    params = VoiceSessionParams(agent_id=<your agent uuid>)\n    client = VoiceSession(source, sink, params)\n    await client.warmup()\n    await client.start()\n    await asyncio.Event().wait()\n\n\nasyncio.run(main())\n```\n\n### Hello Santa\n\nFor a more complete example, see the command-line client included with the Fixie SDK: https://github.com/fixie-ai/fixie-sdk-python/blob/main/fixie_sdk/examples/voice_example.py\n\n\n## Installing & Running from Source\n\n1. Install\n```bash\npoetry install\n```\n\n1. Run included voice example\n```bash\npoetry run python examples/voice_example.py\n```\nUse `Ctrl-C` to terminate the program.\n\nThe example program will use the default microphone and output device (i.e. speaker) for your computer. These are set in this code:\n\n```python\n# Get the default microphone and audio output device.\nsource = audio_local.LocalAudioSource()\nsink = audio_local.LocalAudioSink()\n```\n\nYou can find more information in the file `voice/audio_local.py`.\n\n### Using Your Own Agent\nYou can pass in the `--agent` (or `-a`) input parameter followed by a space and then the ID of your agent.\n\n### Using a Different Voice\nAdding more voices is a WIP. For now you can use the default voice or can pick any of the voices that are defined [here](https://github.com/fixie-ai/hisanta.ai/blob/main/lib/config.ts). Pass in the desired voiceID with the `--tts-voice` (`-tv`) parameter.\n\n### Using Your Own Audio Devices\nTypically you will want to supply your own audio source and sink (e.g., to pipe the data to the phone network rather than the local audio devices). To do this, simply create your own classes derived from AudioSource and AudioSink and pass them in to the VoiceSession constructor.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Fixie.ai SDK for Python. Enables you to build AI-powered voice applications.",
    "version": "0.0.8",
    "project_urls": {
        "Homepage": "https://github.com/fixie-ai/fixie-sdk-python",
        "Repository": "https://github.com/fixie-ai/fixie-sdk-python"
    },
    "split_keywords": [
        "fixie",
        "fixie.ai",
        "voice",
        "ai"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "916ebd99636ce01c45f56d2d3baaf287a03f960c7b4afe89f764067015c9e9e2",
                "md5": "8180d0cef76ff22a42adc0281e5b5eb8",
                "sha256": "47da48ffd6a972751a809f76abb9179815b82d26c36eb8d9528eef58eefd14bd"
            },
            "downloads": -1,
            "filename": "fixie-0.0.8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8180d0cef76ff22a42adc0281e5b5eb8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11,<4.0",
            "size": 13458,
            "upload_time": "2023-12-20T19:37:24",
            "upload_time_iso_8601": "2023-12-20T19:37:24.802850Z",
            "url": "https://files.pythonhosted.org/packages/91/6e/bd99636ce01c45f56d2d3baaf287a03f960c7b4afe89f764067015c9e9e2/fixie-0.0.8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9dfcd6102bed67f884f9b2b62babb66f533b444d3e62f837336b0b1368673033",
                "md5": "dbf82cbe88549220e3fc09a5aca83d6a",
                "sha256": "173315ac54fbf1b997ae010441186c4d13120d357596fd2afb6f4e71d945c937"
            },
            "downloads": -1,
            "filename": "fixie-0.0.8.tar.gz",
            "has_sig": false,
            "md5_digest": "dbf82cbe88549220e3fc09a5aca83d6a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11,<4.0",
            "size": 10106,
            "upload_time": "2023-12-20T19:37:26",
            "upload_time_iso_8601": "2023-12-20T19:37:26.502035Z",
            "url": "https://files.pythonhosted.org/packages/9d/fc/d6102bed67f884f9b2b62babb66f533b444d3e62f837336b0b1368673033/fixie-0.0.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-20 19:37:26",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "fixie-ai",
    "github_project": "fixie-sdk-python",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "fixie"
}
        
Elapsed time: 0.16422s