Bake Sound to F-Curves

Hey can someone tell me how i can bake a Sound to a fcurve via Python?

This doest work:
import bpy
bpy.context.area.type = ‘GRAPH_EDITOR’
bpy.ops.graph.sound_bake(filepath=“C:\Users\mycomputer_000\Desktop\Fat Joe ft Lil Wayne - Make It Rain.mp3”)

Thankts in advance!:slight_smile:

It worked, thank you realy much!:slight_smile:

There is one more question i got^^

Is there a way to definde:
C:\Users\mycomp uter_000\Desktop\Fat Joe ft Lil Wayne - Make It Rain.mp3 = Filename

And then just write :
bpy.ops.graph.sound_bake(filepath = r"Filename")

?:slight_smile:



filename = r"C:\Users\\mycomp uter_000\\Desktop\\Fat Joe ft Lil Wayne - Make It Rain.mp3"
bpy.ops.graph.sound_bake(filepath=filename)