GithubHelp home page GithubHelp logo

deepgram / deepgram-brain-python Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 2.0 20 KB

Python API wrapper for the Deepgram API. Oh yes, it's cool. You should get it.

License: Apache License 2.0

Python 100.00%

deepgram-brain-python's People

Contributors

greedyuser avatar warmlogic avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

deepgram-brain-python's Issues

AssertionError

from deepgram import Brain

# Get your user_id and token from deepgram.com/console/documentation
brainAPI = Brain(user_id='cxcxcxcxcxcxcxcxcxc', token='xcxcxcxcxcxcxcxcxxc')

audioFileLocation = 'my_thoughts_2017_10_25_nlp_lessons_001.wav'

with open(audioFileLocation, mode='rb') as audioFile:
    asset = brainAPI.transcribe(audioFile)
  
print asset

I getting following error

File "test.py", line 40, in
asset = brainAPI.transcribe(audioFile)
File "C:\Python27\lib\site-packages\deepgram\connection.py", line 138, in tran
scribe
return self.uploadAsset(data, async=False)['transcript']
File "C:\Python27\lib\site-packages\deepgram\connection.py", line 124, in uplo
adAsset
assert isinstance(data, bytes)
AssertionError

please guide ...

auth issues

`from deepgram import Brain

deepgram_client = Brain(user_id='XXX',token='XXXXX')

Traceback (most recent call last):
File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/code.py", line 91, in runcode
exec(code, self.locals)
File "", line 1, in
File "/Users/raja/.venvs/backend/lib/python3.6/site-packages/deepgram/connection.py", line 30, in init
self.login(**kwargs)
File "/Users/raja/.venvs/backend/lib/python3.6/site-packages/deepgram/connection.py", line 64, in login
self.signedUsername = self._checkReturn(requests.get("{}/users/login".format(self.url), auth=auth))[
File "/Users/raja/.venvs/backend/lib/python3.6/site-packages/deepgram/connection.py", line 34, in _checkReturn
value = response.json()
File "/Users/raja/.venvs/backend/lib/python3.6/site-packages/requests/models.py", line 892, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/init.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.