-
Notifications
You must be signed in to change notification settings - Fork 1
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
Audi support from issue #52
Comments
Implementation Steps
import streamlit as st
from streamlit_audio_recorder import audio_recorder
# Inside the Performance Review section
if review_type == "Performance Review":
st.title("Write Performance Review in a Minute")
audio_review = audio_recorder()
if audio_review:
audio_text = convert_speech_to_text(audio_review)
st.text_area('Audio Review Text', value=audio_text, height=200)
# Existing code...
class GroqLLM(LLM):
# Existing code...
def convert_speech_to_text(self, audio_data: bytes) -> str:
response = self.client.speech_to_text(audio_data)
return response['text']
class ReviewRequest(BaseModel):
# Existing fields...
audio_review: Optional[bytes] = None
class SelfReviewRequest(BaseModel):
# Existing fields...
audio_review: Optional[bytes] = None
def generate_prompt(your_role, candidate_role, perf_question, your_review, audio_review=None):
if audio_review:
your_review += f"\n\nAudio Review: {audio_review}"
# Existing code... def generate_self_review_prompt(text_dump, questions, instructions, audio_review=None):
if audio_review:
text_dump += f"\n\nAudio Review: {audio_review}"
# Existing code... References/app.py
|
Closed
This was referenced Aug 12, 2024
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add the ability for users to provide audio input for their performance reviews and self-reviews. Previously, users had to type their input, but now they can record their audio. You can use streamlit audio-record (https://github.com/stefanrmmr/streamlit-audio-recorder) for this.
The audio should be converted from speech to text using the Whisper model on Groq library (https://console.groq.com/docs/speech-text), and the resulting text will be used as input to the review generation process.\n\nMain Changes:
The text was updated successfully, but these errors were encountered: