You can do it without resort to services or Automator. You'll need to be running 10.10 or later:
use AppleScript version "2.4" -- Yosemite (10.10) or later
use framework "Foundation"
use framework "AVFoundation"
use scripting additions
set posixPath to POSIX path of (choose file with prompt "Choose an AIFF file:")
my convertAIFFToM4aAt:posixPath deleteOriginal:false
on convertAIFFToM4aAt:posixPath deleteOriginal:deleteFlag
set theURL to current application's |NSURL|'s fileURLWithPath:posixPath
-- set destination to use same path, different extension
set destURL to theURL's URLByDeletingPathExtension()'s URLByAppendingPathExtension:"m4a"
set theAsset to current application's AVAsset's assetWithURL:theURL
-- check asset can be converted
set allowedPresets to current application's AVAssetExportSession's exportPresetsCompatibleWithAsset:theAsset
if (allowedPresets's containsObject:(current application's AVAssetExportPresetAppleM4A)) as boolean is false then
error "Can't export this file as an .m4a file."
end if
-- set up export session
set theSession to current application's AVAssetExportSession's exportSessionWithAsset:theAsset presetName:(current application's AVAssetExportPresetAppleM4A)
theSession's setOutputFileType:(current application's AVFileTypeAppleM4A)
theSession's setOutputURL:destURL
-- begin export and poll for completion
theSession's exportAsynchronouslyWithCompletionHandler:(missing value)
repeat
set theStatus to theSession's status() as integer
if theStatus < 3 then
delay 0.2
else
exit repeat
end if
end repeat
-- throw error if it failed
if theStatus = (current application's AVAssetExportSessionStatusFailed) as integer then
error (theSession's |error|()'s localizedDescription() as text)
end if
-- delete original if required
if deleteFlag then
current application's NSFileManager's defaultManager()'s removeItemAtURL:theURL |error|:(missing value)
end if
end convertAIFFToM4aAt:deleteOriginal: