Skip to content

Commit

Permalink
feat: 百度ocr支持自定义语音
Browse files Browse the repository at this point in the history
  • Loading branch information
yuhldr committed Nov 17, 2024
1 parent 44fce45 commit 858dfd1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lfy/api/server/ocr/baidu.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def ocr_image(self, img_path, lang_str=None):
ok, token = _get_token(self.session, self.get_api_key_s_ocr())
if not ok:
return False, token
params = {"image": img}
params = {"image": img, "language_type": lang_str}
request_url = request_url + "?access_token=" + token
headers = {'content-type': 'application/x-www-form-urlencoded'}
res = self.session.post(request_url,
Expand Down

0 comments on commit 858dfd1

Please sign in to comment.