LowkeySpeech | Google Speech API in Unity | Speech library
kandi X-RAY | LowkeySpeech Summary
kandi X-RAY | LowkeySpeech Summary
Google Speech Recognition API in Unity (C#). Requires an API Key from:
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of LowkeySpeech
LowkeySpeech Key Features
LowkeySpeech Examples and Code Snippets
Community Discussions
Trending Discussions on LowkeySpeech
QUESTION
I am a Junior Java developer and not too great with C#, so I would like some help in solving a problem. What I am trying to do is use existing code shared on github that takes a microphone input, uploads it to the Google Speech-to-Text API, and then returns JSON response with the transcript. This part is all working fine.
What isnt working, is storing the value of the "Transcript:" returned in the JSON into a string variable.
I have tried to do this multiple ways, I have looked for ways to convert the JSON response to an object using SimpleJSON and Newtonsoft, and I have also tried using a regular expression to read the JSON line that starts with "transcript." I saw an example of what I wanted done (linked below) but I was getting compiler errors. If someone could either help me with this, or point me to a better result I would appreciate it.
Here is the code I am using.
// Acquired from https://github.com/steelejay/LowkeySpeech
...ANSWER
Answered 2019-Mar-06 at 19:42Newtonsoft is a better choice and I'll walk you through how to use it.
First, create the C# classes you'll need to hold the result of the parsing. In your example, they will look like this:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install LowkeySpeech
Clone this repository
Import the project folder in Unity Game Engine
Go to EDIT -> PROJECT SETTINGS -> PLAYER -> API COMPATIBILITY LEVEL and select .NET 2.0
Go to this file
Find this piece of code and append your Google api key string apiURL = "https://speech.googleapis.com/v1/speech:recognize?&key="; so it should look like this string apiURL = "https://speech.googleapis.com/v1/speech:recognize?&key=yourapikeyhere";
Run the project and it should be working just fine
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page