private void Awake()
    {
#if UNITY_ANDROID
        if (Application.platform != RuntimePlatform.Android)
        {
            return;
        }

        dispatcher = Dispatcher.GetInstance();
        // for accessing audio
        utilsPlugin = UtilsPlugin.GetInstance();
        utilsPlugin.SetDebug(0);

        speechPlugin = SpeechPlugin.GetInstance();
        speechPlugin.SetDebug(0);

        textToSpeechPlugin = TextToSpeechPlugin.GetInstance();
        textToSpeechPlugin.SetDebug(0);
        textToSpeechPlugin.Initialize();
        textToSpeechPlugin.OnInit         += OnInit;
        textToSpeechPlugin.OnChangeLocale += OnSetLocale;
        textToSpeechPlugin.OnStartSpeech  += OnStartSpeech;
        textToSpeechPlugin.OnEndSpeech    += OnEndSpeech;
        textToSpeechPlugin.OnErrorSpeech  += OnErrorSpeech;
#endif
    }
示例#2
0
    //Initialization
    private void Awake()
    {
        BluetoothAdapter.enableBluetooth();//Force Enabling Bluetooth
        BluetoothAdapter.OnDevicePicked  += HandleOnDevicePicked;
        BluetoothAdapter.OnClientRequest += HandleOnClientRequest;
        BluetoothAdapter.startServer(UUID, 1000); // Init server

        textToSpeechPlugin = TextToSpeechPlugin.GetInstance();
        textToSpeechPlugin.SetDebug(0);
        textToSpeechPlugin.Initialize();
    }
示例#3
0
    private void Awake()
    {
        speechPlugin = SpeechPlugin.GetInstance();
        speechPlugin.SetDebug(0);

        textToSpeechPlugin = TextToSpeechPlugin.GetInstance();
        textToSpeechPlugin.SetDebug(0);
        textToSpeechPlugin.Initialize();

        textToSpeechPlugin.OnInit         += OnInit;
        textToSpeechPlugin.OnChangeLocale += OnSetLocale;
        textToSpeechPlugin.OnStartSpeech  += OnStartSpeech;
        textToSpeechPlugin.OnEndSpeech    += OnEndSpeech;
        textToSpeechPlugin.OnErrorSpeech  += OnErrorSpeech;
    }
示例#4
0
    private void Awake()
    {
        // for accessing audio
        utilsPlugin = UtilsPlugin.GetInstance();
        utilsPlugin.SetDebug(0);

        speechPlugin = SpeechPlugin.GetInstance();
        speechPlugin.SetDebug(0);

        textToSpeechPlugin = TextToSpeechPlugin.GetInstance();
        textToSpeechPlugin.SetDebug(0);
        textToSpeechPlugin.Initialize();

        //textToSpeechPlugin.OnInit += this.OnInit;
        //textToSpeechPlugin.OnEndSpeech += this.OnEndSpeech;
    }
示例#5
0
    private void Awake()
    {
        dispatcher = Dispatcher.GetInstance();
        // for accessing audio
        utilsPlugin = UtilsPlugin.GetInstance();
        utilsPlugin.SetDebug(0);

        speechPlugin = SpeechPlugin.GetInstance();
        speechPlugin.SetDebug(0);

        textToSpeechPlugin = TextToSpeechPlugin.GetInstance();
        textToSpeechPlugin.SetDebug(0);
        textToSpeechPlugin.Initialize();

        textToSpeechPlugin.OnInit         += OnInit;
        textToSpeechPlugin.OnChangeLocale += OnSetLocale;
        textToSpeechPlugin.OnStartSpeech  += OnStartSpeech;
        textToSpeechPlugin.OnEndSpeech    += OnEndSpeech;
        textToSpeechPlugin.OnErrorSpeech  += OnErrorSpeech;
    }
示例#6
0
    void Start()
    {
        dispatcher = Dispatcher.GetInstance();

        utilsPlugin = UtilsPlugin.GetInstance();
        utilsPlugin.SetDebug(0);

        speechPlugin = SpeechPlugin.GetInstance();
        speechPlugin.SetDebug(0);
        speechPlugin.Init();

        textToSpeechPlugin = TextToSpeechPlugin.GetInstance();
        textToSpeechPlugin.SetDebug(0);
        textToSpeechPlugin.Initialize();

        AddSpeechPluginListener();
        AddTextToSpeechListener();

        apiaiClient = new ApiAiUnity();
        apiaiClient.Initialize(new AIConfiguration("a984bc306ae24d11b4105e251f892a21", SupportedLanguage.English));
    }
示例#7
0
 // Use this for initialization
 void Start()
 {
     textToSpeechPlugin.Initialize();
     Invoke("DelayStartTTSEngine", 1f);
 }