// Not an actual test... just examples public void FactoryMethods() { // Sample: FactoryMethods RecognitionAudio audio1 = RecognitionAudio.FromFile("Sound/SpeechSample.flac"); RecognitionAudio audio2 = RecognitionAudio.FromUri("https://.../HostedSpeech.flac"); RecognitionAudio audio3 = RecognitionAudio.FromStorageUri("gs://my-bucket/my-file"); byte[] bytes = ReadAudioData(); // For example, from a database RecognitionAudio audio4 = RecognitionAudio.FromBytes(bytes); using (Stream stream = OpenAudioStream()) // Any regular .NET stream { RecognitionAudio audio5 = RecognitionAudio.FromStream(stream); } // End sample }