Advertisement
Guest User

Untitled

a guest
Apr 7th, 2020
272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.71 KB | None | 0 0
  1. PlaySource tellPreparations() {
  2.       if (parameters.getPreparationTexts().length == 0)
  3.          return PlaySource.speechSynthesis("");
  4.  
  5.       List<PlaySource> playSourceList = new ArrayList<PlaySource>();
  6.       for (int i = 0; i < parameters.getPreparationTexts().length; i++) {
  7.          playSourceList.add(urls(String.format("%sprep.wav", PREP_PATH)));
  8.          playSourceList.add(urls(String.format("%s%s-start.wav", PREP_PATH, parameters.getPreparationTexts()[i])));
  9.          playSourceList.add(urls(String.format("%s%s.wav", PREP_PATH, parameters.getPreparationTexts()[i])));
  10.       }
  11.       PlaySource[] playSources = playSourceList.toArray(new PlaySource[0]);
  12.  
  13.       return PlaySource.sequence(playSources);
  14.    }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement