getting length of .M4A audio file

Hello,

I recorded an audio file via Quicktime. I would like to be able to use the length of the file in the hours:minutes:seconds format to display in dialog box.
Does anyone know how to get at that attribute in a file stored on my hard drive?

thanks in advance

Browser: Safari 602.3.12
Operating System: Mac OS X (10.10)

This uses Spotlight metadata to get the value in seconds, which is easily converted to hh:mm:ss format.

use AppleScript version "2.4" -- Yosemite (10.10) or later
use framework "Foundation"
use scripting additions

set theFile to POSIX path of (choose file)
-- build predicate
set theFile to current application's NSString's stringWithString:theFile
set theName to theFile's lastPathComponent()
set theContainer to theFile's stringByDeletingLastPathComponent()
set thePred to current application's NSPredicate's predicateWithFormat_("kMDItemFSName == %@", theName)
-- build and start query
set theQuery to current application's NSMetadataQuery's new()
theQuery's setPredicate:thePred
theQuery's setSearchScopes:{theContainer}
theQuery's startQuery()
-- loop until it's stopped gathering
repeat while theQuery's isGathering() as boolean
	delay 0.1
end repeat
-- stop and get the first NSMetadataItem (there can only be one in this case)
theQuery's stopQuery()
set metaItem to theQuery's resultAtIndex:0
-- get the value you want
set theSeconds to (metaItem's valueForAttribute:(current application's NSMetadataItemDurationSecondsKey)) as real