-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from chenqinghe/develop
release v0.2
- Loading branch information
Showing
23 changed files
with
712 additions
and
420 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,4 @@ | |
.glide/ | ||
vendor/ | ||
glide.lock | ||
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,4 @@ before_install: | |
install: | ||
- glide install | ||
script: | ||
- ls | ||
- go build ./voice | ||
- go build ./ocr | ||
- go test ./... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"github.com/chenqinghe/baidu-ai-go-sdk/version/ocr" | ||
"os" | ||
) | ||
|
||
const ( | ||
// This Api Key and Api Secret is just for example, | ||
// you should get your own first. | ||
APIKEY = "5RijeBzVjQ82uPx8gxGGfeNXlfRt7yH6" | ||
APISECRET = "keiyq3oKrkYsSPUcrf0gtRKneeTxjuqV" | ||
) | ||
|
||
func main() { | ||
|
||
client := ocr.NewOCRClient(APIKEY, APISECRET) | ||
|
||
f, err := os.OpenFile("ocr.jpg", os.O_RDONLY, 0777) | ||
if err != nil { | ||
panic(err) | ||
} | ||
rs, err := client.GeneralRecognizeBasic(f) | ||
if err != nil { | ||
panic(err) | ||
} | ||
fmt.Println(string(rs)) | ||
} |
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.