Hello @PINTO0309, this is not really an issue, your code works fine for me. I am running SingleStickSSDwithRealSense_OpenVINO_NCS2.py. And I want to convert the detected results and distance into audio output using gTTS for every class_id that has been detected.
However, I have tried inserting the below code at line 104:
description = '{} is ahead in {} meteres away, proceed with caution'.format(class_id, round(meters,2))`
tts = gTTS(description, lang='en')
tts.save('tts.mp3')
tts = AudioSegment.from_mp3("tts.mp3")
subprocess.call(["ffplay", "-nodisp", "-autoexit", "tts.mp3"])
i.e., after
label_text = LABELS[int(class_id)] + " (" + str(percentage) + "%)"+ " {:.2f}".format(meters) + " meters away"
only to be encountered with
TabError: inconsistent use of tabs and spaces in indentation
Kindly help me with it. I am very new to coding.
Thanks in advance.
Hello @PINTO0309, this is not really an issue, your code works fine for me. I am running SingleStickSSDwithRealSense_OpenVINO_NCS2.py. And I want to convert the detected results and distance into audio output using gTTS for every class_id that has been detected. However, I have tried inserting the below code at line 104:
i.e., after
label_text = LABELS[int(class_id)] + " (" + str(percentage) + "%)"+ " {:.2f}".format(meters) + " meters away"
only to be encountered withTabError: inconsistent use of tabs and spaces in indentation
Kindly help me with it. I am very new to coding. Thanks in advance.