Perhaps not the best, but you could do
def getCodec(name, **kwargs):
    codecObjects = {
        'aac' : AACCodec,
        'ogg' : OGGCodec,
        'flac': FLACCodec
    }
    return codeObjects[name](**kwargs)
After all, you are trying to map a string to a class, but only need to instantiate one