Ejemplo n.º 1
0
def transcode(sourcefile, destinationPath, destFormat):
    logger = transcode.get_logger()
    logger.info("Source path : %s" % sourcefile)
    afile = AudioSlave(sourcefile)
    transcodedFile = afile.transcode(destFormat, destinationPath)
    logger.info("Transcoded path : %s" % transcodedFile)
    return transcodedFile
Ejemplo n.º 2
0
def codegen(sourcefile, quickMode=False):
    logger = codegen.get_logger()
    logger.info("Source path : %s" % sourcefile)
    afile = AudioSlave(sourcefile, echoprint=True, echoprintQuickMode=quickMode)
    echoprintCode = afile.get_echoprint_code()[0]
    logger.info("Echoprint code extracted, saving to database")

    connection = Connection('localhost', 27017)
    db = connection.echoprint_codegen
    collection = db.echoprint_collection
    posts = db.posts
    oid = posts.insert(afile.get_echoprint_code()[0])
    logger.info("Object ID : %s" % oid)
    return oid