Skip to content
This repository has been archived by the owner on Aug 14, 2019. It is now read-only.

AudioRecord #66

Open
augusWuDotan opened this issue Feb 1, 2018 · 6 comments
Open

AudioRecord #66

augusWuDotan opened this issue Feb 1, 2018 · 6 comments

Comments

@augusWuDotan
Copy link

I record pcm and take wav
when I use .wav file with client library to translator
response error
02-01 17:26:34.115 23388-23681/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: originating error 0x80070057 02-01 17:26:34.135 23388-23681/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: Application Name: com.wdtpr.augus.azuretranslatordemo/1.0 02-01 17:26:34.165 23388-23681/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: STS: https://api.cognitive.microsoft.com/sts/v1.0/issueToken 02-01 17:26:34.165 23388-23681/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: Refreshing token S 02-01 17:26:34.175 23388-23681/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: Initializing Audio Services 02-01 17:26:34.175 23388-23681/com.wdtpr.augus.azuretranslatordemo W/libOpenSLES: class OutputMix interface 0 requested but unavailable MPH=43 02-01 17:26:34.175 23388-23681/com.wdtpr.augus.azuretranslatordemo W/AudioTrack: AUDIO_OUTPUT_FLAG_FAST denied by client 02-01 17:26:34.185 23388-23681/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: Initializing Speech Services 02-01 17:26:34.185 23388-23681/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: No application id provided to controller 02-01 17:26:34.185 23388-23681/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: GetIdentityPropertyValue 3 02-01 17:26:34.185 23388-23681/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: Useragent Value Android Assistant (Android; 5.1.1;Tablet;ProcessName/AppName=com.wdtpr.augus.azuretranslatordemo/1.0;DeviceType=Near;SpeechClient=1.0.161216) 02-01 17:26:34.185 23388-23681/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: Url: 'https://websockets.platform.bing.com/ws/speech/recognize' 02-01 17:26:34.185 23388-23681/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: Locale: 'en-us' 02-01 17:26:34.185 23388-23681/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: Application Id: '' 02-01 17:26:34.185 23388-23681/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: Version: 4.0.150429 02-01 17:26:34.185 23388-23681/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: UserAuthorizationToken: 02-01 17:26:34.185 23388-23681/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: ServerLoggingLevel: 1 02-01 17:26:34.185 23388-23681/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: Initiating websocket connection. m_connection=0x0 host=websockets.platform.bing.com port=443 02-01 17:26:34.626 23388-23682/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: Auth token status: 200 02-01 17:26:34.626 23388-23681/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: Authorization token hr 0 'S' 02-01 17:26:34.626 23388-23681/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: Successfully initialized client connection 02-01 17:26:34.626 23388-23681/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: Create ImpressionId: b23495a586175a7aa79d2ac048b1ea87 02-01 17:26:34.626 23388-23681/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: GetIdentityPropertyValue 3 02-01 17:26:34.626 23388-23681/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: originating error 0x80070057 02-01 17:26:34.626 23388-23681/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: originating error 0x80070057 02-01 17:26:34.626 23388-23681/com.wdtpr.augus.azuretranslatordemo W/art: Attempt to remove local handle scope entry from IRT, ignoring 02-01 17:26:34.626 23388-23681/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: Create ImpressionId: 7a3254d667575957a5095a9278df907f 02-01 17:26:34.636 23388-23681/com.wdtpr.augus.azuretranslatordemo W/art: Attempt to remove local handle scope entry from IRT, ignoring 02-01 17:26:34.636 23388-23476/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: ImpressionId: S 02-01 17:26:34.636 23388-23476/com.wdtpr.augus.azuretranslatordemo W/art: Attempt to remove local handle scope entry from IRT, ignoring 02-01 17:26:34.636 23388-23476/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: Adding requestId: 'S' for '5' 02-01 17:26:34.636 23388-23476/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: Subscribing request [S] 02-01 17:26:34.636 23388-23476/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: Waiting for connection/send completion. 02-01 17:26:34.636 23388-23476/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: Audio stream created 02-01 17:26:34.636 23388-23476/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: Adding requestId: 'S' for '7' 02-01 17:26:34.636 23388-23476/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: Subscribing request [S] 02-01 17:26:34.636 23388-23476/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: Audio Stream Created 02-01 17:26:34.636 23388-23476/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: Creating transcoder 2 02-01 17:26:34.636 23388-23476/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: Setting format for audio stream, 00000001 02-01 17:26:34.636 23388-23476/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: Waiting for connection/send completion. 02-01 17:26:34.636 23388-23476/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: Sent first chunk of audio stream, requestId='764993df-b229-5d3d-5b5f-e48f025349be' 02-01 17:26:34.656 23388-23476/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: Waiting for connection/send completion. 02-01 17:26:34.676 23388-23476/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: Waiting for connection/send completion. 02-01 17:26:34.706 23388-23476/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: Waiting for connection/send completion. 02-01 17:26:34.726 23388-23476/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: Waiting for connection/send completion. 02-01 17:26:34.736 23388-23686/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: Upgrade request returned with HTTP status code: 101. 02-01 17:26:34.736 23388-23686/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: Web socket handshake completed 02-01 17:26:34.736 23388-23686/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: CU Client connected 02-01 17:26:34.736 23388-23686/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: ConnectionStateChanged 02-01 17:26:36.688 23388-23476/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: Sending audio stream endpoint, requestId='S' 02-01 17:26:36.688 23388-23476/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: Sent audio stream endpoint, requestId='S' 02-01 17:26:36.818 23388-23686/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: Received message: 'S' 02-01 17:26:36.818 23388-23686/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: Response request id: 'S' 02-01 17:26:36.818 23388-23686/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: Response impression: 'S' 02-01 17:26:36.818 23388-23686/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: LanguageGeneration OK 02-01 17:26:36.818 23388-23686/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: originating error 0x80070057 02-01 17:26:36.818 23388-23686/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: ERROR: No Reco 02-01 17:26:36.818 23388-23686/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: originating error 0x80070057 02-01 17:26:36.828 23388-23388/com.wdtpr.augus.azuretranslatordemo D/[Azure Trans]: 最後結果:TransResult{recognitionStatus=InitialSilenceTimeout, recognizedPhraseList=[]} 02-01 17:26:36.828 23388-23388/com.wdtpr.augus.azuretranslatordemo D/[Azure Trans]: 答案字元數:9 02-01 17:26:36.828 23388-23388/com.wdtpr.augus.azuretranslatordemo D/[Azure Trans]: 答案取自第0筆資料 02-01 17:26:36.828 23388-23388/com.wdtpr.augus.azuretranslatordemo D/[Azure Trans]: AverageScore 分數-1.0 02-01 17:26:36.828 23388-23388/com.wdtpr.augus.azuretranslatordemo D/[Azure Trans]: AverageScore 分數-1.0 02-01 17:28:39.798 23388-23686/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: originating error 0x80004005 02-01 17:28:39.798 23388-23686/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: originating error 0x80004005 02-01 17:28:39.798 23388-23686/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: Failed to 'hresult', HR=80004005, WebSocket connection failed 02-01 17:28:39.798 23388-23686/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: No messages to retry, closing. 02-01 17:28:39.798 23388-23686/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: Closing web socket channel 02-01 17:28:39.798 23388-23686/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: CU Client connection dropped 02-01 17:28:39.798 23388-23686/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: ConnectionStateChanged 02-01 17:28:39.798 23388-23686/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: WebSocket closed unexpectedly, status: 0 02-01 17:28:39.798 23388-23686/com.wdtpr.augus.azuretranslatordemo I/NLPLAT: Web socket channel already closed.
i don't know how to fix
this .wav �sound can be play , so Recording is normal , can you give me some direction to solve this problem

@augusWuDotan
Copy link
Author

image

@augusWuDotan
Copy link
Author

image

@zhouwangzw
Copy link
Contributor

It seems that you got No Reco error due to InitialSilienceTimeout, right? If so, does your audio contain a silence period at the begining? You may also want to check the audio format you are using. Currently we support PCM 16KHz, 16bit, Mono audio format.

Thanks,

@augusWuDotan
Copy link
Author

[does your audio contain a silence period at the begining] what's problem?
image
I use pcm , 16KHz,16bit, mono .
like it , how can I check something?

@zhouwangzw
Copy link
Contributor

You can try to write your recorded audio from microphone into a file, and use some external tools to check the audio format in the file. Or you can try the wav file in this repository to check whether your applicaiton works with the sample audio as expected.

@augusWuDotan
Copy link
Author

use whatstheweatherlike.wav can word.
maybe i will use some external tools to check my audio format in the file.
thanks. If there are other problems, I'll ask you again

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants