Skip to content

Commit

Permalink
default now to publishPeak
Browse files Browse the repository at this point in the history
  • Loading branch information
supertick committed Apr 28, 2024
1 parent 902d190 commit 325f659
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/main/java/org/myrobotlab/service/config/InMoov2Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -530,9 +530,6 @@ public Plan getDefault(Plan plan, String name) {
log.listeners.add(new Listener("publishErrors", name));
// service --to--> InMoov2

// mouth_audioFile.listeners.add(new Listener("publishAudioEnd", name));
// mouth_audioFile.listeners.add(new Listener("publishAudioStart", name));

// InMoov2 --to--> service
listeners.add(new Listener("publishEvent", getPeerName("chatBot"), "getResponse"));
listeners.add(new Listener("publishFlash", getPeerName("neoPixel")));
Expand All @@ -554,9 +551,6 @@ public Plan getDefault(Plan plan, String name) {
listeners.add(new Listener("publishMoveTorso", getPeerName("torso"), "onMove"));

// service --to--> InMoov2
AudioFileConfig mouth_audioFile = (AudioFileConfig) plan.get(getPeerName("mouth.audioFile"));
mouth_audioFile.listeners.add(new Listener("publishPeak", name));

htmlFilter.listeners.add(new Listener("publishText", name));

OakDConfig oakd = (OakDConfig) plan.get(getPeerName("oakd"));
Expand All @@ -565,6 +559,15 @@ public Plan getDefault(Plan plan, String name) {

webxr.listeners.add(new Listener("publishJointAngles", name));

// service --to--> service
AudioFileConfig mouth_audioFile = (AudioFileConfig) plan.get(getPeerName("mouth.audioFile"));
mouth_audioFile.listeners.add(new Listener("publishPeak", name));
mouth_audioFile.listeners.add(new Listener("publishPeak", name + ".head.jaw", "moveTo"));
mouth_audioFile.peakDelayMs = 150L;
mouth_audioFile.peakMultiplier = 200.0;
mouth_audioFile.peakSampleInterval = 2.0;
mouth_audioFile.publishPeakResetDelayMs = 100L;

// mouth_audioFile.listeners.add(new Listener("publishAudioEnd", name));
// mouth_audioFile.listeners.add(new Listener("publishAudioStart", name));

Expand Down

0 comments on commit 325f659

Please sign in to comment.