Python API Usage example

Examples are from native_client/python/client.py.

Creating a model instance and loading model

148
    ds = Model(args.model)

Deploying trained model

193
194
195
196
197
198
199
200
    if args.extended:
        print(metadata_to_string(ds.sttWithMetadata(audio, 1).transcripts[0]))
    elif args.json:
        print(
            metadata_json_output(ds.sttWithMetadata(audio, args.candidate_transcripts))
        )
    else:
        print(ds.stt(audio))

Full source code

See Full source code.