Get-AudioFileInfo.ps1

function Get-AudioFileInfo 
{
  <#
      .SYNOPSIS
      Analyzes audio files and returns its format and technical details such as bit rate and channels.
 
      .DESCRIPTION
      Uses ffprobe.exe to analyze audio files.
      On Windows, if ffprobe.exe is not present, it will be downloaded automatically and stored in a temp folder.
      On other operating systems, ffprobe.exe needs to be manually downloaded (i.e. from https://ffbinaries.com/downloads)
      and placed here: $env:temp\ffprobe\ffprobe.exe
 
      .PARAMETER Path
      Path to audio file that needs to be analyzed.
 
      .EXAMPLE
      Get-AudioFileInfo -Path c:\test\sound.mp3
      Outputs the audio channels and technical details such as bit rate and duration.
  #>



  param
  (
    [String]
    [Parameter(Mandatory,ValueFromPipeline,ValueFromPipelineByPropertyName)]
    [Alias('FullName')]
    $Path
  )
  
  begin
  {    
    $null = Assert-FfprobeIsPresent
  }
  process
  {
    [DlAudioFileInfo]::new($Path)
  }


}