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.
imo this constructor deserves to have a java doc, with a brief description of these parameters.. you can take from specification document.
| 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.
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.
can we add atleast code in this error msg
or if it would make sense then print complete paramters
| 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.
is there a reason why 60 is hardcoded here?
There was a problem hiding this comment.
that is my bad. I added it for test purposes and forgot to revert
| this.lang = lang; | ||
| this.input = input; | ||
| this.minNumber = numberOfDigits; | ||
| this.maxNumber = numberOfDigits; |
There was a problem hiding this comment.
can we add a code comment here why we are assigning both members same incoming value
There was a problem hiding this comment.
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.
thanks @YevgenL as i suggested in my initial comment, can we add this explanation as comment so its helpful for code reader?
| this.lang = lang; | ||
| this.input = input; | ||
| this.minNumber = numberOfDigits; | ||
| this.maxNumber = numberOfDigits; |
There was a problem hiding this comment.
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.
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);
No description provided.