Whisper AI has a limit on how large of a file it can process, so in order to be able to process longer videos, we have to convert the MP4 files to MP3. Video files contain both audio and video, making them much larger. Converting to MP3 keeps the audio quality high while significantly reducing file size.
Import necessary libraries.
import os
import whisper
from moviepy.editor import (VideoClip, VideoFileClip, AudioFileClip)
import moviepy
The bitrate="40k" reduces file size while keeping speech clear for transcription.
vid_path = "./all_hands.mp4"
audio_output = "audio_transcription.mp3"
vid_clip = VideoFileClip(vid_path)
audio_clip = vid_clip.audio
audio_clip.write_audiofile(audio_output, bitrate="40k")
MoviePy - Writing audio in audio_transcription.mp3
MoviePy - Done.
Load and Run Whisper Model.
We load the Whisper model and transcribe the extracted MP3 file.
# Load the model
model = whisper.load_model("base")
result = model.transcribe("./audio_transcription.mp3", fp16=False, word_timestamps=True)
# Print the transcription
print(result["text"])
you One of the few companies that sort of did both they built up a what looked like for a while a pretty sizable business now of course in contrast to us not quite so. But they did pretty well with direct. So effectively not a ton of differentiation there but they were one of the earliest players in the e-commerce marketplace and they got a lot of the early traction there. They built up a lot of direct sales a lot of work with a lot of third parties. So this is interesting stuff and they were creative in building out all these things they're also pretty creative in building out different kinds of products they went so broad that they. They explored a whole bunch of different things. So as one of the remaining the few remaining independence in the market we saw an opportunity to. So to tap into some of the areas that they've explored over a number of years some of those things are potentially beneficial some are definitely beneficial to in the right hands here with us at jewel. So we're still in the process of assessing the company it's people it's talent and it's capabilities and understanding what we want to integrate from B2 and what we what we see as problem. So a lot of work right we all know this. So it's not a surprise but we're assessing what we're going to hang on to and what we're going to really integrate into the company Kevin do you have the same word on that. There's a microphone. So I think James is right. There's a lot of capabilities that we do like I like the resources that they haven't China as a launching pattern we need to have much more presence in China whether it's from marketplace or from an engineering resources perspective. As James has said we're all figuring out what the regulatory requirements are and they've got some challenges in terms of what they have around their standards around testing and in website age verification. So we're not going to have what is now part of the company if it's at the MR not being regulatory compliance. So Tim's been down there the last couple days we've been having daily phone calls with the two founders and CEO and president Yan and Dan and we'll take the right action there'll be some restructuring actions we're not really going to make a strategy move into the open system and that's part of their business and if we go through restructuring as we've said on the phone we'll do it in a very open transparent way we'll treat people fairly if there's impact to them. But we got to figure out how to overall protect our company as well as we dig more into some of the certification operating practices down there and we'll try to be balanced on it. This one's for you. If most of you know me I'm not particularly into hanging out with celebs. If certain investors and board members that are and I have to pay my duty and spending time with board members and investors sometimes I did the bare minimum 61 minutes of the 60 minute conversation and then I said got leave was on the phone or something I had to leave the room. So Leo is a long time vapor he's tried he said 100 products over his lifetime he started smoking when he was 13 he smokes for 18 years he's been on his journey for 10 years to stop smoking he is now an at at you know that. That has a avid user of dual product and he is you know a huge believer in harm reduction from a smoker so he had some points of you we want to share. I don't know what the go forward is he you know he has a large foundation that is focused on environmental harm reduction in general harm reduction overall so we had some discussions but I will tell you I other than the fact that he was wearing a Dodgers cap when he came in which I didn't very much like. I told him take your cap off when you're in the building please if it's a Dodgers hat if it's a giant set you can wear it but if the dodger I have to take it off. But I will tell you he's sincere he's got a lot of personal experiences of story around the harm that cigarette smoking is done in him and all his friends he has by the way huge array of friends that have all converted off of smoking that are now jewelers so it's pretty amazing for somebody who started when they're smoking when they were 13 years old two pack of day smoke for 13 years. So he was a heavy smoker so he came in some of the investors have met him I don't think we're going to do you know it's not our style we're not going to go do celebrity arrangements and things of that nature but he's got some perspectives as a smoker and the category is interested learning more so I I found it be very sincere and he had a lot of personal connectivity of the product. I have to say in the 60 minutes he was there there was a lot of people booking appointments with Linda outside my office that I had never seen before in the company I looked out like there's eight people out there booking meetings all like this trying to book the name. So it was kind of funny terms of what was happening yes my wife was pretty bummed out that she didn't come down and visit that day so. Did you talk about the FDA James all so few of us met with the FDA last Tuesday the commission was on CMBC on Friday I'll tell you some of the commentary was make it was interesting he had words and thoughts that had been shared in some of the media. So I think the question is we have a sense might respond to the so we officially or response by the 11th will submit on the 9th since the 9th is Friday I don't think they're going to be in the office waiting for our response on Sunday on the 11th and then we don't know what the plan is after that we have some choices to make there is one action plan we can say hey we have a plan which we think is response is the right answer. And from a leadership position and leadership manner that we're going to go take some actions and we can take those actions right away on the 12th of 13th and not wait for the FDA response it's unclear what the FDA is going to do with the input they get unclear what their final decisions going to be I do not believe they'll share their final decisions before they decide what they are and implement them. We could wait the alternative is to wait to see what the FDA's response is and then collaborate and be coordinate with them we offered to be collaborative and coordinate with the FDA they didn't seem to be that concerned if we went out ahead of time and made some actions I'm frankly worried if they wait 2468 weeks in terms of actions. They'll probably have to go back to OMB who has final regulatory authority and who knows what sign-offs they have to get if we're really committed to making some progress on this youth uptake issue I worry waiting 2468 weeks is not solving the issue so we're having debates internally right now about what we're going to do we're going to we have a strong set of recommendations on actions that we think to take our presentation was a little bit in the spirit of we think the whole category is kind of a little bit in the spirit of we think the whole category is kind of a little bit in the spirit of we think the whole category is kind of a little bit in the spirit of we think the whole category is kind of a little bit in the spirit of we think the whole category is kind of a little bit in the spirit of we think the whole category is kind of a little bit in the spirit of we think the whole category is kind of a little bit in the spirit of we think the whole category is kind of a little bit in the spirit of we think the whole category is kind of gotten out ahead of itself a little bit we strongly disagree that there's any notion that we've been out marketing to you through that's a target marketplace for us frankly as we've told everybody we don't need one person whether they're youth or not that's an on nicotine user to grow the hell out of our business it's just not true in terms of the marketplace marketplace. So we're formulating the plans there'll be a comms plan around it sometime between the 12th and the subsequent four to six weeks there'll be some action taken and frankly the big debate is do we go out on our own and take action because we think to the right actions to take and get going or do we wait and see what the FDA does and draft off the FDA a little bit so some of that discussions taking place. So I thought it was a productive conversation it was a 50 minute meeting they probably had 25 people in the meeting and we're offering or proposing some actions which we think will have impact and as we tell them all the time though it's balanced with the fact that we need to maintain the category and a tremendous opportunity for the 38 million Americans in the billion people worldwide. So we're concerned about the spectrum of all users so that's some of the debate in the discussion we had with them. Just to add to that really quickly a lot of you a lot of you whether you really know it or not have contributed a ton to preparations for these FDA responses some of you very overtly read action plans on specific responses. So this is different ways that we would look at better controlling the industry in ways that haven't been done before and then some of you in ways that you may not be as clear right we've been building new product platforms to do all sorts of new things that that may not be obvious to all of you. So I think one of the difficult things in this kind of moment is how sensitively we need to treat this kind of information so I think what we'd love to do right now is just commend you guys as overtly as possible and say look here's exactly the kind of input that you guys have had and what impact it's had with the FDA. The fact is we're still in the midst of this right now but regardless. Thank you so much so many of you that have been putting in all the effort that's gone into what is an incredibly comprehensive and thoughtful response to FDA. We don't know what they're going to pick up on here what's really going to resonate with them but I think we're what we can also say is that we're we're not going to be fully dependent just on what the FDA responds to. We know internally what we think is right and we know that because we've been digging into a lot of the data on what works and what what and what doesn't work and whether or not that gets to be sort of a kumbai moment with the FDA and we say hand in hand right this is exactly what we're all going to do together and it's fully supported. It's probably pretty unlikely situation that it's going to look quite that clean but there are other areas of the world where we will get to explore effectively all of the solutions that you guys have helped put on the table. I think it's going to be a work in progress for a while but every bit of work that you guys have done is going to see some sort of light of day at some point it's going to make a material impact on the reputation of the company and really functionally on getting ahead of this issue. I think the reality is that there's just not a clear understanding of exactly what the problem is right now and we're in the midst of having conversations with stakeholders, not just the FDA but state AGs and others to socialize right what is really happening and what are the right solutions to this. I think the unfortunate reality and frankly fortunate reality as well is that we know the most about this right of anyone who's involved and couldn't be more proud of that unfortunately that does mean a lot of socialization and a lot of effort and I think one thing that we really want to do to make you guys as proud as possible of all the work that you put in is is find a way to to ultimately get a lot more of our voice out there publicly. So that what we know internally is sort of the right thing to do is better understood by the public and by regulators ultimately as well. So, Bill and James's point you know we've made an explicit decision not to get into a PR battle with the FDA over the last month so the commissioners on CNBC every week and they're out loud talking about this. If you sit in the room with them it is clear that we probably have put knowledge on the category the most. You know some of these assertions like you know all online is bad online is not online I go on every day and go to my favorite three sites and click that I'm 21 and go to my PayPal account and buy a starter kit every day there is no age verification system. I think that is very different from our age verification process which now includes less for digits use all security number and will soon have to factor authentication so not everybody is either totally informed or well intended in terms of their communication but calling online is online is just a misrepresentation of that. I was with the meeting over the weekend with some California legislators flavors are not flavors so we brought them out and pulled out a bag of 10 packages that we bought in the bake shop of bubble gum and gummy bear and no duds and dragons blood and the 10 we had and I plopped our flavors and said are you telling me you think that is the same as that. You said that is horrible. That is not us. That is other folks so there is a lot of misinformation out there. It is not a simple story to talk about what we are trying to do. The behavioral data that we are getting and all the studies are on switching rates is hugely effective when you talk to people that there are sweetpeaks smokers who are buying our product are switching at a 50% to 60% rate which is about 10 times the average of available NRT products today. We talk about the role of flavors and people that they may go switch at 20 points higher than if they use a tobacco product they do not know those facts so we share those facts. We have made a decision not to probably battle with the FDA but there is a lot of misinformation out there and part of our job is to get information asking myself and Patrick Lynch who are at the Massachusetts Attorney General on Friday and we spent time with her staff for almost two hours. There is just poor information. Some of it is because again I think a lot of folks have come from a traditional tobacco background but just like us to go away and start with the presumption of badness and others there is a lot of misinformation out there. We are trying to get information out there but we are going to go out there with facts. I also think we are going to get much more aggressive in terms of pushing on our mission. The team is in New York this week shooting TV material that we would go out in terms of a campaign that we would launch in late November and December which is very testimonial oriented, very smoke or oriented, very focused on our mission. We are going to start getting stronger in terms of our mission and making sure that the 38 million Americans are being represented correctly. What are the chances that we have to stop selling flavors? I hate to put odds. I am not a Las Vegas bookie in terms of odds. I don't know what the FDA is going to go do. You see some of the comments from the commission and it talks about maybe flavors in certain channels, maybe certain types of flavors. I don't think that the FDA and the government want to shut down the category. I don't think they want to restrict some of the success we are showing. I don't know what is going to happen there. I have a unified single workspace for all San Francisco employees. My question is over what time period? We could do it in two ways. We could cut the San Francisco workforce down by two-thirds which is not my preference. That is a solution. My preference is we go find a space 2-3. When we have almost a campus like I have asked Anna and James to go buy a chunk of land someplace and just have a destination there. That would be the intent over time. Yes. I like to build a really big campus and fill it up and run out of space again because we are being so successful. State of California State's employees are allowed 2 hours PTO on election day to vote. We will polling place volunteers be eligible for taking the whole day office PTO. I have no friggin idea where anybody is every day. If you want to go work at a polling place for a day, probably inform your boss and leave. I am not sure what the official policy is but... Somebody asked me where somebody was and said no friggin idea where they are. I don't know every calendar. As we wrap up 2010 with the executive team rate, Jules performance has come. We will come back with some thoughts on first half of 19. We are going through the planning process now. Jules performance has come. Now I am going to get into a commitment as to what the bonus multiplier is going to be. I am trying to think through the unintended consequences. Let's step back for a second. The company is going to grow about 7x in revenue. We are having a huge impact in terms of getting product and smoker's hands. We are finally figuring out what data we are switching people at a 50% to 60% rate. We are adding capability throughout the company that we need to add. Which is really important as we talk about building this backbone capability so that we can grow. We are now going to be in 7 countries by the end of the year. Maybe more if we can get James out of Russia. He is going to get into Russia and get him out. Not that anybody is going to call ahead of time and say check him. I am just saying he is going to have a tough time getting him out. We are going to have a few hundred people in international. We started the year with one. Piat is probably here. He is the one. We are continuing to grow our brand. We have a lot of headwind in the US. I think every market is going to be different. It would be hard to say if you looked at almost every metric. By no means are we perfect because we are running hard and we are learning along the way. It would be hard to believe that if the company is growing 7x built the base, put capability in place. It has created all this employment. If you look at the financial performance, every indication is moved up in terms of positive or quality rate. If you look at our margin performance, yield overall and manufacturing, it would be hard to say that we haven't had or are having a phenomenal year. That is because of all of you in the room and all of your colleagues around the world. There are many, many, many things that we can be doing better. I take every opportunity to meet and voice those things we need to work on. We are in the baseball analogy. We are in the top of the first inning. Maybe the bottom of the first. We have a market of billion smokers around the globe. We are just starting to get into countries like Israel, UK, Canada. We will be in Washington, Switzerland, November. We will be in Germany and France in December. We have a large rollout plan going forward, which has put a lot of stress here and out internationally. We have to find that balance. We are getting into new businesses. Our new leader around enterprise markets there. We have plenty of opportunity. We are building capability. I am proud of what we are doing around our quality systems. It can be painful sometimes. We have to take those actions to be a market leader. I think the company I would tell you and thanks to everybody we are having a pretty good year. Change is the name to Heat Not Burns. I am a Heat Not Burn advocate. James has shown me the industrial design. If you can make that the right cost and it works, I like it. I have not considered any nicknames. Can we get a band to perform at the holiday party here? It looks like James and I are going to go for a market launch and then coming back just for the holiday party. Maybe we can be the surprise band. I think it is a good time for that. We are going to continue to open to suggestions there. We have accepted it. We are not going to engage in that kind of lifestyle market. We are going to continue to open to the market. This is such a crazy thing. I do not know how many of you would have seen our earliest marketing work. I had it not been for this moment in press right now. The grand irony of this is that the earliest marketing campaign generated almost no traction. It was incredibly limited in scope and only lasted about three months. I am going to tell you a story. I get letters. I think we probably all do from time to time. I think we are all going to have a lot of fun. I think we are all going to have a lot of fun. We are all going to have a lot of fun. We are all going to have a lot of fun. We are all going to have a lot of fun. We are all going to have a lot of fun. We are all going to have a lot of fun. We are all going to have a lot of fun. We are all going to have a lot of fun. We are all going to have a lot of fun. We are all going to have a lot of fun. We are all going to have a lot of fun. We are all going to have a lot of fun. We are all going to have a lot of fun. We are all going to have a lot of fun. We are all going to have a lot of fun. We are all going to have a lot of fun. We are all going to have a lot of fun. We are all going to have a lot of fun. We are all going to have a lot of fun. We are all going to have a lot of fun. We are all going to have a lot of fun. We are all going to have a lot of fun. We are all going to have a lot of fun. We are all going to have a lot of fun. We are all going to have a lot of fun. We are all going to have a lot of fun. We are all going to have a lot of fun. We are all going to have a lot of fun. We are all going to have a lot of fun. We are all going to have a lot of fun. We are all going to have a lot of fun. We are all going to have a lot of fun. We are all going to have a lot of fun. We are all going to have a lot of fun. We are all going to have a lot of fun. We are all going to have a lot of fun. We are all going to have a lot of fun. We are all going to have a lot of fun. We are all going to have a lot of fun. We are all going to have a lot of fun. We are all going to have a lot of fun. We are all going to have a lot of fun. We are all going to have a lot of fun. We are all going to have a lot of fun. We are all going to have a lot of fun. We are all going to have a lot of fun. We are all going to have a lot of fun. We are all going to have a lot of fun. We are all going to have a lot of fun. I think their name was like a really sleazy sounding name. It was like the opportunist or something. I think they were like that. This stuff is nasty. I mean look a lot of these folks that reach out to you and tell you to have some way around transfer restrictions or whatever. There are a lot of them looking for information that they can leak to the press or to others. We will do our damdest to make sure that you are protected and not taken advantage of by these sleazy marketplaces that are out there. We want to get you guys the best price and the best return on the investment that you guys have made by being care every day. You guys are holding up your end of the bargain and having the company perform because that is the easiest way to go get any kind of refinance and done. Just right now with the FDA's public announcement and actions we are taking and what the FDA's actions could take. Any kind of major macro instability which investors would get nervous about is not a good time to be going out to the financing market. My view is there is a possibility that over the next 60 days we get some clarity about what the regulatory environment is going to be. We get back focused on our mission and going back to work. We will have good launching points in up to 10 to 15 markets by the end of Q1 next year and nationally. I don't think long-term investors are dissuaded by the immense opportunity we have and we will enter back into those discussions. We have lots of relations with lots of investors that we have talked to over time. If the time is right and we feel that the numbers are right, we will go back and have a discussion and we will provide for liquidity. The good thing is we have plenty of capital on the balance sheet right now so we are in a great position to continue to run the business. I have to worry about any kind of downsides scenario from liquidity standpoint when a superposition. As James said, we are sensitive to this issue and we have to wait till there is a little bit more clarity about the regulatory environment in the US. I think we will be back on the marketplace talking investors at that point for early next year. There was a trick question in there earlier. The question about how would executive team rate the performance of dual? You guys saw this floating around on LinkedIn. There was an article about jewel being the fastest growing company ever. It depends on how you measure it. There are a lot of things that are really only if you measure a jewel as a jewel or a jewel since launch, not including the very long time that existed before that. What were you saying before? It is like an overnight success 13 years in the making. There are still a lot of truth in that. There are a lot of growing pains and such and a lot of these questions come from that right from the growing pains of being quite possibly the fastest growing company ever. I think you should all be super proud of that. Cool. Thank you all. Oh, I think we're done.
Format Timestamps
Whisper returns timestamps in seconds, so we convert them to MM:SS format for better readability. We also format the transcription and store it in a structured list.
Whisper would normally segment the timestamps by pauses in the audio, however, we have formatted the timestamps into 30-second intervals to ensure consistency and easy readability of the transcription. The interval length can be adjusted as desired!
# add timestamps
def format_time(seconds):
minutes, seconds = divmod(int(seconds), 60)
return f"{minutes:02}:{seconds:02}"
# group timings into 30 second intervals
interval = 30
current_start = 0
current_text = ""
transcription_lines = []
for segment in result["segments"]:
start = segment["start"]
end = segment["end"]
text = segment["text"]
# add the text only if we are in the current interval
if start < current_start + interval:
current_text += " " + text
else:
# save previous interval's text
end_time = current_start + interval
transcription_lines.append(f"[{format_time(current_start)} - {format_time(end_time)}] {current_text.strip()}")
# start new interval
current_start += interval
current_text = text
# add remaining text
if current_text:
end_time = current_start + interval
transcription_lines.append(f"[{format_time(current_start)} - {format_time(end_time)}] {current_text.strip()}")
Let's look at the first 10 lines. Sometimes background noises get interpreted as speech, which is seen in the first line.
for line in transcription_lines[:5]:
print(line)
[00:00 - 00:30] you [00:30 - 01:00] One of the few companies that sort of did both they built up a what looked like for a while a pretty sizable business now of course in contrast to us not quite so. But they did pretty well with direct. [01:00 - 01:30] So effectively not a ton of differentiation there but they were one of the earliest players in the e-commerce marketplace and they got a lot of the early traction there. They built up a lot of direct sales a lot of work with a lot of third parties. [01:30 - 02:00] So this is interesting stuff and they were creative in building out all these things they're also pretty creative in building out different kinds of products they went so broad that they. They explored a whole bunch of different things. So as one of the remaining the few remaining independence in the market we saw an opportunity to. So to tap into some of the areas that they've explored over a number of years some of those things are potentially beneficial some are definitely beneficial to in the right hands here with us at jewel. [02:00 - 02:30] So we're still in the process of assessing the company it's people it's talent and it's capabilities and understanding what we want to integrate from B2 and what we what we see as problem.
Now, we write the transcription into a .txt file for easy access.
# Save the transcription to a text file
with open("all_hands_transcription.txt", "w", encoding="utf-8") as f:
f.write("\n".join(transcription_lines))
print(f"Transcription saved to text file.")
Transcription saved to text file.