force_align.py (TypeError: a bytes-like object is required, not 'str')
- Dominant language
- C++
- Stars
- 768
- Forks
- 164
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
we are trying to run force_align after using the fast_align, the fast_align is working fine and we get the model.
After running force_align, we get Traceback (most recent call last):
File "/home/christine/fast_align/build/force_align.py", line 93, in
main()
File "/home/christine/fast_align/build/force_align.py", line 87, in main
sys.stdout.write('{}\n'.format(aligner.align(line.strip())))
File "/home/christine/fast_align/build/force_align.py", line 30, in align
self.fwd_align.stdin.write('{}\n'.format(line))
TypeError: a bytes-like object is required, not 'str'
we are running on python 3.6.9.
we do not know where the problem can be from, we are using the right format of sentence:
The mechanic gave the clerk a present because it was his birthday. ||| La mecánica dio al Cirque durargo, porque era su cumpleaños.
please advise!!
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with force_align.py at lines 30, 87, and 93, then reproduce the Python 3.6.9 run using the sentence format shown in the report. Inspect how the aligner's standard-input stream is written and verify that force_align completes without the reported TypeError and produces alignment output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100