Skip to content

Conversation

@sih4sing5hong5
Copy link
Contributor

utils/scoring/wer_per_spk_details.pl deals with STDIN, STDOUT and $ARGV[0], three I/Os.
The origin script set STDIN ad STDOUT only.

binmode STDIN, ":utf8";
binmode STDOUT, ":utf8";

So $ARGV[0] should be set.
The code use open qw(:std :encoding(UTF-8)); was copied from stackoverflow.

PS: I found this problem because I got the warnings below:

Use of uninitialized value $SPK in hash element at utils/scoring/wer_per_spk_details.pl line 118, <STDIN> line 4.
Use of uninitialized value $SPK in hash element at utils/scoring/wer_per_spk_details.pl line 119, <STDIN> line 4.
Use of uninitialized value $SPK in hash element at utils/scoring/wer_per_spk_details.pl line 120, <STDIN> line 4.
Use of uninitialized value $SPK in hash element at utils/scoring/wer_per_spk_details.pl line 121, <STDIN> line 4.
Use of uninitialized value $SPK in hash element at utils/scoring/wer_per_spk_details.pl line 122, <STDIN> line 4.
...

@jtrmal
Copy link
Contributor

jtrmal commented Oct 28, 2016

So, if I understand, you have unicode characters in the utt2spk?
Thanks for the fix!
y.

On Fri, Oct 28, 2016 at 4:08 AM, 薛丞宏 notifications@github.com wrote:

utils/scoring/wer_per_spk_details.pl deals with STDIN, STDOUT and $ARGV[0],
three I/Os.
The origin script set STDIN ad STDOUT only.

binmode STDIN, ":utf8";
binmode STDOUT, ":utf8";

So $ARGV[0] should be set.
The code use open qw(:std :encoding(UTF-8)); was copied from stackoverflow
http://stackoverflow.com/a/14566813/3640653.

PS: I found this problem because I got the warnings below:

Use of uninitialized value $SPK in hash element at utils/scoring/wer_per_spk_details.pl line 118, line 4.
Use of uninitialized value $SPK in hash element at utils/scoring/wer_per_spk_details.pl line 119, line 4.
Use of uninitialized value $SPK in hash element at utils/scoring/wer_per_spk_details.pl line 120, line 4.
Use of uninitialized value $SPK in hash element at utils/scoring/wer_per_spk_details.pl line 121, line 4.
Use of uninitialized value $SPK in hash element at utils/scoring/wer_per_spk_details.pl line 122, line 4.
...


You can view, comment on, or merge this pull request online at:

#1149
Commit Summary

  • wer_per_spk_details.pl support that utt2spk contains unicode

File Changes

Patch Links:


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#1149, or mute the thread
https://github.com/notifications/unsubscribe-auth/AKisXwV4LWOrOH3CiIzN5miwySdn_izCks5q4a17gaJpZM4KjLpY
.

@sih4sing5hong5
Copy link
Contributor Author

Yes, some speaker names contain unicode chars.

@jtrmal
Copy link
Contributor

jtrmal commented Oct 31, 2016

@danpovey I guess this is fine to commit -- I'd never assumed that spk labels would contain unicode.

@danpovey danpovey merged commit 7de64a5 into kaldi-asr:master Oct 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants