Discussions

Ask a Question
ANSWERED

Interrupt Streaming Avatar

Dear Heygen team, after initializing a Streaming Avatar and exchanging a few messages with it, there are times that we want to interrupt it so that it does not repeat all the messages it has received. What is a good way to achieve this? Please note we don't want to do any of the following: A) mute the mediaElement, as the Avatar will still be talking and repeating a large message B) pause() the mediaElement, as there might be a large message and if I then hit play() it will resume the message B) stop the MediaStreamTracks, as I don't want to create a new session Within the same session, is there a way to "clear the queue" of messages it is going to stream, so that it will resume with the next one that is sent? Thanks and regards
ANSWERED

Error talking to AI

I successfully set up the local streaming avatar and made it to Repeat my Message. I as well created a OpenAI API key and included it into the server.js. But when pressing the "Talk" button I always get the error Talking to LLM... please wait Error talking to AI Are there any logs or details what the error means and how to resolve the issue?
ANSWERED

Issue: Replacing streaming avatar with my own avatar.

I created instant video then I paid $199 for streaming avatar. Now I want to use my own streaming avatar on my mobile app. Once I call the api from the app they says avatar not found. Please share me proper documentation and why the api is not getting my own avatar. url: <https://api.heygen.com/v1/streaming.new> body: { "quality": "high" , "avatar_name": "Payton-Babb" } response: { "code": 10013, "message": "avatar not found" }
ANSWERED

API specification for get-remaining-quota-v2

We are trying to use the API to check for depleted credit balances. <https://docs.heygen.com/reference/get-remaining-quota-v2> There is a discrepancy between the value responded to by the API and the value confirmed by the HeyGen console.How can I retrieve the values from the HeyGen console? The document says the following: am I correct in my understanding that the specification is to divide by 60? > Get remaining quota. The returned quota would be roughly 60 \* credit that showed in UI.
ANSWERED

If you don't keep subscription

If you cancel what happens to instant avatars already purchased. Do you have to keep this going to use the instant avatars you already purchased?
ANSWERED

I can't delete any personal avatar

Hoping there is an explanation for this. I've been trying to delete one of the three personal avatars to upload another. However, while Heygen says 'deleted', the 'create instant avatar' stays 0 of 3. When I refresh the page, the avatar I had deleted is back again. Is this a bug? It does the same on any other browser I have.
ANSWERED

We observed suspicious activity on your account. Please try again later.

I can't log in for 8-10 days now. I've sent multiple emails to support with no answer. Can anyone help me please 🤨

Problems to set up the streaming avatar with Python

Dear Heygen-Team, I still got problems to set up the streaming avatar with Python When answering the offer (see # START), I always receive {"code":400,"message":"peer start failed,please check the answer"} 400. What I am doing wrong? Also what do I need to pass (see #PEER CONNECTION) for submitted the ICE candidate from my offer? payload = { "session_id": session_id, "candidate": { "candidate": "<CANDIDATE>", # \<- ? "sdpMid": "\<SDP_MID>", # \<- ? "sdpMLineIndex": "\<SDP_MLINE_INDEX>", # \<- ? "usernameFragment": "\<USERNAME_FRAGMENT>" # \<- ? } } Many thanks for your help in advance! ``` from aiortc import RTCPeerConnection, RTCSessionDescription import requests import json import time import asyncio import cv2 # # <https://docs.heygen.com/reference/overview-copy> # # <https://aiortc.readthedocs.io/en/latest/> with open('heygen/offer.json', 'r') as file: data = json.load(file) session_id = data['data']['session_id'] headers = { "accept": "application/json", "content-type": "application/json", "x-api-key": "NzU4M2ZhZDUyNTIyNGRmNTg1NmE0OTU1YzZlNWE2MmMtMTcxMzE4MDIxNg==" } # # ============== # # STOP: print("========================= Stop old stream:") time.sleep(1) url = "<https://api.heygen.com/v1/streaming.stop"> payload = {"session_id": session_id} response = requests.post(url, json=payload, headers=headers) print(response.text, response.status_code) # ============== # # LIST: print("========================= Show streams:") time.sleep(1) url = "<https://api.heygen.com/v1/streaming.list"> response = requests.get(url, headers=headers) print(response.text, response.status_code) # ============== # CREATE: print("========================= Create stream:") time.sleep(1) url = "<https://api.heygen.com/v1/streaming.new"> payload = {"quality": "medium"} response = requests.post(url, json=payload, headers=headers) print(response.text, response.status_code) if response.status_code == 200: text = response.json() with open('heygen/offer.json', 'w') as file: json.dump(response.json(), file, indent=2) with open('heygen/offer.json', 'r') as file: data = json.load(file) session_id = data['data']['session_id'] sdp = data['data']['sdp']['sdp'] # ============== # START: print("========================= Answer sdp:") time.sleep(1) async def handle_offer(pc, offer_sdp_data): await pc.setRemoteDescription(RTCSessionDescription(offer_sdp_data, 'offer')) answer = await pc.createAnswer() await pc.setLocalDescription(answer) # answer_sdp = {'type': 'answer', 'sdp': pc.localDescription.sdp} answer_sdp = pc.localDescription.sdp return answer_sdp pc = RTCPeerConnection() answer_sdp = asyncio.run(handle_offer(pc, sdp)) url = "<https://api.heygen.com/v1/streaming.start"> payload = { "session_id": session_id, "sdp": { "type": "answer", "sdp": answer_sdp } } response = requests.post(url, json=payload, headers=headers) print(response.text, response.status_code) # # ============== # # PEER CONNECTION: print("========================= Submit ICE candidate:") time.sleep(1) url = "<https://api.heygen.com/v1/streaming.ice"> payload = { "session_id": session_id, "candidate": { "candidate": "<CANDIDATE>", "sdpMid": "\<SDP_MID>", "sdpMLineIndex": "\<SDP_MLINE_INDEX>", "usernameFragment": "\<USERNAME_FRAGMENT>" } } response = requests.post(url, json=payload, headers=headers) print(response.text, response.status_code) ```
ANSWERED

Streaming Avatar

I created Instant avatar but how to replace the default streaming avatar by instant avatar?

Video doesn't load text completely

What to do if large texts are not fully loaded as videos. For example, the video duration is 2:03, but I need it to be 2:45. The subtitle text says the text should go until 2:45