Giter Club home page Giter Club logo

supershaneski / openai-whisper-talk Goto Github PK

View Code? Open in Web Editor NEW
127.0 7.0 33.0 615 KB

openai-whisper-talk is a sample voice conversation application powered by OpenAI technologies such as Whisper, Completions, Embeddings, and the latest Text-to-Speech. The application is built using Nuxt, a Javascript framework based on Vue.js.

License: MIT License

Vue 46.33% CSS 3.88% JavaScript 48.68% TypeScript 1.10%
audio-api nuxt openai openai-whisper vuejs voice-chat chat-bot chatbot text-to-speech japanese speech-to-text ai-chatbot embeddings openai-chat rag-embeddings tts-api whisper-api mongodb openai-tts openai-embeddings

openai-whisper-talk's Issues

Problems handling functions

Hi @supershaneski,
Amazing work! Really good Readme as well.
Shoutout to you!

I noticed the functions are not working.
Do you have any idea why? I would love to try this out.

I spent some time troubleshooting it, but I assume you would have a better understanding of the code base.
I noticed the func parameter being passed as a string - not too sure whether it is related to that.

function_return.tool_calls is not iterable

function_return.tool_calls is not iterable.

[nuxt] [request error] [unhandled] [500] function_return.tool_calls is not iterable 15:48:27 at ./.nuxt/dev/index.mjs:1366:38 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Object.handler (./node_modules/h3/dist/index.mjs:723:19) at async Server.toNodeHandle (./node_modules/h3/dist/index.mjs:798:7) data-response undefined

Voice not working

Thank you for sharing this project.
I'm trying to run this local but TEXT message working with all functionality but VOICE totally not working. Is this expected behavior of this application ?

function_call.js working with tools_call but transcribe.js totally not handling this below, so its failed in "interface ChatCompletionMessage {"
tools: [
{ type: 'function', function: add_calendar_entry },
{ type: 'function', function: get_calendar_entry },
{ type: 'function', function: edit_calendar_entry },
{ type: 'function', function: delete_calendar_entry },
{ type: 'function', function: save_new_memory },
{ type: 'function', function: get_info_from_memory }
]

Can you please share the working transcribe.js file ? or how to fix this issue.
help is much appreciated. thank you.

Unable to obtain port

This might sound silly to ask, but I just can't get it to working
I followed your App Setup description and just get
ERROR Unable to obtain an available random port number!
my port 5000 is not being used, I have turned down my firewall, I tried using port 8080, I am running it with admin permissions, have double check if ffmped and MongoDB are installed and have restarted my pc multiple times.
I have not prior knowledge about Nuxt and don't know what to try anymore and would love to try your project. Do you know what could be the problem?
I would expect it to not really be an issue with your code, so sorry for asking this question if the issue is trivial to you.

Error with __dirname

Very interesting project! Would love to run it locally to give it a spin and check it out. But I have the following error. Tried with Node v18 and v20:


[6:51:58 AM]  ERROR  Importing directly from module entry-points is not allowed. [importing formidable from server/api/editprompt.js]

ℹ Vite server warmed up in 813ms                                                                    6:51:58 AM
✔ Nitro built in 603 ms                                                                       nitro 6:51:58 AM
[nuxt] [request error] [unhandled] [500] __dirname is not defined
  at <anonymous> (./node_modules/formidable/src/Formidable.js:94:34)  
  at Array.forEach (<anonymous>)  
  at IncomingForm (./node_modules/formidable/src/Formidable.js:91:33)  
  at formidable (./node_modules/formidable/src/index.js:13:33)  
  at <anonymous> (./server/api/transcribe.js:33:1)  
  at async Object.handler (./node_modules/h3/dist/index.mjs:1676:19)  
  at async Server.toNodeHandle (./node_modules/h3/dist/index.mjs:1886:7)

Any idea why this happens and how to fix it?

Thanks!

Event cretion not working with voice audio

Interesting project like it. tested in local:
Start voice audio and give some task put it in calendar events but not working. In the screen always this error:
"TypeError Cannot read properties of undefined (reading 'tool_calls')"

In the console log
chat {
id: 'chatcmpl-90MvTAiVlyVJ52ckbG1oPoMhO8wvY',
object: 'chat.completion',
created: 1709875155,
model: 'gpt-3.5-turbo-1106',
choices: [
{
index: 0,
message: [Object],
logprobs: null,
finish_reason: 'tool_calls'
}
],
usage: { prompt_tokens: 1352, completion_tokens: 20, total_tokens: 1372 },
system_fingerprint: 'fp_f93e21ed76'
}
assistant1 {
role: 'assistant',
content: null,
tool_calls: [
{
id: 'call_VFklkG0uRwqcanqJF3jvH16n',
type: 'function',
function: [Object]
}
]
}
LoopCount: 1
data-response undefined
isArray false

Exactly throwing this error :

console.log("data-response", data.response.tool_calls)

console.log("isArray", Array.isArray(data.response.tool_calls))

Can you please check?

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.