Creation of Ice url for Accessing Azure Real Time TTS Avatar

Kasi Kovid 0 Reputation points
2024-06-19T08:38:19.4233333+00:00

Hello , i am trying to create Ice urls for Real time Azure TTS Avatar. I have created communication services keys in Global region. While running the code to create those ice ulr i am running into errors.

**Note : I have removed the connection string key

i have attached the code below.

import os
from azure.communication.networktraversal import CommunicationRelayClient
from azure.identity import DefaultAzureCredential
from azure.communication.identity import CommunicationIdentityClient

try:
    print("Azure Communication Services - Access Relay Configuration Quickstart")

    # Authentication setup
    connection_str = ""
    endpoint = "https://communicationeastus.unitedstates.communication.azure.com/"

    # Initialize the Communication Identity Client using the connection string
    identity_client = CommunicationIdentityClient.from_connection_string(connection_str)

    # Alternatively, you can use DefaultAzureCredential if your environment is set up for it
    # identity_client = CommunicationIdentityClient(endpoint, DefaultAzureCredential())

    # Creating a user
    user = identity_client.create_user()
    
    # Initialize the Communication Relay Client
    relay_client = CommunicationRelayClient.from_connection_string(connection_str)

    # Getting the relay configuration without passing the 'user'
    relay_configuration = relay_client.get_relay_configuration()

    # Processing ICE Server Information
    for iceServer in relay_configuration.ice_servers:
        if iceServer.username:
            print('Username: ' + iceServer.username)
        if iceServer.credential:
            print('Credential: ' + iceServer.credential)
        if iceServer.urls:
            for url in iceServer.urls:
                print('Url:' + url)

except Exception as ex:
    print("Exception:")
    print(ex)

ERROR

Exception:

JSON is invalid: Expecting value: line 1 column 1 (char 0)

Content: <h2>Our services aren't available right now</h2><p>We're working to restore all services as soon as possible. Please check back soon.</p>0K5dyZgAAAACDec7PY2+lTLAxZDn0DoQwSEtCRURHRTA3MTUARWRnZQ==

Azure Communication Services
Azure Communication Services
An Azure communication platform for deploying applications across devices and platforms.
785 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,273 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Kasi Kovid 0 Reputation points
    2024-06-19T09:11:57.9033333+00:00

    Also , This is Something i came across from azure. I am new to this , can someone help me with creating ICE related credentials.?

    Retirement notice: Azure Communication Services Network Traversal (TURN) Public Preview is retiring.

    Published date: September 29, 2023

    You’re receiving this email because you may be using Azure Communication Services Network Traversal (TURN), a capability of Azure Communications services. 

      Azure Communication Services Network Traversal (TURN) currently provides tokens to access our Transport Relays to use data transfer services.

      Required action 

    After 31 March 2024, your TURN issued tokens will no longer be supported.  Please transition to a third-party service before this date to avoid service disruption. 

      Help and support. 

    If you have questions, get answers from community experts in  Microsoft Q&A. If you have a support plan and require further assistance please create a support ticket.  

    0 comments No comments