我想知道 perl system() 函数的等效 C# 代码是什么,请参见下面的代码
$flac = `/usr/bin/which flac`;
($fh, $tmpname) = tempfile("stt_XXXXXX", DIR => "/tmp", UNLINK => 1);
/// Some code for recording
$endian = (unpack("h*", pack("s", 1)) =~ /01/) ? "big" : "little";
$samplerate = 8000;
$format = sln;
if(system($flac, $comp_level, "--totally-silent", "--channels=1", "--endian=$endian", "--sign=signed", "--bps=16", "--force-raw-format", "--sample-rate=$samplerate", "$tmpname.$format") != 0)
{
if (open($fh, "<", "$tmpname.flac"))
{
$audio = do { local $/; <$fh> };
close($fh);
}
}
请帮我解决我的问题,在互联网上挖掘对我没有帮助。谢谢