Skip to content

please_tap audio #154

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ apply plugin: 'com.android.application'
android {

compileSdkVersion rootProject.ext.rtCompileSdkVersion
buildToolsVersion rootProject.ext.rtBuildToolsVersion
defaultConfig {
applicationId "cmu.xprize.robotutor"
minSdkVersion rootProject.ext.rtMinSdkVersion
Expand Down Expand Up @@ -85,12 +84,8 @@ android {
}

repositories {
google()
mavenCentral()
// Added the custom Maven repository for utilcode
maven {
url 'http://maven.xdja.com:8081/nexus3/repository/aliyun/'
}

}

dependencies {
Expand Down Expand Up @@ -136,7 +131,7 @@ dependencies {
implementation project(path: ':comp_intervention')

// Dependency resolved from custom Maven repository
implementation 'com.blankj:utilcode:1.24.4'
implementation 'com.blankj:utilcode:1.30.7'

// External libraries
implementation 'com.github.RoboTutorLLC:ScreenRecordHelper:1.0.0'
Expand Down
59 changes: 29 additions & 30 deletions app/src/main/assets/tutors/bubble_pop/animator_graph.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"COMMENT": "When module is complete - move to next scene in the scenegraph",
"maptype":"moduleMap",
"mapname": "USERINPUT",
"preenter": [],
"preenter": ["SHOW_TOAST"],
"preexit": [],
"edges": [
{
Expand Down Expand Up @@ -160,14 +160,11 @@
{"name": "LOG_EVENT", "type": "QUEUEDCOMMAND", "id": "SBubblePop", "method": "logState", "parms": "type#node,value#INTROSTATE:String", "features":""},

{"type": "AUDIO", "command": "PLAY", "soundsource": "{{SBubblePop.sound_track}}", "soundpackage":"tutor_effect", "repeat":true, "volume": 0.10, "mode":"event", "features": ""},
{"type": "AUDIO", "command": "PLAY", "soundsource": "Please tap on it.mp3", "soundpackage":"default", "volume": 0.7, "mode":"flow", "features": ""}
{"type": "AUDIO", "command": "PLAY", "soundsource": "Please tap.mp3", "soundpackage":"default", "volume": 0.7, "mode":"flow", "features": ""}
]
},

// Here we manage the Stimulus display.
// We are either going to Speak the Stimulus / Show the Stimulus / Both or Neither -

// JUDITH trigger the hesitation here...
"UPDATESTIMULUS": {
"type": "MODULE",
"reuse":true,
Expand All @@ -176,7 +173,6 @@

{"type": "COMMAND", "id": "SBubblePop", "method": "postEvent", "parms": "SHOW_STIMULUS:String" , "features":"FTR_SHOW"},

// ND_SCAFFOLD NEXT(1) make sure to check for correct features
{"type": "AUDIO", "command": "PLAY", "soundsource": "{{SBubblePop.questValue}}.mp3", "soundpackage":"missing_number", "volume": 1.0, "mode":"event", "features": "FTR_SAY&FTR_MIS_NUM"},
{"type": "AUDIO", "command": "PLAY", "soundsource": "{{SBubblePop.questValue}}.mp3", "soundpackage":"missing_number", "volume": 1.0, "mode":"event", "features": "FTR_SAY&FTR_GT_LT"},
{"type": "AUDIO", "command": "PLAY", "soundsource": "Neno gani huanza na.mp3", "soundpackage":"xprize", "volume": 1.0, "mode":"flow", "features": "FTR_SAY&FTR_WORDS&FTR_WORD_STARTS_WITH"},
Expand All @@ -199,11 +195,6 @@
{"type": "AUDIO", "command": "PLAY", "soundsource": "{{SBubblePop.questValueTens}}.mp3", "soundpackage":"numbers", "volume": 1.0, "mode":"flow", "features": "FTR_SAY&FTR_N2E&FTR_QUEST_TENS"},


//{"type": "COMMAND", "id": "SBubblePop", "method": "setVolatileBehavior", "parms": "STIMULUS_SHOWN:String|NEXTNODE:String" , "features":"FTR_SHOW&!(FTR_SAY&(FTR_E2N|FTR_WORD_STARTS_WITH|FTR_WORD_ENDS_WITH|FTR_GT_LT|FTR_QUEST_HUNDREDS|FTR_WORDS))"},

//If we are showing it we have to wait for the animation to complete before continuing
//Only wait for non expression or short numbers (without hundreds) which are spoken
// {"type": "COMMAND", "id": "SBubblePop", "method": "setVolatileBehavior", "parms": "STIMULUS_SHOWN:String|NEXTNODE:String" , "features":"FTR_SHOW&FTR_SAY&FTR_LETTERS"},

{"type": "COMMAND", "id": "SBubblePop", "method": "postEvent", "parms": "SHOW_BUBBLES:String" ,"features":""}

Expand All @@ -222,6 +213,15 @@
{"type": "COMMAND", "cmd": "WAIT" }
]
},
"PLAY_PROMPT": {
"type": "AUDIO",
"command": "PLAY",
"soundsource": "Please tap on it.mp3",
"soundpackage": "default",
"volume": 0.7,
"mode": "flow",
"features": ""
},


"PLAYCORRECT": {
Expand Down Expand Up @@ -249,18 +249,6 @@
{"type": "AUDIO", "command": "PLAY", "soundsource": "{{SBubblePop.ansValueHundreds}}.mp3", "soundpackage":"numbers", "volume": 1.0, "mode":"flow", "features": "FTR_E2N&FTR_ANS_HUNDREDS"},
{"type": "AUDIO", "command": "PLAY", "soundsource": "Na.mp3", "soundpackage":"xprize", "volume": 1.0, "mode":"flow", "features": "FTR_E2N&FTR_ANS_HUNDREDS&FTR_ANS_TENS"},
{"type": "AUDIO", "command": "PLAY", "soundsource": "{{SBubblePop.ansValueTens}}.mp3", "soundpackage":"numbers", "volume": 1.0, "mode":"flow", "features": "FTR_E2N&FTR_ANS_TENS"},
// Not saying the correct answer when user gets N2E correct since it takes too long
// {"type": "AUDIO", "command": "PLAY", "soundsource": "{{SBubblePop.ansValueStimOneHundreds}}.mp3", "soundpackage":"numbers", "volume": 1.0, "mode":"flow", "features": "FTR_N2E&FTR_ANS_STIM_ONE_HUNDREDS"},
// {"type": "AUDIO", "command": "PLAY", "soundsource": "Na.mp3", "soundpackage":"numbers", "volume": 1.0, "mode":"flow", "features": "FTR_N2E&FTR_ANS_STIM_ONE_HUNDREDS"},
// {"type": "AUDIO", "command": "PLAY", "soundsource": "{{SBubblePop.ansValueStimOneTens}}.mp3", "soundpackage":"numbers", "volume": 1.0, "mode":"flow", "features": "FTR_N2E&FTR_ANS_STIM_ONE_TENS"},
// {"type": "AUDIO", "command": "PLAY", "soundsource": "Na.mp3", "soundpackage":"xprize", "volume": 1.0, "mode":"flow", "features": "FTR_N2E&FTR_ANS_STIM_ONE_TENS"},
// {"type": "AUDIO", "command": "PLAY", "soundsource": "{{SBubblePop.ansValueStimOneOnes}}.mp3", "soundpackage":"numbers", "volume": 1.0, "mode":"flow", "features": "FTR_N2E&FTR_ANS_STIM_ONE_ONES"},
// {"type": "AUDIO", "command": "PLAY", "soundsource": "{{SBubblePop.ansValueOperand}}.mp3", "soundpackage":"xprize", "volume": 1.0, "mode":"flow", "features": "FTR_N2E"},
// {"type": "AUDIO", "command": "PLAY", "soundsource": "{{SBubblePop.ansValueStimTwoHundreds}}.mp3", "soundpackage":"numbers", "volume": 1.0, "mode":"flow", "features": "FTR_N2E&FTR_ANS_STIM_TWO_HUNDREDS"},
// {"type": "AUDIO", "command": "PLAY", "soundsource": "Na.mp3", "soundpackage":"xprize", "volume": 1.0, "mode":"flow", "features": "FTR_N2E&FTR_ANS_STIM_TWO_HUNDREDS"},
// {"type": "AUDIO", "command": "PLAY", "soundsource": "{{SBubblePop.ansValueStimTwoTens}}.mp3", "soundpackage":"numbers", "volume": 1.0, "mode":"flow", "features": "FTR_N2E&FTR_ANS_STIM_TWO_TENS"},
// {"type": "AUDIO", "command": "PLAY", "soundsource": "Na.mp3", "soundpackage":"xprize", "volume": 1.0, "mode":"flow", "features": "FTR_N2E&FTR_ANS_STIM_TWO_TENS"},
// {"type": "AUDIO", "command": "PLAY", "soundsource": "{{SBubblePop.ansValueStimTwoOnes}}.mp3", "soundpackage":"numbers", "volume": 1.0, "mode":"flow", "features": "FTR_N2E&FTR_ANS_STIM_TWO_ONES"},
{"type": "AUDIO", "command": "PLAY", "soundsource": "{{SBubblePop.ansValue}}.mp3", "soundpackage":"letters", "volume": 1.0, "mode":"event", "features": "FTR_LETTERS"},
{"type": "AUDIO", "command": "PLAY", "soundsource": "{{SBubblePop.ansValue}}.mp3", "soundpackage":"shapes", "volume": 1.0, "mode":"event", "features": "FTR_SHAPES"},

Expand Down Expand Up @@ -350,10 +338,7 @@
{"type": "COMMAND", "cmd": "WAIT" ,"features":"FTR_LASTATTEMPT" },
{"type": "COMMAND", "id": "SBubblePop", "method": "postEvent", "parms": "HIDE_MASK:String" ,"features":"FTR_LASTATTEMPT"}

// TODO: is this delay required removed in 45.1
//
// {"type": "TIMER", "id":"nextDelayTimer", "startdelay":"0", "period":"50", "repeat":"false", "action":"CREATEANDSTART", "ontimer":"NEXTNODE", "features": "" },
// {"type": "COMMAND", "cmd": "WAIT" }

]
},

Expand Down Expand Up @@ -388,17 +373,31 @@
"COMMENT": "@@@@@ CActions @@@@@ ",

"PLAY_BACKINGTRACK": {"type": "AUDIO", "command": "PLAY", "soundsource": "{{SBubblePop.sound_track}}", "soundpackage":"tutor_effect", "repeat":true, "volume": 0.20, "mode":"event", "features": ""},
"PLAY_PROMPT": {"type": "AUDIO", "command": "PLAY", "soundsource": "Please tap on it.mp3", "soundpackage":"default", "volume": 0.7, "mode":"flow", "features": ""},
"PLAY_AUDIO": {
"type": "AUDIO",
"command": "PLAY",
"soundsource": "tutors/trackdata/LIBRARY/audio/en/cmu/xprize/bubble_pop/Please tap.mp3",
"soundpackage": "default",
"repeat": false,
"volume": 0.70,
"mode": "event",
"features": ""
},

"SET_VERSION":{"type": "COMMAND", "id": "Sbanner", "method": "setVersionID", "parms": "v.0.0.1:String","features":""},
"SET_DATASOURCE":{"type": "COMMAND", "id": "SBubblePop", "method": "setDataSource", "parms": "[file]bp_data.json:String","features":"!DATA_SBUBBLEPOP"},
"SET_SOUND_TRACK":{"type": "COMMAND", "id": "SBubblePop", "method": "setSoundTrack"},
"NEXT_DATASET":{"type": "COMMAND", "id": "SBubblePop", "method": "next" ,"features":""},
"SHOW_TOAST": {
"type": "COMMAND",
"id": "SBubblePop",
"method": "showToast",
"params": "Please Tap:String",
"features": ""
},



// "SET_SHOW":{"type": "COMMAND", "id": "SBubblePop", "method": "setEventBehavior" ,"features":""},

"NEXTNODE": {"type": "COMMAND", "cmd": "NEXT" },

"B5_ATTACH": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
//"language":"LANG_EN",
// "language":"LANG_EN",

"scenedata": [
{
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/assets/tutors/engine_descriptor.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

// Set the default language for the tutors
//
"language":"LANG_SW",
"language":"LANG_EN",


// This maps a "variant" i.e. arbitrary name to the tutor/featureset that define a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,17 +298,17 @@ public void setDataSource(String dataNameDescriptor) {
/**
* Chooses one track randomly out of a list kept in string.xml
*/
public void setSoundTrack() {

Resources res = getResources();
String[] sound_tracks = res.getStringArray(cmu.xprize.bp_component.R.array.sound_tracks);
Random rand = new Random();
String sound_track = sound_tracks[rand.nextInt(sound_tracks.length)];

Log.i("BPOP", "Chosen sound track: " + sound_track);

publishValue(BP_CONST.SOUND_TRACK, sound_track);
}
// public void setSoundTrack() {
//
// Resources res = getResources();
// String[] sound_tracks = res.getStringArray(cmu.xprize.bp_component.R.array.sound_tracks);
// Random rand = new Random();
// String sound_track = sound_tracks[rand.nextInt(sound_tracks.length)];
//
// Log.i("BPOP", "Chosen sound track: " + sound_track);
//
// publishValue(BP_CONST.SOUND_TRACK, sound_track);
// }


// Override in child class
Expand Down
4 changes: 2 additions & 2 deletions app/src/sample_config_files/dbg_english.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"config_version": "release_dbg",
"language_override": false,
"language_override": true,
"show_tutorversion": true,
"show_debug_launcher": true,
"language_switcher": true,
"no_asr_apps": false,
"language_feature_id": "LANG_NULL",
"language_feature_id": "LANG_EN",
"show_demo_vids": true
}
4 changes: 2 additions & 2 deletions app/src/sample_config_files/debug/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"language_override": true,
"show_tutorversion": true,
"show_debug_launcher": true,
"language_switcher": false,
"language_switcher": true,
"no_asr_apps": false,
"language_feature_id": "LANG_SW",
"language_feature_id": "LANG_EN",
"show_demo_vids": false,
"use_placement": false,
"record_audio": false,
Expand Down
4 changes: 2 additions & 2 deletions app/src/sample_config_files/release.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"config_version": "release",
"language_override": false,
"language_override": true,
"show_tutorversion": true,
"show_debug_launcher": true,
"language_switcher": true,
"no_asr_apps": false,
"language_feature_id": "LANG_NULL",
"language_feature_id": "LANG_EN",
"show_demo_vids": false
}
4 changes: 2 additions & 2 deletions app/src/sample_config_files/release_dbg.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"config_version": "release_dbg",
"language_override": false,
"language_override": true,
"show_tutorversion": true,
"show_debug_launcher": true,
"language_switcher": true,
"no_asr_apps": false,
"language_feature_id": "LANG_NULL",
"language_feature_id": "LANG_EN",
"show_demo_vids": false
}
4 changes: 2 additions & 2 deletions app/src/sample_config_files/release_dbg/config.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"config_version": "release_dbg",
"language_override": false,
"language_override": true,
"show_tutorversion": true,
"show_debug_launcher": true,
"menu_type": "CD1",
"language_switcher": true,
"no_asr_apps": false,
"language_feature_id": "LANG_NULL",
"language_feature_id": "LANG_EN",
"show_demo_vids": true
}
2 changes: 1 addition & 1 deletion app/src/sample_config_files/release_en.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"show_debug_launcher": true,
"language_switcher": true,
"no_asr_apps": false,
"language_feature_id": "LANG_SW",
"language_feature_id": "LANG_EN",
"show_demo_vids": false,
"show_helper_button": false,
"record_screen_video": true,
Expand Down
19 changes: 10 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.3'

classpath 'com.android.tools.build:gradle:7.4.2'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand All @@ -22,15 +23,9 @@ allprojects {
google()
}

dependencies {
modules {
module("com.google.android:flexbox") {
replacedBy("com.google.android.flexbox:flexbox")
}
}
}

// Global variables common to all modules
// see: http://tools.android.com/tech-docs/new-build-system/tips
//
ext {
rtCompileSdkVersion=29 //Integer
rtBuildToolsVersion="26.0.1" //String
Expand All @@ -39,17 +34,23 @@ allprojects {

// Note that using target version 22 bypasses the new run-time permissions found
// in Marshmallow 23
//
rtTargetSdkVersion=22

rtVersionCode=1

// Semantic versioning description:
// <Milestone release> <Feature Release> <Patch release> <Asset Compatibility INDEX>


rtVersionName="3.5.0.1"
//TODO: move this out of build so we don't have to rebuild to unzip assets

}
}

task clean(type: Delete) {
delete rootProject.buildDir
}


3 changes: 0 additions & 3 deletions comp_akira/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@ apply plugin: 'com.android.library'

android {
compileSdkVersion rootProject.ext.rtCompileSdkVersion
buildToolsVersion rootProject.ext.rtBuildToolsVersion

defaultConfig {
minSdkVersion rootProject.ext.rtMinSdkVersion
targetSdkVersion rootProject.ext.rtTargetSdkVersion
versionCode rootProject.ext.rtVersionCode
versionName rootProject.ext.rtVersionName
}

buildTypes {
Expand Down
5 changes: 1 addition & 4 deletions comp_ask/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@ apply plugin: 'com.android.library'

android {
compileSdkVersion rootProject.ext.rtCompileSdkVersion
buildToolsVersion rootProject.ext.rtBuildToolsVersion

defaultConfig {
minSdkVersion rootProject.ext.rtMinSdkVersion
targetSdkVersion rootProject.ext.rtTargetSdkVersion
versionCode rootProject.ext.rtVersionCode
versionName rootProject.ext.rtVersionName
}

buildTypes {
Expand All @@ -21,7 +18,7 @@ android {

dependencies {
api fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('androidx.test.espresso:espresso-core:3.1.0', {
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'androidx.appcompat:appcompat:1.0.0'
Expand Down
3 changes: 0 additions & 3 deletions comp_banner/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ android {
defaultConfig {
minSdkVersion rootProject.ext.rtMinSdkVersion
targetSdkVersion rootProject.ext.rtTargetSdkVersion
versionCode rootProject.ext.rtVersionCode
versionName rootProject.ext.rtVersionName
}

buildTypes {
Expand All @@ -25,7 +23,6 @@ android {
// if true, only report errors
ignoreWarnings true
}
buildToolsVersion '27.0.3'
}

dependencies {
Expand Down
Loading