rajk078 commited on
Commit
27ed92b
·
1 Parent(s): 28460de

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +6 -1
utils.py CHANGED
@@ -15,10 +15,15 @@ os.environ["OPENAI_API_KEY"] = "19ac6255a55b448e92190c0e5e75156e"
15
 
16
  from langchain.llms import AzureOpenAI
17
 
 
 
 
 
 
18
  def get_audio_text(file):
19
  text = "Thank you for calling the Office of People Transfer you're speaking with. Existing again. I don't have the number. It's about a box request. I have the student ID. No problem. How can I help you to help you with that? Can I get your name and the student ID please? My name is Carolina Carla and the student ID is 257468439. #10 is 257468439 alright? Thank you. Then how can I help you today, Catalina? We'll put it out on the bus. Um, but for some reason he was kicked out of the system. Couple of almost always ago we put in a request again and I just wanted to know if it was already approved. Alright, alright, alright. Highlands be able to take a look into that. Can I get this doing the same please? Ohh. Thank you. And can you confirm his date of birth? October 28th, 2016. And his address. 1444 Boston Rd. Apt. 4N as in Nancy Banks, New York, 10/4. 6/1 Thank you. Are you calling? Are you sorry? Are you calling from the school or are you back? I'm the mother. I'm OK. Sorry. Thank you. Alright, I'm just pulling up an account here. Give me one moment please. Thank you. And when was it that you called in to report the initial 10 off of the bus they were put in? Let me give you a start, OK? It wasn't the 16th they put in the request. Alright. And I'm seeing that you called and again to follow up on it. Is that right? Yeah. Yes. OK. Alright. Just hold for me a moment, please. I'm just gonna take a further look into that. I'll come right back here. Thank you. Thank you very much for holding. OK, alright, so I'm seeing that there isn't a signed route at the moment. When was the last time that you spoke with your school bus coordinator? The last time that I spoke recording under was on the 20th. On the 20th, yeah, OK, and it is your system. What? He was on the bus all the way up to the 15th and for some reason when I got the phone call in the morning from the medication, she informed me that he was no longer on the list. So when I call you guys, I was informed that he wasn't umm, he was um what was the word that they used? Umm. Uh, he he wasn't. He didn't. So how it which was the translation company, they told me he was late for their system so he was nowhere to be found in transportation system. So we had to put in the request again on the same you know and that's when the put in the request. Umm. I was hoping that, you know, the situation was going to be resolved right away, but obviously has not, so yeah. Yes, and everything all the way up to the 15 and this has caused me issues with work. So, but you know, I work, that's why he got on the bus. I'm at 6 1/2 to be late for work and get out early so that I could drop him off and pick him up and then the next week since then. The week after that like the last week of class before the break. So I'm trying to get this situation resolved. The slash to start again on Tuesday and. I don't want anymore issues with work. And it's done, yeah. So I have to get things resolved as fast as possible for this. Nobody's requested for him to be kicked out of the system like because he was receiving his service with no issue and for some reason, I don't know why, nobody apparently knows the reason why he was kicked out of the system and. He wasn't. You know he was. Add. Exactly. So we have to go ahead and put in the request one more time. So I don't understand the reason why. Yeah, I I wouldn't be able to see why it wasn't thought that it does seem to be something that might have been an error. Since no one is able to see why I I'm going to make it another second. But I think recommend just following up with this school bus coordinator. Just to see if they have maybe a particular risks and not the other high bus or on the side route as of yet. But I am seeing that he is is probably still in the process of being reviewed. So it probably will take some time but most likely it's it would be the case where on Tuesday he gets service but I cannot say for sure because nothing happened yet when, when when they're on break. I see that you guys work but do the independent. The transportation company. Are all for this. It might not be able to know this, but they're still working like in their offices. I am not sure for the offices that some of the companies in the schools are open because they do service multiple schools. They would be open as well. OK. Alright, so just follow up your school bus coordinator just to make sure because they are the ones who actually who would be able to give you a bit more information. OK. OK. Alright. Thank you for calling. Have a great day. Thank you for your help. Bye. Bye."
20
  if file == 'samplefile1.mp3':
21
- text = "Thank you for calling the Office of People Transfer you're speaking with. Existing again. I don't have the number. It's about a box request. I have the student ID. No problem. How can I help you to help you with that? Can I get your name and the student ID please? My name is Carolina Carla and the student ID is 257468439. #10 is 257468439 alright? Thank you. Then how can I help you today, Catalina? We'll put it out on the bus. Um, but for some reason he was kicked out of the system. Couple of almost always ago we put in a request again and I just wanted to know if it was already approved. Alright, alright, alright. Highlands be able to take a look into that. Can I get this doing the same please? Ohh. Thank you. And can you confirm his date of birth? October 28th, 2016. And his address. 1444 Boston Rd. Apt. 4N as in Nancy Banks, New York, 10/4. 6/1 Thank you. Are you calling? Are you sorry? Are you calling from the school or are you back? I'm the mother. I'm OK. Sorry. Thank you. Alright, I'm just pulling up an account here. Give me one moment please. Thank you. And when was it that you called in to report the initial 10 off of the bus they were put in? Let me give you a start, OK? It wasn't the 16th they put in the request. Alright. And I'm seeing that you called and again to follow up on it. Is that right? Yeah. Yes. OK. Alright. Just hold for me a moment, please. I'm just gonna take a further look into that. I'll come right back here. Thank you. Thank you very much for holding. OK, alright, so I'm seeing that there isn't a signed route at the moment. When was the last time that you spoke with your school bus coordinator? The last time that I spoke recording under was on the 20th. On the 20th, yeah, OK, and it is your system. What? He was on the bus all the way up to the 15th and for some reason when I got the phone call in the morning from the medication, she informed me that he was no longer on the list. So when I call you guys, I was informed that he wasn't umm, he was um what was the word that they used? Umm. Uh, he he wasn't. He didn't. So how it which was the translation company, they told me he was late for their system so he was nowhere to be found in transportation system. So we had to put in the request again on the same you know and that's when the put in the request. Umm. I was hoping that, you know, the situation was going to be resolved right away, but obviously has not, so yeah. Yes, and everything all the way up to the 15 and this has caused me issues with work. So, but you know, I work, that's why he got on the bus. I'm at 6 1/2 to be late for work and get out early so that I could drop him off and pick him up and then the next week since then. The week after that like the last week of class before the break. So I'm trying to get this situation resolved. The slash to start again on Tuesday and. I don't want anymore issues with work. And it's done, yeah. So I have to get things resolved as fast as possible for this. Nobody's requested for him to be kicked out of the system like because he was receiving his service with no issue and for some reason, I don't know why, nobody apparently knows the reason why he was kicked out of the system and. He wasn't. You know he was. Add. Exactly. So we have to go ahead and put in the request one more time. So I don't understand the reason why. Yeah, I I wouldn't be able to see why it wasn't thought that it does seem to be something that might have been an error. Since no one is able to see why I I'm going to make it another second. But I think recommend just following up with this school bus coordinator. Just to see if they have maybe a particular risks and not the other high bus or on the side route as of yet. But I am seeing that he is is probably still in the process of being reviewed. So it probably will take some time but most likely it's it would be the case where on Tuesday he gets service but I cannot say for sure because nothing happened yet when, when when they're on break. I see that you guys work but do the independent. The transportation company. Are all for this. It might not be able to know this, but they're still working like in their offices. I am not sure for the offices that some of the companies in the schools are open because they do service multiple schools. They would be open as well. OK. Alright, so just follow up your school bus coordinator just to make sure because they are the ones who actually who would be able to give you a bit more information. OK. OK. Alright. Thank you for calling. Have a great day. Thank you for your help. Bye. Bye."
22
  elif file == 'samplefile2.mp3':
23
  text = "sample2"
24
 
 
15
 
16
  from langchain.llms import AzureOpenAI
17
 
18
+ def get_successext(txt) :
19
+ htmlstr1="<p style='background-color:rgba(33, 195, 84, 0.1);color:#333;font-size:20px;border-radius:3px;line-height:24px;padding:15px;'>"+ txt+ "</p>"
20
+
21
+ return htmlstr1
22
+
23
  def get_audio_text(file):
24
  text = "Thank you for calling the Office of People Transfer you're speaking with. Existing again. I don't have the number. It's about a box request. I have the student ID. No problem. How can I help you to help you with that? Can I get your name and the student ID please? My name is Carolina Carla and the student ID is 257468439. #10 is 257468439 alright? Thank you. Then how can I help you today, Catalina? We'll put it out on the bus. Um, but for some reason he was kicked out of the system. Couple of almost always ago we put in a request again and I just wanted to know if it was already approved. Alright, alright, alright. Highlands be able to take a look into that. Can I get this doing the same please? Ohh. Thank you. And can you confirm his date of birth? October 28th, 2016. And his address. 1444 Boston Rd. Apt. 4N as in Nancy Banks, New York, 10/4. 6/1 Thank you. Are you calling? Are you sorry? Are you calling from the school or are you back? I'm the mother. I'm OK. Sorry. Thank you. Alright, I'm just pulling up an account here. Give me one moment please. Thank you. And when was it that you called in to report the initial 10 off of the bus they were put in? Let me give you a start, OK? It wasn't the 16th they put in the request. Alright. And I'm seeing that you called and again to follow up on it. Is that right? Yeah. Yes. OK. Alright. Just hold for me a moment, please. I'm just gonna take a further look into that. I'll come right back here. Thank you. Thank you very much for holding. OK, alright, so I'm seeing that there isn't a signed route at the moment. When was the last time that you spoke with your school bus coordinator? The last time that I spoke recording under was on the 20th. On the 20th, yeah, OK, and it is your system. What? He was on the bus all the way up to the 15th and for some reason when I got the phone call in the morning from the medication, she informed me that he was no longer on the list. So when I call you guys, I was informed that he wasn't umm, he was um what was the word that they used? Umm. Uh, he he wasn't. He didn't. So how it which was the translation company, they told me he was late for their system so he was nowhere to be found in transportation system. So we had to put in the request again on the same you know and that's when the put in the request. Umm. I was hoping that, you know, the situation was going to be resolved right away, but obviously has not, so yeah. Yes, and everything all the way up to the 15 and this has caused me issues with work. So, but you know, I work, that's why he got on the bus. I'm at 6 1/2 to be late for work and get out early so that I could drop him off and pick him up and then the next week since then. The week after that like the last week of class before the break. So I'm trying to get this situation resolved. The slash to start again on Tuesday and. I don't want anymore issues with work. And it's done, yeah. So I have to get things resolved as fast as possible for this. Nobody's requested for him to be kicked out of the system like because he was receiving his service with no issue and for some reason, I don't know why, nobody apparently knows the reason why he was kicked out of the system and. He wasn't. You know he was. Add. Exactly. So we have to go ahead and put in the request one more time. So I don't understand the reason why. Yeah, I I wouldn't be able to see why it wasn't thought that it does seem to be something that might have been an error. Since no one is able to see why I I'm going to make it another second. But I think recommend just following up with this school bus coordinator. Just to see if they have maybe a particular risks and not the other high bus or on the side route as of yet. But I am seeing that he is is probably still in the process of being reviewed. So it probably will take some time but most likely it's it would be the case where on Tuesday he gets service but I cannot say for sure because nothing happened yet when, when when they're on break. I see that you guys work but do the independent. The transportation company. Are all for this. It might not be able to know this, but they're still working like in their offices. I am not sure for the offices that some of the companies in the schools are open because they do service multiple schools. They would be open as well. OK. Alright, so just follow up your school bus coordinator just to make sure because they are the ones who actually who would be able to give you a bit more information. OK. OK. Alright. Thank you for calling. Have a great day. Thank you for your help. Bye. Bye."
25
  if file == 'samplefile1.mp3':
26
+ text = "I'm sorry, what is your name again? This is in the desert. How can we help you today? I have umm, I am Melissa. I'm calling from Logan Bus Company calling to report an incident on the bus. OK, you know, misconduct. You didn't hit on bus. What is it, a student misconduct? So your name is Melissa, yes? What's the phone number to your company 718-597-3222? What's the inside number? It's 215. 626318 abandon. For Brandon Lopez. Hmm. Yes, that is it. That's the child's name. Brandon Melbourne. OK. Hey, what you looking to report? Umm, alright. So Brandon, today when? Umm, I guess so. We're heading to his house. They were closed by his house. He kind of got out of control and he was hitting the matrix. So the meeting was send him to please calm down or she's gonna have to call the police because he was trying to run off the bus. She ended up calling his mom. His mom said, hey, you know, it's fine, I'll be there. Actually, she was going to go to the bus and pick him up from the bus. And while they were waiting for mom, he was banging his head on the window and on the wall and it resulted in him getting some scratches on his face. OK. Yeah. While on his way to his stop, he began to act out and. Started to like kick the mission or hit me He was he was hitting her with his hands. She was sending him to calm down, to sit down and or she was going to call the police and she instead called his mom to see if she can calm him down and the mom said, hey, you know, I'll just be there in a few minutes to pick him up from the bus. Just try to keep them calm and while they were waiting for her, that's when he started banging his head on the window and screaming and the the driver saying that he has some scratches on his face through to that OK? He got to the point where he was banging his head on the bus window, right? Yes. And. And. After this. Is red. This is what I'm today. 305 is what the Internet says. OK, the incident number is going to be 91291240640684. Thank you so much. No problem. Thank you for calling. Have a great day. Alright, you too."
27
  elif file == 'samplefile2.mp3':
28
  text = "sample2"
29