Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/glitchfix/googleapigo
Easy to implement minimalistic golang package for Google APIs
https://github.com/glitchfix/googleapigo
Last synced: about 2 months ago
JSON representation
Easy to implement minimalistic golang package for Google APIs
- Host: GitHub
- URL: https://github.com/glitchfix/googleapigo
- Owner: Glitchfix
- License: bsd-3-clause
- Created: 2019-03-12T06:04:50.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-03-12T06:45:47.000Z (almost 6 years ago)
- Last Synced: 2024-09-28T09:22:31.987Z (3 months ago)
- Language: Go
- Size: 4.88 KB
- Stars: 3
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# googleapigo
Easy to implement minimalistic golang package for Google APIs### Example
```golang
package mainimport (
"fmt"GoogleAPI "github.com/Glitchfix/googleapigo/googleapi"
)func main() {
//Google API Configuration
apiConf := GoogleAPI.ClientConfig{
Email: "YOUR CONFIG EMAIL",
PrivateKey: "YOUR RSA KEY",
}//OAuth configured Google client
googleClient := GoogleAPI.GetClient(apiConf)//AudioConfig for Google Speech-to-Text
audioConf := GoogleAPI.AudioConfig{
FilePath: "brooklyn.flac",
}textResponse, err := GoogleAPI.SpeechToText(googleClient, audioConf) //Returns the resulting transcript inside json
if err != nil {
fmt.Println(err)
}
fmt.Println(textResponse)textConf := GoogleAPI.TextConfig{
Text: "Hello, darkness my old friend!",
}voiceResponse, err := GoogleAPI.TextToSpeech(googleClient, textConf) //Returns the resulting base64 of the audio file inside json
if err != nil {
fmt.Println(err)
}
fmt.Println(voiceResponse)
}
```#### Currently supported cloud APIs
1. Speech-to-Text
2. Text-to-SpeechPlease feel free to contribute or as issues.
In case you need any help please feel free to contact me.#### Contact
[GitHub](https://github.com/Glitchfix)
[LinkedIn](https://in.linkedin.com/in/shivanjan)
Email: [email protected]
Phone: +919658965891, +917978129659