/** * Add some audio items. * * @param audioItems the audio items to add * @return this builder */ public Builder addAudioItems(List<AudioItem> audioItems) { Assert.noNullValues(audioItems, mLanguage); mAudioItems.addAll(audioItems); return this; }
/** * @param parameters A list of parameters passed when invoking object. Not * null. */ public final void setParameters(List<Parameter> parameters) { Assert.noNullValues(parameters, "parameters"); mParameters = new ArrayList<Parameter>(parameters); }
public void setGrammarItems(List<? extends GrammarItem> grammarItems) { Assert.noNullValues(grammarItems, "grammarItems"); mGrammarItems = new ArrayList<GrammarItem>(grammarItems); }
/** * @param parameters A list of {@link Parameter} that will be passed to the * subdialogue. Not null. */ public final void setSubdialogueParameters(Collection<Parameter> parameters) { Assert.noNullValues(parameters, "parameters"); mParameters = new ArrayList<Parameter>(parameters); }
public void setAcknowledgeAudioItems(List<? extends AudioItem> acknowledgeAudioItems) { Assert.noNullValues(acknowledgeAudioItems, "acknowledgeAudioItems"); mAcknowledgeAudioItems = new ArrayList<AudioItem>(acknowledgeAudioItems); }
public void setAcknowledgeAudioItems(List<? extends AudioItem> acknowledgeAudioItems) { Assert.noNullValues(acknowledgeAudioItems, "acknowledgeAudioItems"); mAcknowledgeAudioItems = new ArrayList<AudioItem>(acknowledgeAudioItems); }
/** * @param speechRecognition The speech recognition configuration. * Optional. * @param dtmfRecognition The DTMF recognition configuration. Optional. * @param audioItems The list of {@link AudioItem}. Not null. */ public Prompt(SpeechRecognition speechRecognition, DtmfRecognition dtmfRecognition, List<? extends AudioItem> audioItems) { Assert.noNullValues(audioItems, "audioItems"); mAudioItems = new ArrayList<AudioItem>(audioItems); mSpeechRecognition = speechRecognition; mDtmfRecognition = dtmfRecognition; }
/** * Adds a prompt without any DTMF nor speech recognition (no barge-in). * * @param audioItems audio items to be played during this prompt. * @return this builder */ public Builder addPrompt(List<? extends AudioItem> audioItems) { Assert.noNullValues(audioItems, "audioItems"); Prompt prompt = new Prompt(audioItems); prompt.setLanguage(mLanguage); prompt.setHotWordBargeIn(mBargeInType); mPrompts.add(prompt); return this; }
/** * Adds a prompt with both DTMF and speech recognition. * * @param speechRecognition configuration for the speech recognition or * <code>null</code> to disable DTMF recognition. * @param dtmfRecognition configuration for the DTMF recognition or * <code>null</code> to disable DTMF recognition. * @param audioItems audio items to be played during this prompt. * @return this builder */ public Builder addPrompt(DtmfRecognition dtmfRecognition, SpeechRecognition speechRecognition, List<? extends AudioItem> audioItems) { Assert.noNullValues(audioItems, "audioItems"); Prompt prompt = new Prompt(speechRecognition, dtmfRecognition, audioItems); prompt.setLanguage(mLanguage); prompt.setHotWordBargeIn(mBargeInType); mPrompts.add(prompt); return this; }