MontrealCorpusTools / PolyglotDB

Language data store and linguistic query API
MIT License
39 stars 14 forks source link

Using the extract formants functionality, resetting the corpus #182

Open stcoats opened 9 months ago

stcoats commented 9 months ago

I have set up PolyglotDB and can get the first few tutorials working, for the most part, but have not had success in extracting formants. The code fails at

with CorpusContext(corpus_name) as c:
    c.config.praat_path = "/usr/local/bin/praat_barren"
    c.analyze_formant_points(vowel_label='vowel', call_back=print)

which results in

File ~/myenv/lib/python3.11/site-packages/polyglotdb/acoustics/segments.py:42, in generate_segments(corpus_context, annotation_type, subset, file_type, duration_threshold, padding, fetch_subannotations)
     40 discourse = r['d']['name']
     41 if file_type == 'vowel':
---> 42     file_path = r['d']['vowel_file_path']
     43 elif file_type == 'low_freq':
     44     file_path = r['d']['low_freq_file_path']

KeyError: 'vowel_file_path'

It seemed that maybe a few of the textgrid-wav pairs I put in the default corpus were not correctly processed, resulting in an empty vowel_file_path, so I have tried to reset the corpus with

with CorpusContext(corpus_name) as c:
    c.reset()

But this results in

File ~/myenv/lib/python3.11/site-packages/influxdb/resultset.py:25, in ResultSet.__init__(self, series, raise_errors)
     22 self._error = self._raw.get('error', None)
     24 if self.error is not None and raise_errors is True:
---> 25     raise InfluxDBClientError(self.error)

InfluxDBClientError: open /home/centos/Downloads/polyglot/stuff/influxdb/meta/meta.dbtmp: no such file or directory

Any tips you might have would be appreciated!

msonderegger commented 4 months ago

Hello @stcoats -- sorry for radio silence. There is a developer working on polyglotdb now. Do you still have this issue?

stcoats commented 4 months ago

Hi @msonderegger, thanks for the reply, in the meantime I am working on something completely different, so the issue can be closed, if it's okay with you. I will open a new issue when I come back to this!