Commit 0162202e authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen
Browse files

Adding text to speech signal source component script

parent e1e43f6d
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class VAUTextToSpeechSignalSource : VAUSignalSource
public string Name; // Versatile name
public string Text = "hi there, my name is rachel. virtual acoustics is a real-time auralization framework for scientific research in Virtual Reality created by the institute of technical acoustics, RWTH aachen university. thank you for testing the VA unity C sharp scripts for controlling a VA server.";
public bool DirectPlayback = false;
private string _TextIdentifier = "";
void Awake()
if (!VAUAdapter.VA.IsConnected())
_ID = VAUAdapter.VA.CreateTextToSpeechSignalSource(Name);
void Start()
VAUAdapter.VA.TextToSpeechPrepareText(_ID, _TextIdentifier, Text);
if (DirectPlayback)
VAUAdapter.VA.TextToSpeechPlaySpeech(_ID, _TextIdentifier);
private void Update()
void OnDestroy()
if (_ID.Length > 0)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment