Get raw sound data in Blender using python
Say with a Plane object selected, you bake a sound file to its location keyframes.

&gt;&gt;&gt; obj = bpy.data.objects['Plane']
&gt;&gt;&gt; obj.animation_data.action.fcurves[0].sampled_points[0].co
Vector((1.0, 0.0))

&gt;&gt;&gt; obj.animation_data.action.fcurves[0].sampled_points[1].co
Vector((2.0, 0.34159383177757263))

&gt;&gt;&gt; obj.animation_data.action.fcurves[0].sampled_points[2].co
Vector((3.0, 0.8729846477508545))

&gt;&gt;&gt; obj.animation_data.action.fcurves[0].sampled_points[3].co
Vector((4.0, 0.8701881766319275))

&gt;&gt;&gt; obj.animation_data.action.fcurves[0].sampled_points[4].co
Vector((5.0, 0.6890017986297607))


This gives the points that the graph makes. And you can limit the frequencies used for the bake.



Then making a mesh is simple (relatively)

import bpy

rescalex = 20
rescalez = 0.2
obj = bpy.data.objects['Plane']
points = obj.animation_data.action.fcurves[0].sampled_points

# turn 2d points into 3d coordinates and rescale
verts = []
add_vert = verts.append
for idx, p in enumerate(points):
    z = p.co[1] / rescalez
    x = idx / rescalex
    add_vert((x, 0, z))

# connect sequential vertices
edges = [(i, i+1) for i in range(len(verts)-1)]

mesh = bpy.data.meshes.new("mesh_name")
mesh.from_pydata(verts, edges, faces=[])
mesh.update()

obj = bpy.data.objects.new("obj_name", mesh)

scene = bpy.context.scene
scene.objects.link(obj)


that gives this.