Giter VIP home page Giter VIP logo

Comments (5)

Marcello87 avatar Marcello87 commented on May 22, 2024 2

Tested, works great for me, many thanks for the quick response.

from chatgpt-telegram-bot.

n3d1117 avatar n3d1117 commented on May 22, 2024 1

Hi @Marcello87, that's interesting. I originally intended it as a way to only transcribe audio messages, and not as a direct voice command to ChatGPT.

Should be as easy as replacing these lines:

# Send the transcript
await context.bot.send_message(
chat_id=chat_id,
reply_to_message_id=update.message.message_id,
text=transcript,
parse_mode=constants.ParseMode.MARKDOWN
)

With:

response = self.openai.get_chat_response(chat_id=chat_id, query=transcript)
await context.bot.send_message(
    chat_id=chat_id,
    reply_to_message_id=update.message.message_id,
    text=response,
    parse_mode=constants.ParseMode.MARKDOWN
)

But I'm not sure how to allow both modes. Will keep this issue open for now, in case someone wants to help

from chatgpt-telegram-bot.

slippersheepig avatar slippersheepig commented on May 22, 2024 1

I think it's difficult to use both modes at the same time. Maybe we can set a parameter like VOICE_TO_CHAT and let users select their prefer mode.

from chatgpt-telegram-bot.

deanxizian avatar deanxizian commented on May 22, 2024 1

When I set VOICE_REPLY_WITH_TRANSCRIPT_ONLY to false, can I let the bot transcribe my voice and output it first, then reply it? It's more user-friendly.

from chatgpt-telegram-bot.

n3d1117 avatar n3d1117 commented on May 22, 2024

Thanks @Marcello87 @slippersheepig
Added VOICE_REPLY_WITH_TRANSCRIPT_ONLY env parameter which defaults to true

from chatgpt-telegram-bot.

Related Issues (20)

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.