Exemplo n.º 1
0
 public void playWav(int lang)
 {
     ASR.text.text = "wav will be turned";
     PCMConvertor.PCM2WAV($"{Application.persistentDataPath}/{configManager.instance.directories [lang]}/replay.pcm", $"{Application.persistentDataPath}/{configManager.instance.directories [lang]}/replay.wav", 16000, 1, 8);
     ASR.text.text = "wav has been turned";
     StartCoroutine(loadWAV($"{Application.persistentDataPath}/{configManager.instance.directories [lang]}/replay.wav"));
 }
Exemplo n.º 2
0
    // Start is called before the first frame update
    void Start()
    {
        PCMConvertor.PCM2WAV("D:/replay2.pcm", "D:/replay2.wav", 16000, 1, 8);
        //float[] clip = PCMConvertor.PCM2Floats("D:/replay.pcm");

        //AudioClip audioClip = AudioClip.Create("hei", clip.Length,1, 16000, false);
        //print( audioClip.SetData(clip, 0));
        //if (audioSource==null)
        //{
        //    print("no way!");
        //}
        //else
        //{
        //    print("yes");
        //}
        //audioSource.clip = audioClip ;
    }