How to specify phonetic keywords for IBM Watson speech2text service?

馋奶兔 提交于 2019-12-12 05:06:16

问题


While we have had good success with Bluemix Java SDK in the general case, we've bumped into problems while trying to recognize occasional non-English words (e.g., foreign last names). Our hope was that one could specify the keyword list using SPR phonetic notation (which works great for text2speech), but that does not seem to be supported for speech2text. Any suggestions/workarounds?

SpeechToText service = new SpeechToText();
service.setUsernameAndPassword("USERNAME", "PASSWORD");

File audio = new File("C:\\Users\\AudioFiles\\euler.wav");    

RecognizeOptions options = new RecognizeOptions().Builder()
  .contentType(HttpMediaType.AUDIO_WAV)
  .continuous(true)
  .inactivityTimeout(500)
  .keywords({"Agarwal", "Euler", "Qin"})
  .keywordsThreshold(0.5)
  .build();

  SpeechResults transcript = service.recognize(audio, options);
  System.out.println(transcript);

The objective is to be able say "My name is John Euler." and for the transcript not to return something like "My name is John Oyler." (which is what it does currently).

Thx.


回答1:


Hmm, the three words that you pass are actually in the vocabulary, but maybe they are not found because they have very little weight in the language model. Have you tried relaxing the threshold? You can also try to use the Watson STT customization service to boost probabilities of names if the task is name focused



来源:https://stackoverflow.com/questions/39756797/how-to-specify-phonetic-keywords-for-ibm-watson-speech2text-service

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!