Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow passing raw samples as input. #19

Merged
merged 3 commits into from
Nov 30, 2017

Conversation

harrynull
Copy link
Contributor

@harrynull harrynull commented Nov 30, 2017

Fixes #8 .

@saurabhshri
Copy link
Owner

Hello @harrynull, excellent work! :) Looks perfect to me. Have you tested it by running it with a raw file?

@saurabhshri saurabhshri merged commit b1bed6b into saurabhshri:master Nov 30, 2017
@harrynull
Copy link
Contributor Author

Not yet, because CCAligner didn't work in Windows at the time I did it, and I also didn't have raw file sample to test it. But I will test it later if you didn't.

@saurabhshri
Copy link
Owner

@harrynull I am sending you a raw file in Slack DM. Please test it, I don't have a windows machine to try this.

@@ -11,7 +11,7 @@ const std::string currentTime()
time_t now = time(0);
struct tm tstruct = * localtime(&now);
std::string localTime;
localTime.resize(19); //len(%d-%m-%Y-%H-%M-%S)
localTime.resize(32); //len(%d-%m-%Y-%H-%M-%S)
Copy link
Owner

@saurabhshri saurabhshri Dec 2, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@harrynull Any specific reason, why this was changed? The string length is exact 19 characters?

It leads to

logPath             : tempFiles/02-12-2017-11-49-42.log
phonemeLogPath      : tempFiles/phoneme-02-12-2017-11-49-42.log

getting changed to :

logPath             : tempFiles/02-12-2017-11-52-03�������������.log
phonemeLogPath      : tempFiles/phoneme-02-12-2017-11-52-03�������������.log

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@saurabhshri I don't know why it works in Linux, but you need at least 19+1(\0)==20 bytes to store the result.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@harrynull C++ strings do not need to end in NUL character :)

Unlike character array, which is simply an array of characters terminated by a NUL character, a string is a class which defines objects that be represented as stream of characters.

See the "String Length and Accessing Individual Elements" section at https://www.cprogramming.com/tutorial/string.html

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.

2 participants