mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-24 03:52:50 -06:00
now the app shows the correct abstract syntax names for unknown words while it still produces the right TTS
This commit is contained in:
@@ -148,7 +148,6 @@ public class ConversationView extends ScrollView {
|
|||||||
// unknown linearizations in output: darkest red color. But replace [ ] by spaces and remove _ for better speech synthesis
|
// unknown linearizations in output: darkest red color. But replace [ ] by spaces and remove _ for better speech synthesis
|
||||||
else if (target.toString().contains("[")) {
|
else if (target.toString().contains("[")) {
|
||||||
view.setBackgroundDrawable(getResources().getDrawable(R.drawable.second_person_worst_utterance_bg));
|
view.setBackgroundDrawable(getResources().getDrawable(R.drawable.second_person_worst_utterance_bg));
|
||||||
target = target.toString().replace('[',' ').replace(']',' ').replaceAll("_","").trim();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// parse by domain grammar, marked by +, green color
|
// parse by domain grammar, marked by +, green color
|
||||||
|
|||||||
@@ -323,6 +323,7 @@ public class MainActivity extends Activity {
|
|||||||
if (DBG) Log.d(TAG, "Speaking: " + res.first);
|
if (DBG) Log.d(TAG, "Speaking: " + res.first);
|
||||||
CharSequence text2 =
|
CharSequence text2 =
|
||||||
mConversationView.addSecondPersonUtterance(input, text, alts);
|
mConversationView.addSecondPersonUtterance(input, text, alts);
|
||||||
|
text2 = text2.toString().replace('[',' ').replace(']',' ').replaceAll("_","").trim();
|
||||||
mTts.speak(getTargetLanguageCode(), text2.toString());
|
mTts.speak(getTargetLanguageCode(), text2.toString());
|
||||||
|
|
||||||
hideProgressBar();
|
hideProgressBar();
|
||||||
|
|||||||
Reference in New Issue
Block a user