Hindi accent using deepspeech

@bharath.vadithya Please, can we be serious ? How do you expect me to help you ? No screenshots.

iam sorry … i guessed that the only solution to understand is to make a screenshot, so that you can understand and can be readable.

raise ValueError(‘While processing: {}\n{}’.format(series[‘wav_filename’], e))

error.zip (1.3 KB)

i think this is perfect…

Screenshots are not readable to blind people, not searchable, and hard to use on mobile.

What’s wrong with code formatting on the forum ? An attachment does not make this any easier …

@bharath.vadithya TypeError: 'str' object cannot be interpreted as an integer There’s some non-text in your dataset. Please check and remove any digit.

@lissyx … yes there are digits in my transcript. thank you so much

one last time … sorry

@lissyx here is the run error after removing all the int or non strings in my dataset

+ '[' '!' -f DeepSpeech.py ']'
+ python3 -u DeepSpeech.py --train_files minigir/miniger-train.csv --dev_files minigir/miniger-train.csv --test_files minigir/miniger-train.csv --train_batch_size 48 --dev_batch_size 40 --test_batch_size 40 --n_hidden 1024 --epochs 64 --early_stop True --es_steps 6 --es_mean_th 0.1 --es_std_th 0.1 --dropout_rate 0.30 s
Traceback (most recent call last):
  File "/home/metlife-vad/.local/lib/python3.7/site-packages/pandas/core/indexes/base.py", line 4736, in get_value
    return libindex.get_value_box(s, key)
  File "pandas/_libs/index.pyx", line 51, in pandas._libs.index.get_value_box
  File "pandas/_libs/index.pyx", line 47, in pandas._libs.index.get_value_at
  File "pandas/_libs/util.pxd", line 98, in pandas._libs.util.get_value_at
  File "pandas/_libs/util.pxd", line 83, in pandas._libs.util.validate_indexer
TypeError: 'str' object cannot be interpreted as an integer

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/metlife-vad/DeepSpeech/util/text.py", line 85, in text_to_char_array
    transcript = np.asarray(alphabet.encode(series['transcript']))
  File "/home/metlife-vad/.local/lib/python3.7/site-packages/pandas/core/series.py", line 1071, in __getitem__
    result = self.index.get_value(self, key)
  File "/home/metlife-vad/.local/lib/python3.7/site-packages/pandas/core/indexes/base.py", line 4744, in get_value
    raise e1
  File "/home/metlife-vad/.local/lib/python3.7/site-packages/pandas/core/indexes/base.py", line 4730, in get_value
    return self._engine.get_value(s, k, tz=getattr(series.dtype, "tz", None))
  File "pandas/_libs/index.pyx", line 80, in pandas._libs.index.IndexEngine.get_value
  File "pandas/_libs/index.pyx", line 88, in pandas._libs.index.IndexEngine.get_value
  File "pandas/_libs/index.pyx", line 131, in pandas._libs.index.IndexEngine.get_loc
  File "pandas/_libs/hashtable_class_helper.pxi", line 1607, in pandas._libs.hashtable.PyObjectHashTable.get_item
  File "pandas/_libs/hashtable_class_helper.pxi", line 1614, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'transcript'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "DeepSpeech.py", line 931, in <module>
    absl.app.run(main)
  File "/home/metlife-vad/.local/lib/python3.7/site-packages/absl/app.py", line 299, in run
    _run_main(main, args)
  File "/home/metlife-vad/.local/lib/python3.7/site-packages/absl/app.py", line 250, in _run_main
    sys.exit(main(argv))
  File "DeepSpeech.py", line 915, in main
    train()
  File "DeepSpeech.py", line 435, in train
    train_phase=True)
  File "/home/metlife-vad/DeepSpeech/util/feeding.py", line 101, in create_dataset
    df['transcript'] = df.apply(text_to_char_array, alphabet=Config.alphabet, result_type='reduce', axis=1)
  File "/home/metlife-vad/.local/lib/python3.7/site-packages/pandas/core/frame.py", line 6928, in apply
    return op.get_result()
  File "/home/metlife-vad/.local/lib/python3.7/site-packages/pandas/core/apply.py", line 186, in get_result
    return self.apply_standard()
  File "/home/metlife-vad/.local/lib/python3.7/site-packages/pandas/core/apply.py", line 292, in apply_standard
    self.apply_series_generator()
  File "/home/metlife-vad/.local/lib/python3.7/site-packages/pandas/core/apply.py", line 321, in apply_series_generator
    results[i] = self.f(v)
  File "/home/metlife-vad/.local/lib/python3.7/site-packages/pandas/core/apply.py", line 112, in f
    return func(x, *args, **kwds)
  File "/home/metlife-vad/DeepSpeech/util/text.py", line 91, in text_to_char_array
    raise ValueError('While processing: {}\n{}'.format(series['wav_filename'], e))
ValueError: ("While processing: /home/metlife-vad/DeepSpeech/minigir/wav/tmp.wav\n'transcript'", 'occurred at index 0')

** i got the same error… nothing changed**

Well, I’m sorry, but the error is kinda explicit. I can’t fix your dataset for you.

@lissyx so… the problem is with my dataset right ??

It looks like, yes. You need to curate it more, and I really cannot do that for you.

i have three folders : train, test and dev
of all test and dev folders are empty for now … (iam just over fitting the data) the train folder has only one csv file with row names as wav_filename,wav_filesize, transcript that’s it … all non strings are removed… apart from this what is possible… why keyerror transcript. .

Again, it’s your data, and you have the Python code, I can’t fix that for you. Have you tried a binary search on the content of your CSV to identify the line(s) that are problematic?

wav_filename,wav_filesize,transcript
/home/metlife-vad/DeepSpeech/minigir/wav/tmp.wav,2368044,very good morning this side jewel calling on behalf of pnb metlife it’s the right time to talk to you yeah sir the policy which is metsma met hundred platinum you are paying it quarterly mr praveen sir at amount of seven thousand five hundred fourty three rupees with the policy number zero zero zero one five nine four nine its a remainder call from our side and your due date is on twenty eigth of december two thousand eighteen which is on the next friday you will be paying a premium with in twenty eighth sir yeah okay may i know the mode of payment so that i can guide you reagrding that na na i make it alright i will pay it online okay you can visit our website and you can pay through online sir with the policy number okay can you can pay it on twenty eight then we will give a confirmation call after two days okay sir okay how many days does it take for it to refelect in your systems sir two days maximum aah it’s okay then call me after that after it doesnt If it doesnt get paid okay you will pay within this month right Yes Okay then we will call you regarding this when the payment is being accepted we will give you the confirmation call okay thankyou okay have a nice day sir

@lissyx actually iam stuck here, the dataset of my file on one transcription …

Can you please be explicit ? What error do you reproduce with this one-line CSV ?

i didn’t get you ! the above error is what i found after running this one-line csv

python3 -u DeepSpeech.py \

–train_files /home/metlife-vad/DeepSpeech/minigir/train/miniger-train.csv
–dev_files /home/metlife-vad/Deepspeech/minigir/train/miniger-train.csv
–test_files /home/metlife-vad/Deepspeech/minigir/train/miniger-train.csv
–train_batch_size 48
–dev_batch_size 40
–test_batch_size 40
–n_hidden 1024
–epochs 64
–early_stop True
–es_steps 6
–es_mean_th 0.1
–es_std_th 0.1
–dropout_rate 0.30
–learning_rate 0.0005
–report_count 100
–export_dir /metlife-models/
–checkpoint_dir /home/metlife-vad/Deepspeech/metlife-models/check_point
–alphabet_config_path /home/metlife-vad/metlife-models/alphabet.txt
–lm_binary_path /home/metlife-vad/Deepspeech/metlife-models/lm.binary
–lm_trie_path /home/metlife-vad/Deepspeech/metlife-models/trie \

this is my script file

I don’t see an error above.

Please check your code formatting, the script is improperly pasted. We could miss valuable informations because of that …

#!/usr/bin/env bash

set -xe
if [ ! -f DeepSpeech.py ]; then
echo “Please make sure you run this from DeepSpeech’s top level directory.”
exit 1
fi;

python3 -u DeepSpeech.py
–train_files /home/metlife-vad/DeepSpeech/minigir/train/miniger-train.csv
–dev_files /home/metlife-vad/Deepspeech/minigir/train/miniger-train.csv
–test_files /home/metlife-vad/Deepspeech/minigir/train/miniger-train.csv
–train_batch_size 48
–dev_batch_size 40
–test_batch_size 40
–n_hidden 1024
–epochs 64
–early_stop True
–es_steps 6
–es_mean_th 0.1
–es_std_th 0.1
–dropout_rate 0.30
–learning_rate 0.0005
–report_count 100
–export_dir /metlife-models/
–checkpoint_dir /home/metlife-vad/Deepspeech/metlife-models/check_point
–alphabet_config_path /home/metlife-vad/metlife-models/alphabet.txt
–lm_binary_path /home/metlife-vad/Deepspeech/metlife-models/lm.binary
–lm_trie_path /home/metlife-vad/Deepspeech/metlife-models/trie
“$@”

@bharath.vadithya This is still wrong, I’m sorry. According to what I read, it would not train at all. So we are indeed loosing valuable informations from your process. Please paste your script correctly.