Skip to content

rosedev318/neuralaudio-python

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NeuralAudioAI Python SDK

LOGO

Website Twitter HuggingFace

Python SDK for NeuralAudioAI. NeuralAudioAI is a gamechanger, introducing the new quality standards and prices of TTS services.

Installation

pip install neural_audio

🎤 Usage

Open in Spaces

Models

  1. NA_base (na_base_v1)

    • Solid baseline, suits for most cases
    • Support of 15 languages
    • Real-time speed
  2. NA_pro (na_pro_v1)

    • Highest quality
    • Best shot for PROs & Businesses
    • Support of 52 languages
  3. NA_vic (na_vic) - comming soon...

from neural_audio import NeuralAudio

client = NeuralAudio(
    api_key="YOUR_API_KEY",
)

client.text_to_speech.convert(
    voice_id="32dcdovdplsmcos",
    model_id="base_v1",
    text="Hello world!",
)
Hear the voice of the future

Test us! Want to see what we can? Visit the NeuralAudioAI to test our models, hear their voices or create your own!

Voice clonning

Effortlessly recreate your voice with cutting-edge AI. Instantly generate a lifelike clone and explore the possibilities of voice transformation!

from neural_audio import NeuralAudio

client = NeuralAudio(
  api_key="YOUR_API_KEY",
)

voice = client.clone_voice(
    name="Alex",
    description="A well-known male actor in his 50s, with a touch of excitement in his tone and a subtle sense of urgency in his delivery.",
    sample="./sample_0.wav" # or ["./sample_0.wav", "./sample_1.mp3", "./sample_2.mkv"],
)

⚡️ Real-time Streaming

Let your agents have real converstions with real-time audio streams. Both inside and out.

Output streaming

from neural_audio import NeuralAudio

streaming_client = NeuralAudio.streaming_client(
  api_key="YOUR_API_KEY",
)

audio_stream = streaming_client.text_to_speech.convert(
    text="Hi! How may I help you?",
    voice="Adam",
    model="na_pro_v1"
)

stream(audio_stream)

Input streaming

Stream text chunks into audio as it's being generated, with <1s latency. Note: if chunks don't end with space or punctuation (" ", ".", "?", "!"), the stream will wait for more text.

from neural_audio import NeuralAudio

streaming_client = NeuralAudio.streaming_client(
  api_key="YOUR_API_KEY",
)

def audio_stream():
    with open("live_audio_input.wav", "rb") as audio:
        while chunk := audio.read(4096): 
            yield chunk

audio_stream = streaming_client.conversation(
    audio=audio_stream(),
    voice="Adam",
    llm="gpt-4o", # OPENAI_API_KEY required
    model="na_pro_v1"
)

stream(audio_stream)

About

NeuralAudio python SDK

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%