-
Notifications
You must be signed in to change notification settings - Fork 215
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
Update gather-rcml documentation #2392
Conversation
|
||
public AsrSignal(String driver, String lang, List<URI> initialPrompts, String endInputKey, long maximumRecTimer, long waitingInputTimer, | ||
long timeAfterSpeech, String hotWords) { | ||
long timeAfterSpeech, String hotWords, String input, int numberOfDigits) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
imo this constructor deserves to have a java doc, with a brief description of these parameters.. you can take from specification document.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added JavaDoc
try { | ||
asrr = new String(Hex.decodeHex(asrr.toCharArray())); | ||
} catch (DecoderException e) { | ||
logger.error("asrr parameter cannot be decoded"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add atleast code in this error msg
or if it would make sense then print complete paramters
observer.tell(result, self()); | ||
} | ||
} else { | ||
logger.error("asrr parameter is missing"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add atleast code in this error msg
or if it would make sense then print complete paramters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added stacktrace output
@@ -218,8 +218,8 @@ protected void collect(final Object message) { | |||
this.lastEvent = AUMgcpEvent.aupc; | |||
} else { | |||
this.lastEvent = AsrSignal.REQUEST_ASR; | |||
signal = new AsrSignal(request.getDriver(), request.lang(), request.prompts(), request.endInputKey(), request.timeout(), request.timeout(), | |||
request.timeout(), request.getHints()); | |||
signal = new AsrSignal(request.getDriver(), request.lang(), request.prompts(), request.endInputKey(), 60, request.timeout(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a reason why 60
is hardcoded here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that is my bad. I added it for test purposes and forgot to revert
@@ -57,6 +60,9 @@ public AsrSignal(String driver, String lang, List<URI> initialPrompts, String en | |||
this.timeAfterSpeech = timeAfterSpeech; | |||
this.hotWords = hotWords; | |||
this.lang = lang; | |||
this.input = input; | |||
this.minNumber = numberOfDigits; | |||
this.maxNumber = numberOfDigits; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add a code comment here why we are assigning both members same incoming value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RMS expects two parameters but there is the only one input 'Number of Digits' in collect
in RVD for DTMF mode.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @YevgenL as i suggested in my initial comment, can we add this explanation as comment so its helpful for code reader?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment added
@@ -57,6 +60,9 @@ public AsrSignal(String driver, String lang, List<URI> initialPrompts, String en | |||
this.timeAfterSpeech = timeAfterSpeech; | |||
this.hotWords = hotWords; | |||
this.lang = lang; | |||
this.input = input; | |||
this.minNumber = numberOfDigits; | |||
this.maxNumber = numberOfDigits; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @YevgenL as i suggested in my initial comment, can we add this explanation as comment so its helpful for code reader?
try { | ||
asrr = new String(Hex.decodeHex(asrr.toCharArray())); | ||
} catch (DecoderException e) { | ||
logger.error("asrr parameter cannot be decoded: " + e.getStackTrace()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to print the stack trace of an exception using Java and Log4J we have to pass exception object as argument.
so statement would be:
logger.error("asrr parameter cannot be decoded.", e);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed
No description provided.