CustomPanningData (API Reference)
Class CustomPanningData
This class contains all the information regarding the next angular panning element, including
a new estimated audio cue duration, and a new set of initial and sweep angular angle,
allowing the customization of the spatial audio trajectories for any type of notification,
such as speed or merge warners, maneuvers or even roundabouts notifications.
The orientation in space for initialAzimuthInDegrees and sweepAzimuthInDegrees can
be represented by the following angular values:
| Front | Right | Rear | Left |
|---|---|---|---|
| 0° | +90° | +- 180 | -90° |
When any of the members of CustomPanningData are initialized as null, the default value
provided by HERE SDK will be used instead.
The audio cue is spatialized considering the action of both maneuvers, for example,
the audio cue 'Now turn right and then turn left' will be spatialized as following:
'Now turn right' will be heard as coming from the right.
'and then turn left' will be heard as coming from the left.
Note: The estimation for playing both audio cues could be not fully accurate and therefore
a mismatch between the audio source and the audio cue message could be perceived.
-
Field Summary
FieldsModifier and TypeFieldDescriptionCustomized estimated duration for playing the audio cue on the selected TTS Engine.Initial desired angular position of the upcoming audio cue.Sweep angle of the upcoming audio cue. -
Constructor Summary
ConstructorsConstructorDescriptionCustomPanningData(Duration estimatedAudioCueDuration, Double initialAzimuthInDegrees, Double sweepAzimuthInDegrees) Creates a new instance. -
Method Summary
-
Field Details
-
estimatedAudioCueDuration
Customized estimated duration for playing the audio cue on the selected TTS Engine. When not used, HERE SDK's estimation will be used instead.
-
initialAzimuthInDegrees
Initial desired angular position of the upcoming audio cue. For example, for a maneuver such as "Turn right on" (
ManeuverAction.RightTurn) we want to create a spatial audio arc from the front to the right, mimicking the maneuver geometry. In this case, it is good practice to start the trajectory from an initial azimuth that is slightly located on the opposite direction of the maneuver (e.g. slightly starting from "front-left") and terminate the trajectory fully on the right side. The initial azimuth angle of such a trajectory would be, for example, -5.0 (slightly front-left). This azimuth value is needed to set the position of the audio renderer before starting to play the audio cue to avoid unwanted audio "jumps". -
sweepAzimuthInDegrees
Sweep angle of the upcoming audio cue. For example, for a maneuver such as "Turn right on" (i.e.
ManeuverAction.RightTurn), within aninitial_azimuth_in_degreesof -5 degrees, we want to create a spatial audio arc trajectory from the front to the right, mimicking the maneuver geometry. In this case, the desired final angle would be +90 degrees, and therefore, a sweep angle of +95 degrees would be required. On the other hand, when the desired spatialization is to the left side (i.e.ManeuverAction.LeftTurn), theinitial_azimuth_in_degreescould be set to +5 degrees and thesweep_azimuth_in_degreesto -95 degrees
-
-
Constructor Details
-
CustomPanningData
public CustomPanningData(@Nullable Duration estimatedAudioCueDuration, @Nullable Double initialAzimuthInDegrees, @Nullable Double sweepAzimuthInDegrees) Creates a new instance.
- Parameters:
estimatedAudioCueDuration-Customized estimated duration for playing the audio cue on the selected TTS Engine. When not used, HERE SDK's estimation will be used instead.
initialAzimuthInDegrees-Initial desired angular position of the upcoming audio cue. For example, for a maneuver such as "Turn right on" (
ManeuverAction.RightTurn) we want to create a spatial audio arc from the front to the right, mimicking the maneuver geometry. In this case, it is good practice to start the trajectory from an initial azimuth that is slightly located on the opposite direction of the maneuver (e.g. slightly starting from "front-left") and terminate the trajectory fully on the right side. The initial azimuth angle of such a trajectory would be, for example, -5.0 (slightly front-left). This azimuth value is needed to set the position of the audio renderer before starting to play the audio cue to avoid unwanted audio "jumps".sweepAzimuthInDegrees-Sweep angle of the upcoming audio cue. For example, for a maneuver such as "Turn right on" (i.e.
ManeuverAction.RightTurn), within aninitial_azimuth_in_degreesof -5 degrees, we want to create a spatial audio arc trajectory from the front to the right, mimicking the maneuver geometry. In this case, the desired final angle would be +90 degrees, and therefore, a sweep angle of +95 degrees would be required. On the other hand, when the desired spatialization is to the left side (i.e.ManeuverAction.LeftTurn), theinitial_azimuth_in_degreescould be set to +5 degrees and thesweep_azimuth_in_degreesto -95 degrees
-
-
Method Details