Skip to content

Commit

Permalink
Expose speech recognition options in the inspector, and pass it into …
Browse files Browse the repository at this point in the history
…playthourgh initialization
  • Loading branch information
RobCharisma committed Oct 14, 2024
1 parent ab4d4f0 commit 9aabb23
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
1 change: 0 additions & 1 deletion Scripts/Audio/SpeechRecognitionOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ public enum SpeechRecognitionService

public string Service
{

get
{
switch (_service)
Expand Down
13 changes: 9 additions & 4 deletions Scripts/PlaythroughInstanceBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,13 @@ public abstract class PlaythroughInstanceBase : MonoBehaviour

[Header("Settings")]
[SerializeField]
[Tooltip("Configuration node of the Speech output.")]
[Tooltip("Configuration of the Speech output.")]
protected SpeechOptions _speechOptions;

[SerializeField]
[Tooltip("Configuration of the speech-to-text")]
protected SpeechRecognitionOptions _speechRecognitionOptions;

[SerializeField]
[Tooltip("Activate internal Charisma-specific logging.")]
protected bool _enableLogging;
Expand All @@ -56,9 +60,10 @@ public void LoadPlaythrough()
// We can now create a new charisma object and pass it our token.
_playthrough = new Playthrough(
token: tokenResponse.Token,
playthroughUuid: tokenResponse.PlaythroughUuid,
_speechOptions
tokenResponse.Token,
tokenResponse.PlaythroughUuid,
_speechOptions,
_speechRecognitionOptions
);
OnPlaythroughLoaded(tokenResponse, conversationUuid);
Expand Down

0 comments on commit 9aabb23

Please sign in to comment.