Send voice file from Nvidia Orin to horn speaker #570
-
I have Nvidia Orin and running AI for some detections. Like to send a voice file to horn speakr(AXIS C1310-E Network Horn Speaker) from Orin device. How can I do that? Can I send using curl or need to use SDK? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
This automatically generated reply acts as a friendly reminder. Answers to your questions will most often come from the community, from developers like yourself. You will, from time to time, find that Axis employees answers some of the questions, but this is not a guarantee. Think of the discussion forum as a complement to other support channels, not a replacement to any of them. If your question remains unanswered for a period of time, please revisit it to see whether it can be improved by following the guidelines listed in Axis support guidelines. |
Beta Was this translation helpful? Give feedback.
-
Hi @nyanmn , Adding a Python snippet for your reference to work with Google TTSimport requests
from requests.auth import HTTPDigestAuth
# Import the required module for text
# to speech conversion
from gtts import gTTS
# This module is imported so that we can
# play the converted audio
import os
# The text that you want to convert to audio
mytext = 'Welcome to Axis Audio!'
# Language in which you want to convert
language = 'en'
# Passing the text and language to the engine,
# here we have marked slow=False. Which tells
# the module that the converted audio should
# have a high speed
myobj = gTTS(text=mytext, lang=language, slow=False)
url = "http://192.168.50.235/axis-cgi/audio/transmit.cgi"
headers = {
'Content-Type': 'audio/axis-mulaw-128'
}
response = requests.request("POST", url, headers=headers, data=myobj,verify=False,auth=HTTPDigestAuth('root','pass'))
print(response.text) Update (12-04-2024): |
Beta Was this translation helpful? Give feedback.
Adding a snippet which I tested with AXIS C1310-E Mk II Network Horn Speaker AXIS OS version 11.6.92:
Audio file used (Rename and save as s1.wav):
s1_nename_as_wav.txt
Python code: