-1

I am trying to work on an Arduino bot whose job will be to just recognise voice commands given only by me. I have a Python code for it. But a line is giving me syntax error. That particular line is a print statement which goes like this print len(data), samplerate

data, samplerate = sf.read(b) #reading audio file using soundfile library

print len(data), samplerate

x= len(data)
jonrsharpe
  • 107,083
  • 22
  • 201
  • 376
Sayantan4796
  • 137
  • 1
  • 8

1 Answers1

0

If using Python3, then use:

print(len(data), samplerate)

Instead of:

print len(data), samplerate
Dipen Dadhaniya
  • 4,200
  • 2
  • 10
  • 16