private IdentificationResponse streamJob(JobInput input) { // perform Console.WriteLine("Installing ffmpeg..."); var ffmpegPath = InstallDependencies.Run(); Console.WriteLine("Getting m3u8 link..."); var m3u8Link = M3U8.GetAudioOnlyM3U8(input.Identifier); Console.WriteLine("Listening to channel..."); var mp3 = ListenToChannel.Listen(m3u8Link); Console.WriteLine("Running recognition..."); var result = Recognition.Run(mp3); Console.WriteLine(result); Console.WriteLine("Finished..."); // cleanup Console.WriteLine("Cleaning up..."); System.IO.File.Delete("/tmp/audio.mp3"); System.IO.File.Delete("/tmp/audio.mp3.cli.lo"); return(result); }
private IdentificationResponse clipJob(JobInput input) { // perform Console.WriteLine("Installing ffmpeg..."); var ffmpegPath = InstallDependencies.Run(); var mp4 = DownloadClip.Run(input.Identifier); var result = Recognition.Run(mp4); Console.WriteLine(result); Console.WriteLine("Finished..."); // cleanup Console.WriteLine("Cleaning up..."); System.IO.File.Delete("/tmp/audio.mp4"); System.IO.File.Delete("/tmp/audio.mp4.cli.lo"); return(result); }