Added SpeechGenerator.java
This commit is contained in:
31
.idea/workspace.xml
generated
31
.idea/workspace.xml
generated
@@ -14,10 +14,7 @@
|
|||||||
</configurations>
|
</configurations>
|
||||||
</component>
|
</component>
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="00599d5b-7eb5-44da-ad7f-98bf42384c16" name="Changes" comment="Final update onderzoek-formulier.md">
|
<list default="true" id="00599d5b-7eb5-44da-ad7f-98bf42384c16" name="Changes" comment="Final update onderzoek-formulier.md" />
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/docs/personalDocs/Luca/literatuuronderzoek/onderzoek-formulier.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/personalDocs/Luca/literatuuronderzoek/onderzoek-formulier.md" afterDir="false" />
|
|
||||||
</list>
|
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||||
@@ -26,6 +23,7 @@
|
|||||||
<component name="ClangdSettings">
|
<component name="ClangdSettings">
|
||||||
<option name="formatViaClangd" value="false" />
|
<option name="formatViaClangd" value="false" />
|
||||||
</component>
|
</component>
|
||||||
|
<component name="ExecutionTargetManager" SELECTED_TARGET="device_and_snapshot_combo_box_target[/Users/lucawarm/.android/avd/Pixel_3a_API_34_extension_level_7_arm64-v8a.avd]" />
|
||||||
<component name="ExternalProjectsData">
|
<component name="ExternalProjectsData">
|
||||||
<projectState path="$PROJECT_DIR$">
|
<projectState path="$PROJECT_DIR$">
|
||||||
<ProjectState />
|
<ProjectState />
|
||||||
@@ -65,9 +63,6 @@
|
|||||||
<filtered-out-file-type name="COMMIT_BY_MESSAGE" />
|
<filtered-out-file-type name="COMMIT_BY_MESSAGE" />
|
||||||
</file-type-list>
|
</file-type-list>
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectColorInfo">{
|
|
||||||
"associatedIndex": 7
|
|
||||||
}</component>
|
|
||||||
<component name="ProjectId" id="2fE3N2CwEPDo9wBtexBLxU20tCJ" />
|
<component name="ProjectId" id="2fE3N2CwEPDo9wBtexBLxU20tCJ" />
|
||||||
<component name="ProjectLevelVcsManager">
|
<component name="ProjectLevelVcsManager">
|
||||||
<ConfirmationsSetting value="2" id="Add" />
|
<ConfirmationsSetting value="2" id="Add" />
|
||||||
@@ -76,18 +71,11 @@
|
|||||||
<option name="hideEmptyMiddlePackages" value="true" />
|
<option name="hideEmptyMiddlePackages" value="true" />
|
||||||
<option name="showLibraryContents" value="true" />
|
<option name="showLibraryContents" value="true" />
|
||||||
</component>
|
</component>
|
||||||
<component name="PropertiesComponent">{
|
<component name="PropertiesComponent">
|
||||||
"keyToString": {
|
<property name="RunOnceActivity.cidr.known.project.marker" value="true" />
|
||||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
<property name="cidr.known.project.marker" value="true" />
|
||||||
"git-widget-placeholder": "main",
|
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
|
||||||
"node.js.detected.package.eslint": "true",
|
</component>
|
||||||
"node.js.detected.package.tslint": "true",
|
|
||||||
"node.js.selected.package.eslint": "(autodetect)",
|
|
||||||
"node.js.selected.package.tslint": "(autodetect)",
|
|
||||||
"nodejs_package_manager_path": "npm",
|
|
||||||
"vue.rearranger.settings.migration": "true"
|
|
||||||
}
|
|
||||||
}</component>
|
|
||||||
<component name="RecentsManager">
|
<component name="RecentsManager">
|
||||||
<key name="MoveFile.RECENT_KEYS">
|
<key name="MoveFile.RECENT_KEYS">
|
||||||
<recent name="$PROJECT_DIR$/code/src/app/src/main/java/com/fitbot" />
|
<recent name="$PROJECT_DIR$/code/src/app/src/main/java/com/fitbot" />
|
||||||
@@ -148,9 +136,7 @@
|
|||||||
<option name="ACTIVITY_CLASS" value="" />
|
<option name="ACTIVITY_CLASS" value="" />
|
||||||
<option name="SEARCH_ACTIVITY_IN_GLOBAL_SCOPE" value="false" />
|
<option name="SEARCH_ACTIVITY_IN_GLOBAL_SCOPE" value="false" />
|
||||||
<option name="SKIP_ACTIVITY_VALIDATION" value="false" />
|
<option name="SKIP_ACTIVITY_VALIDATION" value="false" />
|
||||||
<method v="2">
|
<method v="2" />
|
||||||
<option name="Android.Gradle.BeforeRunTask" enabled="true" />
|
|
||||||
</method>
|
|
||||||
</configuration>
|
</configuration>
|
||||||
</component>
|
</component>
|
||||||
<component name="SharedIndexes">
|
<component name="SharedIndexes">
|
||||||
@@ -241,6 +227,7 @@
|
|||||||
</entry>
|
</entry>
|
||||||
</map>
|
</map>
|
||||||
</option>
|
</option>
|
||||||
|
<option name="oldMeFiltersMigrated" value="true" />
|
||||||
</component>
|
</component>
|
||||||
<component name="VcsManagerConfiguration">
|
<component name="VcsManagerConfiguration">
|
||||||
<MESSAGE value="Changes" />
|
<MESSAGE value="Changes" />
|
||||||
|
17
code/src/Fitbot/.idea/deploymentTargetDropDown.xml
generated
17
code/src/Fitbot/.idea/deploymentTargetDropDown.xml
generated
@@ -1,17 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="deploymentTargetDropDown">
|
|
||||||
<targetSelectedWithDropDown>
|
|
||||||
<Target>
|
|
||||||
<type value="QUICK_BOOT_TARGET" />
|
|
||||||
<deviceKey>
|
|
||||||
<Key>
|
|
||||||
<type value="VIRTUAL_DEVICE_PATH" />
|
|
||||||
<value value="C:\Users\sebas\.android\avd\Pepper_1.9_API_29.avd" />
|
|
||||||
</Key>
|
|
||||||
</deviceKey>
|
|
||||||
</Target>
|
|
||||||
</targetSelectedWithDropDown>
|
|
||||||
<timeTargetWasSelectedWithDropDown value="2024-04-24T09:24:05.698446800Z" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
@@ -1,6 +1,5 @@
|
|||||||
package com.example.fitbot;
|
package com.example.fitbot;
|
||||||
|
|
||||||
import android.support.v7.app.AppCompatActivity;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
|
||||||
import com.aldebaran.qi.sdk.QiContext;
|
import com.aldebaran.qi.sdk.QiContext;
|
||||||
@@ -8,7 +7,6 @@ import com.aldebaran.qi.sdk.QiSDK;
|
|||||||
import com.aldebaran.qi.sdk.RobotLifecycleCallbacks;
|
import com.aldebaran.qi.sdk.RobotLifecycleCallbacks;
|
||||||
import com.aldebaran.qi.sdk.builder.SayBuilder;
|
import com.aldebaran.qi.sdk.builder.SayBuilder;
|
||||||
import com.aldebaran.qi.sdk.design.activity.RobotActivity;
|
import com.aldebaran.qi.sdk.design.activity.RobotActivity;
|
||||||
import com.aldebaran.qi.sdk.design.activity.conversationstatus.SpeechBarDisplayStrategy;
|
|
||||||
import com.aldebaran.qi.sdk.object.conversation.Say;
|
import com.aldebaran.qi.sdk.object.conversation.Say;
|
||||||
|
|
||||||
|
|
||||||
|
@@ -0,0 +1,35 @@
|
|||||||
|
package com.example.fitbot.speech;
|
||||||
|
|
||||||
|
import com.aldebaran.qi.sdk.QiContext;
|
||||||
|
import com.aldebaran.qi.sdk.builder.SayBuilder;
|
||||||
|
import com.aldebaran.qi.sdk.object.locale.Language;
|
||||||
|
import com.aldebaran.qi.sdk.object.locale.Locale;
|
||||||
|
import com.aldebaran.qi.sdk.object.locale.Region;
|
||||||
|
|
||||||
|
public class SpeechGenerator {
|
||||||
|
|
||||||
|
private static final Locale DUTCH_LOCALE = new Locale(Language.DUTCH, Region.NETHERLANDS);
|
||||||
|
private SayBuilder builder;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function for making the robot say something with DUTCH_LOCALE as locale
|
||||||
|
* @param phrase The phrase to make the robot say
|
||||||
|
* @param ctx The QiContext to use
|
||||||
|
*/
|
||||||
|
public static void say(String phrase, QiContext ctx)
|
||||||
|
{
|
||||||
|
say(phrase, ctx, DUTCH_LOCALE);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public static void say(String text, QiContext ctx, Locale locale)
|
||||||
|
{
|
||||||
|
SayBuilder.with(ctx)
|
||||||
|
.withLocale(locale)
|
||||||
|
.withText(text)
|
||||||
|
.build()
|
||||||
|
.run();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Reference in New Issue
Block a user