Skip to main content

Official Python SDK for HyperNeuron AI services

Project description

hyperneuronai

Official Python SDK for HyperNeuron AI — TTS streaming and AI telephony services.

Install

pip install hyperneuronai

Quick start

import hyperneuronai

client = hyperneuronai.HyperNeuron(
    api_key="hn_key_xxxx",
    base_url="https://ai.hyperneuron.in",
)

# TTS — save to WAV
audio = client.tts.generate("Hello, world!", voice="sanjana")
with open("hello.wav", "wb") as f:
    f.write(audio)

# TTS — stream in real time
for chunk in client.tts.stream("Hello, world!", voice="sanjana"):
    your_speaker.write(chunk)

# One-way outbound call
call = client.telephony.outbound(
    to="+91<10digitIndianNumber>",
    text="Hi! Your order has shipped and arrives tomorrow.",
    voice="sanjana",
)
print(call.call_uuid, call.state)

Async

import asyncio
import hyperneuronai

async def main():
    async with hyperneuronai.AsyncHyperNeuron(api_key="hn_key_xxxx") as client:
        audio = await client.tts.generate("Hello!")
        call  = await client.telephony.outbound(to="+91<10digitIndianNumber>", text="Hi there!")

asyncio.run(main())

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hyperneuronai-0.1.18.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hyperneuronai-0.1.18-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file hyperneuronai-0.1.18.tar.gz.

File metadata

  • Download URL: hyperneuronai-0.1.18.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for hyperneuronai-0.1.18.tar.gz
Algorithm Hash digest
SHA256 27d155867720d30b218930053c41c2b2914d6fcec506a9ce59c613f3c6b1c2b2
MD5 b48d76da2f5d18158c5a77af331e02f7
BLAKE2b-256 f9d0de4118ce3818aa7aab081aabfdf652212a77b35219ccd70282f5f01962e0

See more details on using hashes here.

File details

Details for the file hyperneuronai-0.1.18-py3-none-any.whl.

File metadata

  • Download URL: hyperneuronai-0.1.18-py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for hyperneuronai-0.1.18-py3-none-any.whl
Algorithm Hash digest
SHA256 5dbaa77b86355cac134784c35678bdc74ef8de8e43ecaeb0e152940b5561d751
MD5 5082527251b458d3d1c873573a400bfb
BLAKE2b-256 8c24a8bc475c9f24482fac9b8cd3fa622c04bac4581dd0e994c92c3337a7517b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page