1
$\begingroup$

How to import audio file like as "SystemDialogInput["RecordSound"]"?

tako = Import["C:\\Users\\User\\Desktop\\kk\\My recording #2.wav"]

enter image description here

tako // InputForm // Short

enter image description here

but if I use SystemDialogInput[]

SystemDialogInput["RecordSound"]

enter image description here

rec // InputForm // Short

enter image description here

I need InputForm like rec // InputForm // Short

$\endgroup$
1
  • $\begingroup$ I think you should rephrase your question and make it clearer: you are asking how to get a Sound expression instead of an Audio expression. $\endgroup$
    – Szabolcs
    Commented Nov 17, 2016 at 17:47

2 Answers 2

2
$\begingroup$

Use the documented "Sound" element instead of the default "Audio" element.

Import[..., {"WAV", "Sound"}]
$\endgroup$
0
$\begingroup$

Audio to Sound:

a = Audio[File["ExampleData/car.mp3"]];
Sound[SampledSoundList[AudioData@#, QuantityMagnitude@AudioSampleRate@#]]&@a

Sound to Audio:

sound = Sound[{SoundNote["C"], SoundNote["G"]}];
Audio@sound
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.