15 lines
332 B
Python
15 lines
332 B
Python
|
#!/usr/bin/env python3
|
||
|
|
||
|
import os
|
||
|
from cffi import FFI
|
||
|
|
||
|
vosk_root=os.environ.get("VOSK_SOURCE", "..")
|
||
|
cpp_command = "cpp " + vosk_root + "/src/vosk_api.h"
|
||
|
|
||
|
ffibuilder = FFI()
|
||
|
ffibuilder.set_source("vosk.vosk_cffi", None)
|
||
|
ffibuilder.cdef(os.popen(cpp_command).read())
|
||
|
|
||
|
if __name__ == '__main__':
|
||
|
ffibuilder.compile(verbose=True)
|