Skip to content

Commit

Permalink
fix the vector model type error, test=doc
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoMax-Xiong committed May 25, 2022
1 parent a560597 commit be8a78a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions demos/audio_content_search/conf/acs_application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ acs_python:
word_list: "./conf/words.txt"
sample_rate: 16000
device: 'cpu' # set 'gpu:id' or 'cpu'
ping_timeout: 100 # seconds



Expand Down
2 changes: 1 addition & 1 deletion docs/source/released_model.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ PANN | ESC-50 |[pann-esc50](../../examples/esc50/cls0)|[esc50_cnn6.tar.gz](https

Model Type | Dataset| Example Link | Pretrained Models | Static Models
:-------------:| :------------:| :-----: | :-----: | :-----:
PANN | VoxCeleb| [voxceleb_ecapatdnn](https://github.com/PaddlePaddle/PaddleSpeech/tree/develop/examples/voxceleb/sv0) | [ecapatdnn.tar.gz](https://paddlespeech.bj.bcebos.com/vector/voxceleb/sv0_ecapa_tdnn_voxceleb12_ckpt_0_2_1.tar.gz) | -
ECAPA-TDNN | VoxCeleb| [voxceleb_ecapatdnn](https://github.com/PaddlePaddle/PaddleSpeech/tree/develop/examples/voxceleb/sv0) | [ecapatdnn.tar.gz](https://paddlespeech.bj.bcebos.com/vector/voxceleb/sv0_ecapa_tdnn_voxceleb12_ckpt_0_2_1.tar.gz) | -

## Punctuation Restoration Models
Model Type | Dataset| Example Link | Pretrained Models
Expand Down
7 changes: 5 additions & 2 deletions paddlespeech/server/engine/acs/python/acs_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ def init(self, config: dict):
try:
self.config = config
self.device = self.config.get("device", paddle.get_device())

# websocket default ping timeout is 20 seconds
self.ping_timeout = self.config.get("ping_timeout", 20)
paddle.set_device(self.device)
logger.info(f"ACS Engine set the device: {self.device}")

Expand Down Expand Up @@ -97,8 +100,8 @@ def get_asr_content(self, audio_data):
logger.error("No asr server, please input valid ip and port")
return ""
ws = websocket.WebSocket()
ws.connect(self.url)
# with websocket.WebSocket.connect(self.url) as ws:
logger.info(f"set the ping timeout: {self.ping_timeout} seconds")
ws.connect(self.url, ping_timeout=self.ping_timeout)
audio_info = json.dumps(
{
"name": "test.wav",
Expand Down

0 comments on commit be8a78a

Please sign in to comment.