readbeyond / aeneas

aeneas is a Python/C library and a set of tools to automagically synchronize audio and text (aka forced alignment)
http://www.readbeyond.it/aeneas/
GNU Affero General Public License v3.0
2.49k stars 228 forks source link

Aeneas and ConversionSyntax error #282

Open anonap31 opened 2 years ago

anonap31 commented 2 years ago

I'm trying to run a function that someone else wrote (and left no documentation). I'm running into an error with aeneas on Colab and my local machine though. I can't find existing issues on here that might be helpful; I've already checked for slashes in the string which might cause ConversionSyntax errors - there are none. Can somebody help me out?

This is the error message: `Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/aeneas/executetask.py", line 199, in _execute_single_level_task (head_length, process_length, tail_length) = self._compute_head_process_tail(real_wave_mfcc) File "/usr/local/lib/python3.7/dist-packages/aeneas/executetask.py", line 472, in _compute_head_process_tail head_length = self.task.configuration["i_a_head"] File "/usr/local/lib/python3.7/dist-packages/aeneas/configuration.py", line 140, in getitem return self._cast(key, self.data[key]) File "/usr/local/lib/python3.7/dist-packages/aeneas/configuration.py", line 155, in _cast return self.typeskey decimal.InvalidOperation: [<class 'decimal.ConversionSyntax'>]

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "", line 23, in createFile ExecuteTask(task).execute() File "/usr/local/lib/python3.7/dist-packages/aeneas/executetask.py", line 182, in execute self._execute_single_level_task() File "/usr/local/lib/python3.7/dist-packages/aeneas/executetask.py", line 225, in _execute_single_level_task self._step_failure(exc) File "/usr/local/lib/python3.7/dist-packages/aeneas/executetask.py", line 129, in _step_failure self.log_exc(u"Unexpected error while executing task", exc, True, ExecuteTaskExecutionError) File "/usr/local/lib/python3.7/dist-packages/aeneas/logger.py", line 351, in log_exc raise raise_type(raise_message) aeneas.executetask.ExecuteTaskExecutionError: Unexpected error while executing task : [<class 'decimal.ConversionSyntax'>]

InvalidOperation Traceback (most recent call last) /usr/local/lib/python3.7/dist-packages/aeneas/executetask.py in _execute_single_level_task(self) 198 self._step_begin(u"compute head tail") --> 199 (head_length, process_length, tail_length) = self._compute_head_process_tail(real_wave_mfcc) 200 real_wave_mfcc.set_head_middle_tail(head_length, process_length, tail_length)


9 frames


/usr/local/lib/python3.7/dist-packages/aeneas/executetask.py in _compute_head_process_tail(self, audio_file_mfcc) 471 """ --> 472 head_length = self.task.configuration["i_a_head"] 473 process_length = self.task.configuration["i_a_process"]

/usr/local/lib/python3.7/dist-packages/aeneas/configuration.py in getitem(self, key) 139 if key in self.data: --> 140 return self._cast(key, self.data[key]) 141 else:

/usr/local/lib/python3.7/dist-packages/aeneas/configuration.py in _cast(self, key, value) 154 else: --> 155 return self.typeskey 156 return value

InvalidOperation: [<class 'decimal.ConversionSyntax'>]

During handling of the above exception, another exception occurred:

ExecuteTaskExecutionError Traceback (most recent call last)

in () ----> 1 createFile('214') in createFile(id) 66 logging.exception( 67 'Something went wrong creating json for ' + id + '\n\n') ---> 68 raise e in createFile(id) 21 22 # process Task ---> 23 ExecuteTask(task).execute() 24 25 # output sync map to file /usr/local/lib/python3.7/dist-packages/aeneas/executetask.py in execute(self) 180 self._execute_multi_level_task() 181 else: --> 182 self._execute_single_level_task() 183 self.log(u"Executing task... done") 184 /usr/local/lib/python3.7/dist-packages/aeneas/executetask.py in _execute_single_level_task(self) 223 self.log(u"Executing single level task... done") 224 except Exception as exc: --> 225 self._step_failure(exc) 226 227 def _execute_multi_level_task(self): /usr/local/lib/python3.7/dist-packages/aeneas/executetask.py in _step_failure(self, exc) 127 self.log_crit(u"STEP %d (%s) FAILURE" % (self.step_index, self.step_label)) 128 self.step_index += 1 --> 129 self.log_exc(u"Unexpected error while executing task", exc, True, ExecuteTaskExecutionError) 130 131 def _step_total(self): /usr/local/lib/python3.7/dist-packages/aeneas/logger.py in log_exc(self, message, exc, critical, raise_type) 349 if exc is not None: 350 raise_message = u"%s : %s" % (message, exc) --> 351 raise raise_type(raise_message) 352 353 def log(self, message): `
ozdefir commented 2 years ago

Which options do you use in the command line? It looks like aeneas got confused while parsing them. I would double-check the syntax, especially the punctuation.

On Tue, 8 Feb 2022, 08:02 anonap31, @.***> wrote:

I'm trying to run a function that someone else wrote (and left no documentation). I'm running into an error with aeneas on Colab and my local machine though. I can't find existing issues on here that might be helpful; I've already checked for slashes in the string which might cause ConversionSyntax errors - there are none. Can somebody help me out?

This is the error message: `Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/aeneas/executetask.py", line 199, in _execute_single_level_task (head_length, process_length, tail_length) = self._compute_head_process_tail(real_wave_mfcc) File "/usr/local/lib/python3.7/dist-packages/aeneas/executetask.py", line 472, in _compute_head_process_tail head_length = self.task.configuration["i_a_head"] File "/usr/local/lib/python3.7/dist-packages/aeneas/configuration.py", line 140, in getitem return self._cast(key, self.data[key]) File "/usr/local/lib/python3.7/dist-packages/aeneas/configuration.py", line 155, in _cast return self.typeskey http://value decimal.InvalidOperation: [<class 'decimal.ConversionSyntax'>]

During handling of the above exception, another exception occurred: Traceback (most recent call last): File "", line 23, in createFile ExecuteTask(task).execute() File "/usr/local/lib/python3.7/dist-packages/aeneas/executetask.py", line 182, in execute self._execute_single_level_task() File "/usr/local/lib/python3.7/dist-packages/aeneas/executetask.py", line 225, in _execute_single_level_task self._step_failure(exc) File "/usr/local/lib/python3.7/dist-packages/aeneas/executetask.py", line 129, in _step_failure self.log_exc(u"Unexpected error while executing task", exc, True, ExecuteTaskExecutionError) File "/usr/local/lib/python3.7/dist-packages/aeneas/logger.py", line 351, in log_exc raise raise_type(raise_message) aeneas.executetask.ExecuteTaskExecutionError: Unexpected error while executing task : [<class 'decimal.ConversionSyntax'>]

InvalidOperation Traceback (most recent call last) /usr/local/lib/python3.7/dist-packages/aeneas/executetask.py in _execute_single_level_task(self) 198 self._step_begin(u"compute head tail") --> 199 (head_length, process_length, tail_length) = self._compute_head_process_tail(real_wave_mfcc) 200 real_wave_mfcc.set_head_middle_tail(head_length, process_length, tail_length)

9 frames

/usr/local/lib/python3.7/dist-packages/aeneas/executetask.py in _compute_head_process_tail(self, audio_file_mfcc) 471 """ --> 472 head_length = self.task.configuration["i_a_head"] 473 process_length = self.task.configuration["i_a_process"]

/usr/local/lib/python3.7/dist-packages/aeneas/configuration.py in getitem(self, key) 139 if key in self.data: --> 140 return self._cast(key, self.data[key]) 141 else:

/usr/local/lib/python3.7/dist-packages/aeneas/configuration.py in _cast(self, key, value) 154 else: --> 155 return self.typeskey http://value 156 return value

InvalidOperation: [<class 'decimal.ConversionSyntax'>]

During handling of the above exception, another exception occurred:

ExecuteTaskExecutionError Traceback (most recent call last) in () ----> 1 createFile('214')

in createFile(id) 66 logging.exception( 67 'Something went wrong creating json for ' + id + '\n\n') ---> 68 raise e

in createFile(id) 21 22 # process Task ---> 23 ExecuteTask(task).execute() 24 25 # output sync map to file

/usr/local/lib/python3.7/dist-packages/aeneas/executetask.py in execute(self) 180 self._execute_multi_level_task() 181 else: --> 182 self._execute_single_level_task() 183 self.log(u"Executing task... done") 184

/usr/local/lib/python3.7/dist-packages/aeneas/executetask.py in _execute_single_level_task(self) 223 self.log(u"Executing single level task... done") 224 except Exception as exc: --> 225 self._step_failure(exc) 226 227 def _execute_multi_level_task(self):

/usr/local/lib/python3.7/dist-packages/aeneas/executetask.py in _step_failure(self, exc) 127 self.log_crit(u"STEP %d (%s) FAILURE" % (self.step_index, self.step_label)) 128 self.step_index += 1 --> 129 self.log_exc(u"Unexpected error while executing task", exc, True, ExecuteTaskExecutionError) 130 131 def _step_total(self):

/usr/local/lib/python3.7/dist-packages/aeneas/logger.py in log_exc(self, message, exc, critical, raise_type) 349 if exc is not None: 350 raise_message = u"%s : %s" % (message, exc) --> 351 raise raise_type(raise_message) 352 353 def log(self, message): `

— Reply to this email directly, view it on GitHub https://github.com/readbeyond/aeneas/issues/282, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADQ2QSTWVUVDSZ2J3GHQ6VDU2CPWDANCNFSM5NZL5ECA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

anonap31 commented 2 years ago

Which options do you use in the command line? It looks like aeneas got confused while parsing them. I would double-check the syntax, especially the punctuation.

What do you mean by options?

ozdefir commented 2 years ago

Options like "is_audio_file_head_length". That's what aeneas thinks causes the problem.