Comments (9)
Your PR would be most welcome!
from go-astideepspeech.
@asticode I should be able to start working on that tomorrow, but I'd welcome any pointers / docs on how to properly expose structures and structures holding pointers to structures in Go, given my lack of knowledge in that language, any example / doc is useful :)
from go-astideepspeech.
Thing is, structures containing C attributes should be handled differently than structures containing Go attributes as far as I'm concerned.
I'd simply recommend using getters/setters to access/write C attributes withing Go structs.
You can also check out this link or this one to learn more about native Go structs.
If anyone else have ideas, we're all ears.
from go-astideepspeech.
Thing is, structures containing C attributes should be handled differently than structures containing Go attributes as far as I'm concerned.
I'd simply recommend using getters/setters to access/write C attributes withing Go structs.
Sounds like what I did for Rust bindings: RustAudio/deepspeech-rs@023dd85
from go-astideepspeech.
Yeah, sounds like the safest route!
from go-astideepspeech.
@asticode I'll first fix FreeString
from go-astideepspeech.
@asticode https://stackoverflow.com/questions/28925179/cgo-how-to-pass-struct-array-from-c-to-go I've found that, trying to use however does not lead to something working. Code is available at https://github.com/lissyx/go-astideepspeech/commits/expose-metadata
This slicing "seems" to work, in the sense that it compiles and runs, but trying to range over it, I always get the first item, and looking at pointers it is always the same.
from go-astideepspeech.
I always get the first item
That seems not true, I sometime get garbage, but always the same garbage value.
from go-astideepspeech.
Okay, nevermind, it seems like this was because there was no C defintion being included for C.struct_MetadataItem
from go-astideepspeech.
Related Issues (13)
- Supporting v0.1.1 and upcoming releases HOT 4
- 'Metadata' does not name a type HOT 4
- Update to new v0.6 API
- v0.7 available HOT 4
- error in "go get go get -u github.com/asticode/go-astideepspeech/... " HOT 4
- Updating bindings ? HOT 7
- Support for 0.8 HOT 2
- [Question] Does this go-binding utilizes GPU for deepspeech engine? HOT 2
- Upcoming 1.0 and renaming HOT 11
- how to translate realtime pcm data to text? HOT 10
- Lib is already compatible with libspeech.so v0.9 HOT 1
- Change LM parameters
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-astideepspeech.