Skip to content

Send voice file from Nvidia Orin to horn speaker #570

Closed Answered by vivekatoffice
nyanmn asked this question in General
Discussion options

You must be logged in to vote

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:

import requests
from requests.auth import HTTPDigestAuth


def send_audio_to_axis(file_path, axis_speaker_ip):
    # Generate audio file from text using gTTS
    # Prepare the URL and files
    url = f"http://{axis_speaker_ip}/axis-cgi/audio/transmit.cgi"
    files = {'audio': open(file_path, 'rb')}
    headers = {
                'Content-Type': 'audio/basic'
            }
    # Send the request
    response = requests.post(url,files=files,headers=headers,verify=False,auth=HTTPDigestAuth('root','pass'))

    #…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@vivekatoffice
Comment options

@vivekatoffice
Comment options

Answer selected by vivekatoffice
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants