Esempio n. 1
0
 /**
  * Pour lire un texte court (sans ponctuation) à voix haute
  *
  * @param text, chaîne de caractères à lire à voix haute
  */
 public void playShortText(String text) {
   if (!on) return;
   an = new Analyser(text, prosodie);
   Vector<Phoneme> listePhonemes = an.analyserGroupes();
   s =
       new SynthetiseurMbrola(
           lt.getVoix(),
           ConfigFile.rechercher("REPERTOIRE_PHO_WAV"),
           ConfigFile.rechercher("FICHIER_PHO_WAV"));
   s.play();
   sjoue = true;
 }
Esempio n. 2
0
 // appelé par loopText et playText avec valeur flagloop différente
 public void play(String text, boolean flagloop) {
   if (!on) return;
   an = new Analyser(text, prosodie);
   Vector<Phoneme> listePhonemes = an.analyserGroupes();
   s =
       new SynthetiseurMbrola(
           lt.getVoix(),
           ConfigFile.rechercher("REPERTOIRE_PHO_WAV"),
           ConfigFile.rechercher("FICHIER_PHO_WAV"));
   // System.out.println("RAPIDITE: "+ConfigFile.rechercher("RAPIDITE"));
   if (flagloop) s.loop();
   else s.play();
   sjoue = true;
 }
Esempio n. 3
0
 /**
  * Pour fixer la voix utilisée si la synthèse parle
  *
  * @param voix, de 1 à 7
  */
 public void setVoix(int voix) {
   int vox;
   int nbvoix =
       Integer.parseInt(
           ConfigFile.rechercher("NBVOIX")); // nombre de voix disponibles dans ressources
   System.out.println(nbvoix);
   vox = (voix > nbvoix) ? nbvoix : voix;
   vox = (voix < 1) ? 1 : voix;
   lt.setVoix(vox);
 }
Esempio n. 4
0
 /**
  * Constructeur pour fixer la voix
  *
  * @param voix, de 1 à 7 pour fr1, fr2, ... fr7
  */
 public SIVOXDevint(int voix) {
   int vox;
   int nbvoix = Integer.parseInt(ConfigFile.rechercher("NBVOIX")); // nombre de voix disponibles
   System.out.println(nbvoix);
   jk = null;
   sjoue = false;
   on = true;
   prosodie = 3; // la meilleure prosodie
   vox = (voix > nbvoix) ? nbvoix : voix;
   vox = (voix < 1) ? 1 : voix;
   lt.setVoix(vox);
 }