Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PsiStoreTool for ASR #328

Open
kontogiorgos opened this issue Sep 5, 2024 · 2 comments
Open

PsiStoreTool for ASR #328

kontogiorgos opened this issue Sep 5, 2024 · 2 comments

Comments

@kontogiorgos
Copy link

Hi,

I am trying to export speech recognition results to csv using the PsiStoreTool. What is the right way to do that?

Using the save option from the tool I get the following error:

Error: Pipeline 'default' was terminated because of one or more unexpected errors (Unknown schema type name (Microsoft.Psi.Speech.IStreamingSpeechRecognitionResult, Microsoft.Psi.Speech, Version=0.19.100.1, Culture=neutral, PublicKeyToken=null).
A synonym may be needed (see KnownSerializers.RegisterDynamicTypeSchemaNameSynonym())) (Cannot perform runtime binding on a null reference)

Thanks!

@danbohus
Copy link
Contributor

danbohus commented Sep 7, 2024

I looked into this a bit and there are several issues in play re: why PsiStoreTools crashes on this.

My simple recommendation would be to write your own very small psi exporter program specific for this purpose with a pipeline that reads the speech reco results stream and writes the information in the format you desire (with the columns you desire) to a csv file.

Now back to PsiStoreTool and why it crashed. First, there's an issue in that PsiStoreTool does not know the type Microsoft.Psi.Speech.IStreamingSpeechRecognitionResult because it doesn't have a reference to the Microsoft.Psi.Speech project (where that type is defined). The "save messages" functionality in PsiStoreTool was intended I think for simple system types, but one could imagine that we could provide a functionality by which the user could specify via the command line a list of additional DLLs to dynamically load (so that it can find the types it needs), like PsiStudio does. Would be a nice feature to add and we'd welcome a PR on it.

Since we don't have that feature yet, for the moment, to test, I manually added a reference to Microsoft.Psi.Speech in PsiStoreTool and recompiled it. This indeed got me past the error you're reporting above, but unfortunately I ran into another problem, which I think may have to do with the fact that the persisted stream type is an interface rather than a class. We plan to investigate this further, but it will likely take longer.

So coming back to my original suggestion, I think the easiest/fastest path forward for you would be to write a custom exporter for your purposes.

@kontogiorgos
Copy link
Author

Thank you Dan! I think indeed the easiest way is to write a custom exporter. It is also not clear what is the right way for the PsiStoreTool to store a non-incremental ASR output as it is not really a continuous stream in the same way a LogEnergy stream is.

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

No branches or pull requests

2 participants