Registry / communication / vonage-voice

vonage-voice

JSON →
library1.5.0pypypiunverified

The `vonage-voice` library provides helper functionality for building Voice Applications with the Vonage Voice API in Python. It is designed to be used in conjunction with the main `vonage` Python SDK (version 3.0.0 or higher), which contains the core Voice API client. This package facilitates NCCO (Nexmo Call Control Object) generation and other voice-related utilities, simplifying the creation of interactive voice experiences. The current version is 1.4.0.

pip install vonage-voice vonage
INSTALL
IMPORT
SIG · VONAGE-VOICE
V
vonage-voice
communicationpythonv1.5.0
Install
5.6s avg
Import
Disk
49MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.5.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 50MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 5.6s · import 0.000s · 50MB
49MB installed
● package 49MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Ncco
from vonage_voice import Ncco
TalkNcco
from vonage_voice import TalkNcco
ConnectNcco
from vonage_voice import ConnectNcco
Client
from vonage import Client
from vonage_voice import Client
The core Vonage API Client resides in the 'vonage' package, not 'vonage-voice'. `vonage-voice` provides NCCO helpers.

This quickstart demonstrates how to create a simple NCCO (Nexmo Call Control Object) using the `vonage-voice` helpers. It also shows the initialization of the core Vonage API client from the `vonage` package, which is necessary for making actual API calls or serving the NCCO. Replace placeholders with your actual API credentials and phone numbers.

import os from vonage import Client from vonage_voice import Ncco, TalkNcco # Ensure VONAGE_API_KEY and VONAGE_API_SECRET are set as environment variables # OR VONAGE_APPLICATION_ID and VONAGE_PRIVATE_KEY # Initialize the Vonage Client (from the 'vonage' package) client = Client( key=os.environ.get('VONAGE_API_KEY', 'YOUR_API_KEY'), secret=os.environ.get('VONAGE_API_SECRET', 'YOUR_API_SECRET'), application_id=os.environ.get('VONAGE_APPLICATION_ID', ''), private_key=os.environ.get('VONAGE_PRIVATE_KEY', '').replace('\\n', '\n') ) # Create an NCCO using vonage-voice helpers ncco = Ncco() ncco.add_action(TalkNcco(text='Hello from Vonage! This is an NCCO generated by vonage-voice.')) # In a real application, you would return this NCCO as a JSON response # to a webhook for an incoming call. For demonstration, print: print(ncco.build()) # Example of making an outbound call (using the core 'vonage' client): # Requires VONAGE_APPLICATION_ID and VONAGE_PRIVATE_KEY for voice calls. # try: # call = client.voice.create_call({ # 'to': [{'type': 'phone', 'number': 'RECIPIENT_PHONE_NUMBER'}], # 'from': {'type': 'phone', 'number': 'VIRTUAL_NUMBER'}, # 'answer_url': ['https://example.com/webhooks/answer'] # Your public webhook URL # }) # print(f"Call initiated with UUID: {call['uuid']}") # except Exception as e: # print(f"Error initiating call: {e}")
Debug
Known issues
gotchaThe `vonage-voice` package provides NCCO helpers and utilities, but *does not* contain the core Vonage API client for making calls, sending messages, or managing applications. The primary client is located in the `vonage` package.
fix
Always install `vonage` alongside `vonage-voice` (e.g., `pip install vonage vonage-voice`) and import the `Client` from `vonage` (`from vonage import Client`).
affects: All versions
breakingThe `vonage-voice` package depends on `vonage>=3.0.0`. Older versions of the `vonage` SDK (pre-3.0.0) used a different client initialization and API structure, leading to compatibility issues or missing features.
fix
Ensure you are using `vonage-voice` with `vonage` version 3.0.0 or higher. Upgrade both packages if necessary: `pip install --upgrade vonage vonage-voice`.
affects: <1.0.0 (vonage-voice) or <3.0.0 (vonage)
gotchaNCCOs built with `vonage-voice` must be served via a webhook endpoint that Vonage can access over HTTP/HTTPS. The library only helps *construct* the NCCO object, not host or deliver it.
fix
Develop a web server (e.g., using Flask or FastAPI) to listen for Vonage webhooks, generate the NCCO dynamically, and return it as a JSON response with the `Content-Type: application/json` header.
affects: All versions
Upgrade
Version history
1.5.0latest on PyPI · released Apr 22, 2026
Audit
Dependencies
vonagerequiredProvides the core Vonage API client, which vonage-voice extends and depends on.
Agent activity
42 hits · last 30 days
node
36
Amazon
1
Bingbot
1
OpenAI (training)
1
Resources
vonage-voice — pip install vonage-voice · libregistry